Giter Club home page Giter Club logo

nautilus-right-click-new-file's Introduction

Right-click New File Context Menu for Nautilus / Nemo / Gnome File Manager

Super easy and light script to automate adding a context menu to Nautilus / Gnome Files to create a new document.

Although this script was originally built for a now-ancient version of Nautilus, it still works for current versions of Nautilus and Nemo file managers, as late as GNOME Shell 3.38.3


Before:

nautilus right click context menu - before

After:

nautilus new file context menu - after

Default Menu Options

  • Bash Script
  • PHP Script
  • Text File
  • Libre Office Word Document
  • Markdown Document

Any menu item ins interchangeable and can be removed.

Download the automation script

Run via terminal:

git clone https://github.com/angela-d/nautilus-right-click-new-file.git && cd nautilus-right-click-new-file

Confirm you're in the right directory:

ls

You should see:

img  LICENSE  automate.sh  README.md  Templates.tar.gz

Now, run the script:

./automate.sh

If you've already used this and want to update to get the Markdown Document automagically installed, update your git repo or do a fresh clone and follow the above steps.

Updating: Updating

That's all there is to it!


(optional) Manual Instructions

(if you don't want to run the automated script)

  • Download Templates.tar.gz and extract
tar -xvzf Templates.tar.gz
  • Move the extracted files (templates) into /home/youruser/Templates/

(in Nautilus; Open File Manager -> Click Home on the left -> If Templates folder does not exist, create it. If you're using a non-english language, change the name accordingly, e.g. /home/youruser/Vorlagen/ in a german environment. Creating ~/Templates/ in a non-english environment won't have any effect.)

  • If your changes do not automatically appear, log out or run:
xdg-user-dirs-update

to generate the user-dirs config file.

Done!

Note

Each of the template files have a prefix like #!/bin/bash or <?php when you open the file (except the Text file & Writer/Word .doc) - while standard for the script type in question, it is also used so the operating system could interpret the type of file and automatically create the context menu icon without any extra code.


(optional) Customize your Context Menu

In Nautilus, navigate to the Home directory and then Templates.

In the Templates directory, you can place your dummy files (templates) in folders for easy sorting, or add new ones.

If your changes are not instantaneous, restart Nautilus:

nautilus -q && nautilus &

In some instances, you may have to log out and log back in.

nautilus-right-click-new-file's People

Contributors

angela-d avatar githubuser699 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nautilus-right-click-new-file's Issues

[Enhancement] Add a notice to README.md and if possible change automate.sh respectively

Your README and script assumes that the language is english instead of every other language possible.
In order to make it work for everyone it would be good to point out this difference.

For example your script looks for the ~/Templates folder but in other languages this folder won't work because it is being translated.
In NL it might be ~/Sjabloon or in GER it might be ~/Vorlagen.
So your files (those which should be inside the right click menu) must be placed in this translated folder.

I don't know, unfortunately, where those translations are beeing stored but I guess there might be a file like those in /usr/share/desktop-directories.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.