Removed file manager and desktop search keys.
Both can be launched with launcher key.
- Numeric order (1, 2, ... 10, 11, ...) for numeric names
- Search
- Superfast directory content filtering with *search-as-you-type*
- - Desktop search (gnome-search-tool, catfish) integration
- Mimes
- Open with desktop opener (default) or specify a custom app
- Create, list and extract archives (needs atool/patool)
- Copy absolute file paths with quotes
- 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
+ - GUI app launcher
- Terminal screensaver/locker integration
- Unicode support
- Highly optimized code, minimal resource usage
^L Redraw, clear prompt
Esc Exit prompt
L Lock terminal
- o Open DE filemanager
- ^/ Open DE search app
+ o Launch GUI app
? Help, settings
Q, ^G Quit and cd
q, ^X Quit
| --- | --- |
| xdg-open (Linux), open(1) (OS X), cygstart (Cygwin) | desktop opener |
| mediainfo, exiftool | multimedia file details |
-| 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), bashlock (OS X), lock(1) (BSD) | terminal locker |
- To edit all text files in EDITOR (preferably CLI, fallback vi):
export NNN_USE_EDITOR=1
-- To enable the desktop file manager key, set `NNN_DE_FILE_MANAGER`. E.g.:
- export NNN_DE_FILE_MANAGER=thunar
- export NNN_DE_FILE_MANAGER=nautilus
-
-Customizable script [nlay](https://github.com/jarun/nnn/wiki/all-about-nlay) is used to run desktop search utility and terminal locker.
+Customizable script [nlay](https://github.com/jarun/nnn/wiki/all-about-nlay) is used to run terminal locker.
#### Help
Change to the last visited directory
.It Ic /
Change filter (more information below)
-.It Ic ^/
-Search directory in desktop search tool
.It Ic \&.
Toggle show hidden . (dot) files
.It Ic ^B
Run a custom script
.It Ic e
Open current entry in EDITOR (fallback vi)
-.It Ic o
-Open directory in NNN_DE_FILE_MANAGER
.It Ic p
Open current entry in PAGER (fallback less)
.It Ic f
Exit prompt
.It Ic L
Lock terminal (Linux only)
+.It Ic o
+Launch a GUI application
.It Ic \&?
Toggle help and settings screen
.It Ic Q, ^G
export NNN_USE_EDITOR=1
.Ed
.Pp
-\fBNNN_DE_FILE_MANAGER:\fR set to a desktop file manager to open the current
-directory with. E.g.:
-.Bd -literal
- export NNN_DE_FILE_MANAGER=thunar
-.Ed
-.Pp
\fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal
screensaver.
.Pp
static char *player;
static char *copier;
static char *editor;
-static char *dmanager; /* desktop file manager */
static blkcnt_t ent_blocks;
static blkcnt_t dir_blocks;
static ulong num_files;
"d^L Redraw, clear prompt\n"
"cEsc Exit prompt\n"
"eL Lock terminal\n"
- "eo Open DE filemanager\n"
- "d^/ Open DE search app\n"
+ "eo Launch GUI app\n"
"e? Help, settings\n"
"aQ, ^G Quit and cd\n"
"aq, ^X Quit\n\n"};
if (editor)
dprintf(fd, "NNN_USE_EDITOR: %s\n", editor);
- if (dmanager)
- dprintf(fd, "NNN_DE_FILE_MANAGER: %s\n", dmanager);
if (idletimeout)
dprintf(fd, "NNN_IDLE_TIMEOUT: %d secs\n", idletimeout);
if (copier)
goto begin;
}
goto nochange;
- case SEL_SEARCH:
- spawn(player, path, "search", NULL, F_NORMAL);
- break;
case SEL_TOGGLEDOT:
cfg.showhidden ^= 1;
initfilter(cfg.showhidden, &ifilter);
goto begin;
}
break;
- case SEL_DFB:
- if (!dmanager) {
- printmsg("set NNN_DE_FILE_MANAGER");
- goto nochange;
- }
-
- spawn(dmanager, path, NULL, path, F_NOWAIT | F_NOTRACE);
- break;
case SEL_FSIZE:
cfg.sizeorder ^= 1;
cfg.mtimeorder = 0;
case SEL_ARCHIVE:
if (!ndents)
break; // fallthrough
+ case SEL_LAUNCH: // fallthrough
case SEL_NEW:
if (sel == SEL_OPEN)
tmp = xreadline(NULL, "open with: ");
+ else if (sel == SEL_LAUNCH)
+ tmp = xreadline(NULL, "launch: ");
else if (sel == SEL_ARCHIVE)
tmp = xreadline(dents[cur].name, "name: ");
else
continue;
}
+ if (sel == SEL_LAUNCH) {
+ spawn(tmp, NULL, NULL, path, F_NOWAIT | F_NOTRACE);
+ break;
+ }
+
if (sel == SEL_ARCHIVE) {
/* newpath is used as temporary buffer */
if (!get_output(newpath, PATH_MAX, "which", utils[APACK], NULL, 0)) {
if (!player)
player = utils[NLAY];
- /* Get the desktop file manager, if set */
- dmanager = getenv("NNN_DE_FILE_MANAGER");
-
/* Get screensaver wait time, if set; copier used as tmp var */
copier = getenv("NNN_IDLE_TIMEOUT");
if (copier) {
SEL_VISIT,
SEL_FLTR,
SEL_MFLTR,
- SEL_SEARCH,
SEL_TOGGLEDOT,
SEL_DETAIL,
SEL_STATS,
SEL_MEDIA,
SEL_FMEDIA,
- SEL_DFB,
+ SEL_LAUNCH,
SEL_ARCHIVE,
SEL_LIST,
SEL_EXTRACT,
/* Toggle filter mode */
{ KEY_IC, SEL_MFLTR, "", "" },
{ CONTROL('I'), SEL_MFLTR, "", "" },
- /* Desktop search */
- { CONTROL('_'), SEL_SEARCH, "", "" },
/* Toggle hide .dot files */
{ '.', SEL_TOGGLEDOT, "", "" },
/* Detailed listing */
{ 'm', SEL_MEDIA, NULL, "" },
/* Show media info full, run is hacked */
{ 'M', SEL_FMEDIA, "-f", "" },
- /* Open dir in desktop file manager */
- { 'o', SEL_DFB, "", "" },
+ /* Launch a GUI application */
+ { 'o', SEL_LAUNCH, "", "" },
/* Create archive */
{ 'f', SEL_ARCHIVE, "", "" },
/* List archive */