- This topic has 7 replies, 4 voices, and was last updated Nov 28-3:33 am by Anonymous.
-
AuthorPosts
-
November 25, 2021 at 3:27 am #71703
Anonymous
Good Day Folks,
This is not an Antix problem, but maybe more a Linux issue or NNN issue, but I hope one of you can help figure out what it is?
So in my .bashrc file I have a few lines that include some NNN configs, one example is
export NNN_TRASH=1 export NNN_USE_EDITOR="nano" export NNN_COLORS="1235"Here is the weird part.
1) If I launch NNN from a terminal, the configs load
2) If I launch NNN from a keybinding, the .bashrc configs aren’t loaded.Is there any way to change the keybinding that it forces to load .bashrc before opening NNN?
Thanks
- This topic was modified 1 year, 5 months ago by christophe. Reason: solved
November 25, 2021 at 1:17 pm #71708Moderator
christophe
::This looks promising. The Arch wiki talks about that being a known potential situation:
https://wiki.archlinux.org/title/Nnnand a follow-up link, referred-to in the first:
https://github.com/jarun/nnn/wiki/Advanced-use-cases#desktop-integration- This reply was modified 1 year, 5 months ago by christophe.
confirmed antiX frugaler, since 2019
November 25, 2021 at 1:47 pm #71710Moderator
christophe
::In particular, from the 2nd link above:
On a bare X window manager (i3wm, bspwm, awesomewm …)
On the keyboard shortcuts section of your WM config file, you need to add a shortcut to launch nnn in a terminal. Here’s is an example for sxhkd, you need to change xfce4-terminal to the terminal you want to use:
## File Manager
super + n
xfce4-terminal -e “nwrap $*”confirmed antiX frugaler, since 2019
November 25, 2021 at 5:55 pm #71726Member
Xecure
::I think you can force .bashrc to load before any window manager or startup process by appending
. $HOME/.bashrc
at the end, inside the file ~/.desktop-session/desktop-session.confTry it out and if it doesn’t work, remove said line from the file.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.November 26, 2021 at 3:40 pm #71770Anonymous
::Hi Xecure, thanks for the suggestion, it didn’t work 🙁 It looked like a very elegant solution, but didn’t solve my problem
November 26, 2021 at 3:42 pm #71771Anonymous
::Hi cristophe, this looks like a solution, I just have to figure out how to perform the fixes suggested by Arch wiki.
I was also looking at explicitly loading bash before executing the ‘nnn -d’ command, but have failed thus far. Looks like a script is the only way to go?
November 26, 2021 at 7:51 pm #71779ModeratorBobC
::fatboy, I just did this from /home/demo on a flashdrive. Maybe it includes good features that I don’t know about. To compare, try Midnight Commander, which antiX comes with already installed.
To get nnn to work from IceWM menu or toolbar, add line below, save, and then restart icewm:
prog "NNN File Manager" /usr/share/icons/papirus-antix/48x48/apps/file-manager.png x-terminal-emulator -e /home/demo/.icewm/nwrapTo assign to Super+n add line below to keys file, and then restart icewm
## File Manager key "Super+n" x-terminal-emulator -e /home/demo/.icewm/nwrapAdd nwrap file and chmod +x
#!/bin/sh ### USAGE: prog "NNN File Manager" /usr/share/icons/papirus-antix/48x48/apps/file-manager.png x-terminal-emulator -e /home/demo/.icewm/nwrap # If you use pywal, you need to restore the scheme here # (cat ~/.cache/wal/sequences &) export NNN_BMS="D:$HOME/Downloads;v:$HOME/Videos" export NNN_COLORS="5236" alias nsel="cat ${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection | tr '\0' '\n'" export NNN_TRASH=1 export NNN_USE_EDITOR="nano" export NNN_COLORS="1235" # To use a CLI opener, specify the <code>-c</code> option to <code>nnn</code> # export NNN_OPENER="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke" # Unmask ^Q (if required, see <code>stty -a</code>) to Quit nnn stty start undef stty stop undef # Start nnn with your preferred options nnn "$@"- This reply was modified 1 year, 5 months ago by BobC. Reason: add keys entry
November 28, 2021 at 3:33 am #71837Anonymous
::Hi BobC,
I am familiar with mc, it is a very good application, but nnn I use to quickly access and browse files. mc I use for file transfers mostly.
You solution worked like a charm! Thanks! Now all my nnn configs load before I launch nnn. Awesome!
This is solved!
-
AuthorPosts
- You must be logged in to reply to this topic.