Nemo is a free and open-source software and official file manager of the Cinnamon desktop environment. It is a fork of GNOME Files (formerly named Nautilus).
Nautilus is default in GNOME desktop, but although I use Ubuntu, which has GNOME as default, I don't like Nautilus.
Nemo has some features that works best for me, thus I decided to install Nemo on my Ubuntu GNOME.
- Copy current path from the top bar
- Right click option to open current folder as root (good to copy files to protected locations)
- Create custom actions. This is the focus for this gist.
sudo apt install nemo
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons false
It is marked as deprecated
gsettings set org.nemo.desktop show-desktop-icons true
Grab the file below, nemo-desktop.desktop
, and copy it to your autostart folder ~/.config/autostart/nemo-desktop.desktop
, or execute this to create and save the file
mkdir ~/.config/autostart
touch ~/.config/autostart/nemo-desktop.desktop
cat <<EOF > ~/.config/autostart/nemo-desktop.desktop
[Desktop Entry]
Type=Application
Exec=nemo-desktop
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=nemo-desktop
Name=nemo-desktop
Comment[en_US]=Nemo Desktop icons
Comment=Nemo Desktop icons
EOF
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
rm ~/.config/autostart/nemo-desktop.desktop
gsettings set org.gnome.desktop.background show-desktop-icons true
gsettings set org.nemo.desktop show-desktop-icons false
sudo apt purge nemo nemo*
sudo apt autoremove
This is a great feature. We can create a configuration file that adds your own commands to the Nemo context menu, the list that opens when you right click in Nemo.
The sample file at /usr/share/nemo/actions/sample.nemo_action
has details on what options can be used for each config.
We can setup actions for when you click on a blank space in the folder, when we click on a file, and we can filter specifc extensions or formats, if we have more than X number of files selected. More options in the Nemo documentation.
Currently I am using actions only for blank spaces in a folder.
git init %F
- Initiates a git repository in current folder without command line or other toolscode %F
- Open current folder in VSCodegit-cola cola -r %F
- Open current folder in Git-Cola, an application for Git GUIpython3 -m venv %F/.venv
- Create a Python virtual environment in current folder
The Nemo actions folder is located at ~/.local/share/nemo/actions
. Just copy files below to this location or execute these commands
Git init
cat <<EOF > ~/.local/share/nemo/actions/git_init.nemo_action
[Nemo Action]
Active=true
Name=Git Init
Comment=Initiate a Git Repository
Exec=git init %F
Selection=none
Extensions=dir;
Icon-Name=git-cola
Dependencies=git;
EOF
Open Git-Cola
cat <<EOF > ~/.local/share/nemo/actions/open_git-cola.nemo_action
[Nemo Action]
Active=true
Name=Open Git-Cola
Comment=Open Git-Cola in this folder
Exec=git-cola cola -r %F
Selection=none
Extensions=dir;
Icon-Name=git-cola
Dependencies=git-cola;
EOF
Open VSCode
cat <<EOF > ~/.local/share/nemo/actions/open_vscode.nemo_action
[Nemo Action]
Active=true
Name=Open VSCode
Comment=Open VSCode in this folder
Exec=code %F
Selection=none
Extensions=dir;
Icon-Name=com.visualstudio.code
Dependencies=code;
EOF
Open VSCodium
cat <<EOF > ~/.local/share/nemo/actions/open_vscodium.nemo_action
[Nemo Action]
Active=true
Name=Open VSCodium
Comment=Open VSCodium in this folder
Exec=codium "%F"
Selection=none
Extensions=dir;
Icon-Name=/usr/share/codium/resources/app/resources/linux/code.png
Dependencies=codium;
EOF
Create Python venv
cat <<EOF > ~/.local/share/nemo/actions/create_py_venv.nemo_action
[Nemo Action]
Active=true
Name=Create Python .venv
Comment=Create a Python virtual enviroment in this folder
Exec=python3 -m venv %F/.venv
Selection=none
Extensions=dir;
Icon-Name=python3
Dependencies=python3;
EOF