| --- | --- |
| `NNN_BMS='d:~/Documents;D:~/Docs archive/'` | specify bookmarks (max 10) |
| `NNN_OPENER=mimeopen` | custom file opener |
-| `NNN_OPENER_DETACH=1` | do not block when invoking file opener |
| `NNN_CONTEXT_COLORS='1234'` | specify per context color [default: '4444' (all blue)] |
| `NNN_IDLE_TIMEOUT=300` | idle seconds before locking terminal [default: disabled] |
| `NNN_COPIER='/absolute/path/to/copier'` | system clipboard copier script [default: none] |
export NNN_OPENER=mimeopen
.Ed
.Pp
-\fBNNN_OPENER_DETACH:\fR do not block when invoking file opener.
-.Bd -literal
- export NNN_OPENER_DETACH=1
-.Ed
-.Pp
\fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
.Bd -literal
export NNN_CONTEXT_COLORS='1234'
static size_t g_tmpfplen;
static uchar g_crc;
static uchar BLK_SHIFT = 9;
-static uchar opener_flag = F_NOTRACE;
static bool interrupted = FALSE;
/* Retain old signal handlers */
#define NNN_NO_AUTOSELECT 9
#define NNN_RESTRICT_NAV_OPEN 10
#define NNN_RESTRICT_0B 11
-#define NNN_OPENER_DETACH 12
-#define NNN_TRASH 13
+#define NNN_TRASH 12
#ifdef __linux__
-#define NNN_OPS_PROG 14
+#define NNN_OPS_PROG 13
#endif
static const char * const env_cfg[] = {
"NNN_NO_AUTOSELECT",
"NNN_RESTRICT_NAV_OPEN",
"NNN_RESTRICT_0B",
- "NNN_OPENER_DETACH",
"NNN_TRASH",
#ifdef __linux__
"NNN_OPS_PROG",
}
/* Invoke desktop opener as last resort */
- spawn(opener, newpath, NULL, NULL, opener_flag);
+ spawn(opener, newpath, NULL, NULL, F_NOTRACE | F_NOWAIT);
continue;
}
default:
/* Get custom opener, if set */
opener = xgetenv(env_cfg[NNN_OPENER], utils[OPENER]);
- if (xgetenv_set(env_cfg[NNN_OPENER_DETACH]))
- opener_flag |= F_NOWAIT;
DPRINTF_S(opener);
/* Parse bookmarks string */
}
if (S_ISREG(sb.st_mode)) {
- spawn(opener, initpath, NULL, NULL, opener_flag);
+ spawn(opener, initpath, NULL, NULL, F_NOTRACE | F_NOWAIT);
return 0;
}
}