Move files fast with Nautilus and dmenu.
dmenu_move is a Nautilus script, i.e. a custom scripted action for Nautilus, the file manager under GNOME.
It allows user to move all selected files to a destination from a user-defined list.
The destination selection is achieved through dmenu from suckless.org.
An accompanying script, dmenu_go, allows to open a new Nautilus window to one of destination in the same list.
For more context, read the accompanying blog post.
Drop dmenu_move in folder ~/.local/share/nautilus/scripts/
.
Make it executable:
$ chmod 755 ~/.local/share/nautilus/scripts/dmenu_move
Then to bind a keyboard shortcut to the script, create or edit ~/.config/nautilus/scripts-accels
with a line like:
<Control>m dmenu_move
Restart nautilus for changes to take effect:
$ nautilus -q
You can also optionally install dmenu_go in your user PATH. We recommend dropping it in ~/.local/bin/
.
Make it executable:
$ chmod 755 ~/.local/bin/dmenu_go
Associate it to a keyboard shortcut. Go to Settings
> Keyboard Shortcuts
, all the way down and click on the +
to add a custom shortcut.
Just select any number of files in nautilus and press the keyboard shortcut configured in ~/.config/nautilus/scripts-accels
.
You will be prompted for a destination.
If the destination is unreachable, an error message will be displayed.
Otherwise files will be moved there.
In case of mistake, last operation can be reverted by calling dmenu_move with the special UNDO
destination.
If you also installed dmenu_go, you can press its shortcut anytime to select a destination to spawn a new Nautilus window to.
You must define a list of alias / location couples in file ~/.config/dmenu_move_bookmarks.set
.
Here is an example minimal configuration:
# standard stuff
home ~
documents ~/Documents
desktop ~/Desktop
music ~/Music
pictures ~/Pictures
videos ~/Videos
# standard config folders
fonts ~/.fonts
home-bin ~/.local/bin
# specific config folders
conf/emacs ~/.emacs.d
conf/chromium ~/.config/chromium/Default
- bash
- awk
- sed
- dmenu (from package
suckless-tools
on Debian-based systems) - GNOME / Nautilus (obviously)
This documentation only talks about GNOME 3.
But this script was originally made for GNOME 2. So I assume it should work just fine under MATE.
awk is used to parse configuration file and remove.
sed is used for handling special characters.
dmenu prompts the user for destination folder selection.
In case of error, notify-send will create a popup.