User Tools

Site Tools


config:nemo-performance

This is an old revision of the document!


Nemo Tips

executable Text Files

By default, Nemo asks whether to display or run executable text files. As all files on Windows Samba shares are executable, this can become annoying very quickly. To change this:
Edit → Preferences → Behaviour → Executable Text Files → View executable text files when they are opened

Nemo keyboard shortcuts

By default, there is no keyboard shortcut to move files/directories from one pane to another (when working with multiple panes by pressing F3). A lot of other functions don't have keyboard shortcuts either.

The shortcuts are stored in ~/.gnome2/accels/nemo

Create the folder and edit this file and search for “Move to next pane” (or any other function you require. Remove the preceding semicolon and define the shortcut key. In this example, the shortcut will be set to CTRL+j;

(gtk_accel_path "<Actions>/DirViewActions/Move to next pane" "<Primary>j")

Restart nemo from the command line using

nemo -q

NOTE: Ensure not to use a shortcut already defined for something else!

Nemo Context Menus

Nemo supports custom context menus by simply creating a file in an 'actions' folder. Nemo does not need to be restarted to pick up any new or changed actions.

Global action scripts need to be placed in /usr/share/nemo/actions and user actions can be placed in ~/.local/share/nemo/actions/. File extension has to be .nemo_action.

A full description of the syntax is available in the sample file /usr/share/nemo/actions/sample.nemo_action

More examples can be found at https://wiki.archlinux.org/index.php/Nemo
The sample file is also here:

https://github.com/linuxmint/nemo/blob/master/files/usr/share/nemo/actions/sample.nemo_action

MP3 Tagging example scripts

mp3-lyrics.nemo_action
[Nemo Action]
Name=Add Lyrics to MP3s
Comment=Add Lyrics to MP3s
Exec=gnome-terminal -x sh -c "/home/wuff/getlyric/get_mp3_lyrics.py --sites genius.com --in_dir '%F' --write2tag"
Icon-Name=gtk-cdrom
Selection=s
Extensions=dir;
Quote=double
EscapeSpaces=true
mp3-lyrics-2.nemo_action
[Nemo Action]
Name=Add Lyrics to MP3s
Comment=Add Lyrics to MP3s
Exec=gnome-terminal -x sh -c "/home/wuff/getlyric/get_mp3_lyrics.py --sites genius.com --in_dir '%P' --write2tag"
Icon-Name=gtk-cdrom
Selection=none
Extensions=dir;
Quote=double
EscapeSpaces=true
beets_import_album.nemo_action
[Nemo Action]
Name=Import Album to Beets
Comment=Import Album to Beets
Exec=<beets_import_album.sh %F>
Icon-Name=gtk-cdrom
Selection=m
Extensions=dir;
#Quote=double
EscapeSpaces=true
Terminal=true
beets_import_album.sh
for var in "$@"
do
    folder=$(basename "$var")
    echo "Importing '$folder' into beets..."
    beet im "$var"
done
sleep 10
chmod 755 .local/share/nemo/actions/beets_import_album.sh

Nemo Performance

If opening folders with lots of images takes a long time, changes are a plugin is causing this:

disable the plugin “ChangeColorFolder+NemoPython” and restart nemo (nemo -q on command line) and start it again by opening any folder.

If opening folders with videos takes a long time, the thunbnailer for videos can be replaced with ffmpegthumbnailer which is faster (note that on updates of totem the config probably will be replaced):

sudo apt-get install ffmpegthumbnailer
cd /usr/share/thumbnailers/
sudo cp totem.thumbnailer totem.thumbnailer.original
sudo vi totem.thumbnailer

#replace line 2-3 with:
TryExec=/usr/bin/ffmpegthumbnailer
Exec=/usr/bin/ffmpegthumbnailer -s %s -i %i -o %o -c png -f

#exit nemo
nemo -q
config/nemo-performance.1600608369.txt.gz · Last modified: 2023/05/29 11:53 (external edit)