- [use cd .....](#use-cd-)
- [cd on quit](#cd-on-quit)
- [copy file path to clipboard](#copy-file-path-to-clipboard)
+ - [change dir color](#change-dir-color)
- [file copy, move, delete](#file-copy-move-delete)
- [boost chdir prompt](#boost-chdir-prompt)
- [set idle timeout](#set-idle-timeout)
- Jump HOME or to the last visited directory (as usual!)
- Jump to initial dir, chdir prompt, cd ..... (with . as PWD)
- Roll-over at edges, page through entries
- - Show directories in blue (default: enabled)
+ - Show directories in custom color (default: enabled in blue)
- Disk usage analyzer mode
- Search
- Filter directory contents with *search-as-you-type*
PATH directory to open [default: current dir]
optional arguments:
+ -c N specify dir color, disables if N>7
-e use exiftool instead of mediainfo
-i start in navigate-as-you-type mode
-l start in light mode (fewer details)
Start `nnn` and use <kbd>^K</kbd> to copy the absolute path (from `/`) of the file under the cursor to clipboard.
+#### change dir color
+
+The default color for directories is blue. Option `-c` accepts color codes from 0 to 7 to use a different color:
+
+0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white
+
+Any other value disables colored directories.
+
#### file copy, move, delete
`nnn` doesn't support file copy, move, delete inherently. However, it simplifies the workflow:
.Nm
supports the following options:
.Pp
+.Fl "c N"
+ specify dir color (default blue), disables if N>7
+ 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white
+.Pp
.Fl e
use exiftool instead of mediainfo
.Pp
static bm bookmark[MAX_BM];
static const double div_2_pow_10 = 1.0 / 1024.0;
static uint _WSHIFT = (sizeof(ulong) == 8) ? 3 : 2;
+static uchar color = 4;
/* Utilities to open files, run actions */
static char * const utils[] = {
curs_set(FALSE); /* Hide cursor */
start_color();
use_default_colors();
- init_pair(1, COLOR_BLUE, -1);
+ if (cfg.showcolor)
+ init_pair(1, color, -1);
timeout(1000); /* One second */
}
positional arguments:\n\
PATH directory to open [default: current dir]\n\n\
optional arguments:\n\
+ -c N specify dir color, disables if N>7\n\
-e use exiftool instead of mediainfo\n\
-i start in navigate-as-you-type mode\n\
-l start in light mode (fewer details)\n\
exit(1);
}
- while ((opt = getopt(argc, argv, "lSinep:vh")) != -1) {
+ while ((opt = getopt(argc, argv, "Slic:ep:vh")) != -1) {
switch (opt) {
case 'S':
cfg.blkorder = 1;
case 'i':
cfg.filtermode = 1;
break;
- case 'n':
- cfg.showcolor = 0;
+ case 'c':
+ color = (uchar)atoi(optarg);
+ if (color > 7)
+ cfg.showcolor = 0;
break;
case 'e':
metaviewer = utils[3];