Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
nnn as default file manager
nnn can be setup as your default file manager. The following procedure is tested on the XFCE4 desktop.
Create a script
nwrap with the necessary exports
$ cat /usr/local/bin/nwrap #!/bin/sh # If you use pywal, you need to restore the scheme here # (cat ~/.cache/wal/sequences &) export NNN_USE_EDITOR=1 export NNN_BMS="D:~/Downloads;v:~/Videos" export NNN_CONTEXT_COLORS="5236" export NNN_IDLE_TIMEOUT=900 export NNN_PLAIN_FILTER=1 export NNN_NOTE='/home/vaio/.note' export NNN_OPS_PROG=1 alias ncp="cat ~/.config/nnn/.selection | tr '\0' '\n'" # Start nnn with your preferred options nnn -isl "$@"
Make the script executable with
chmod +x nwrap and drop
nwrap in your
Create a script
nnnfm to invoke
nwrap in xfce4-terminal
$ cat /usr/local/bin/nnnfm #!/bin/sh xfce4-terminal -e "nwrap $@"
Make the script executable and drop
nnnfm in your
You can now optionally set a keybind to launch
nnnfm from your DE settings.
Create the nnn.desktop file
$ cat /usr/share/applications/nnn.desktop [Desktop Entry] Type=Application Name=nnn Comment=Launches the nnn file manager Icon=utilities-terminal Terminal=true Exec=nnnfm Categories=ConsoleOnly;System;FileTools;FileManager MimeType=inode/directory;
Now got to the preferred applications menu from Settings (or run
exo-preferred-applications -c) and select
nnnfm as your default file manager.
On a Tiling Window Manager
If you are using a Tiling Window Manager like
awesomewm you can launch
nnn with a keyboard shortcut.
- Create a
- Drop the script in your
- On the keyboard shortcuts section of your WM config file, you need to add a shortcut to launch
nwrap. Here's is an example for
sxhkd, you need to change
xfce4-terminalto the terminal you want to use:
# File Manager super + n xfce4-terminal -e "nwrap $@"