Closed juacq97 closed 5 years ago
Please share the steps how you run nnn
using a keyboard shortcut.
I'm ussing bspwm
, so, in the sxhkdrc
I have this:
#File Manager
super + f
termite -e nnn
Then I press super + f
and a terminal window with nnn running appears. If I press q
the window closes.
I tried with rofi
, in the run mode running termite -e nnn
and I have the same issue. I tried with urxvt
too, and nothing changes, the export
variables doesn't load.
You need an executable wrapper script which your terminal has to execute instead of calling nnn
directly.
$ cat nwrap
#!/usr/bin/env fish
export NNN_USE_EDITOR=1
export NNN_BMS="D:~/Downloads;n:~/GitHub/nnn;v:~/Videos;"
export NNN_CONTEXT_COLORS="1234"
export NNN_IDLE_TIMEOUT=900
export NNN_SCRIPT=/home/vaio/Downloads/packages/user-scripts
export NNN_PLAIN_FILTER=1
export NNN_NOTE='/home/vaio/.note'
export NNN_OPS_PROG=1
alias ncp="cat ~/.nnncp | tr '\0' '\n'"
export NNN_TMPFILE=/tmp/nnn
function n
nnn -isl $argv
if test -e "$NNN_TMPFILE"
source "$NNN_TMPFILE"
rm "$NNN_TMPFILE"
end
end
n
Here's my command to start:
xfce4-terminal -e ./nwrap
Please feel free to award a star to the project and make a small donation if your budget permits. ;)
I have added a wiki page to setup nnn
as the default file manager - https://github.com/jarun/nnn/wiki/nnn-as-default-file-manager
Can you please test this and confirm if it works? If you think something is missing OR something else works feel free to update the wiki page. It's editable for all now.
It works very well, I added a small section destined to be used in Tiling Window Manager and added a line to restore pywal if you use it, because when you start a TUI application outside the terminal, the color schemes are not loaded.
Sure! Thanks!
When I run nnn from a keyboard shortcut, in my case,
super + f
executestermite -e nnn
, then weird things happens. The files doesn't open with thexdg-open
default and theexport
options seems doesn't load. If I runnnn
normally from a terminal, all works normally. Any idea of how ,solve this? Thanks.