- Change directory at exit (*easy* shell integration)
- Open any file in EDITOR (fallback vi) or PAGER (fallback less)
- Open current directory in a custom GUI file manager
- - Terminal screensaver/locker (default vlock, customizable) integration
+ - Terminal screensaver/locker integration
- Unicode support
- Highly optimized code, minimal resource usage
| gnome-search-tool, catfish | desktop search utility |
| atool, patool ([integration](#integrate-patool)) | create, list and extract archives |
| vidir from moreutils | batch rename, move, delete dir entries |
-| vlock (Linux) | terminal locker |
+| vlock (Linux), bashlock (OS X), lock (BSD) | terminal locker |
| $EDITOR ($VISUAL, if defined) | edit files (fallback vi) |
| $PAGER | page through files (fallback less) |
| $SHELL | spawn a shell, run script (fallback sh) |
#--------------- SCREENSAVER ----------------
elif [ "$2" == "screensaver" ]; then
- app=vlock
+ app=("vlock"
+ "bashlock"
+ "lock")
- #opts=
-
- #bg=">/dev/null 2>&1 &"
-
- type -P $app &>/dev/null &&
- eval $app $opts $bg
+for index in ${!app[@]}
+do
+ type -P ${app[$index]} &>/dev/null &&
+ eval ${app[$index]} &&
exit 0
+done
#------------------ SCRIPT ------------------
elif [ "$2" == "script" ]; then
.Nm
is shipped with \fInnn\fR to deliver a level of flexibility to users to choose their own apps when running some actions, run some commands or custom scripts. It has provisions to handle text files too. However, the capability is not used in the latest releases. Now
.Nm
-is invoked to run a desktop search utility (\fIgnome-search-tool\fR or \fIcatfish\fR in the same order of priority) or screen locker (\fIvlock\fR, Linux-only). However,
+is invoked to run a desktop search (\fIgnome-search-tool\fR or \fIcatfish\fR) or screen locker (\fIvlock\fR or \fIbashlock\fR or \fIlock\fR) utility. However,
.Nm
can run independently and can be highly customized for personal usage.
.Pp
"d^Y | Toggle multi-copy\n"
"d^T | Toggle path quote\n"
"d^L | Redraw, clear prompt\n"
-#ifdef __linux__
"eL | Lock terminal\n"
-#endif
"e? | Help, settings\n"
"aQ, ^G | Quit and cd\n"
"aq, ^X | Quit\n\n"};
run = editor ? editor : xgetenv("EDITOR", "vi");
spawn(run, dents[cur].name, NULL, path, F_NORMAL);
break;
-#ifdef __linux__
case SEL_LOCK:
spawn(player, "", "screensaver", NULL, F_NORMAL | F_SIGINT);
break;
-#endif
case SEL_CDQUIT:
{
tmp = getenv("NNN_TMPFILE");
SEL_RUN,
SEL_RUNSCRIPT,
SEL_RUNARG,
-#ifdef __linux__
SEL_LOCK,
-#endif
SEL_CDQUIT,
SEL_QUIT,
};
/* Run command with argument */
{ 'e', SEL_RUNARG, "", "VISUAL" },
{ 'p', SEL_RUNARG, "less", "PAGER" },
-#ifdef __linux__
/* Lock screen */
{ 'L', SEL_LOCK, "", "" },
-#endif
/* Change dir on quit */
{ 'Q', SEL_CDQUIT, "", "" },
{ CONTROL('G'), SEL_CDQUIT, "", "" },