From f38692e96864a155a44c8a7dd9d223032066d558 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sun, 17 Mar 2019 21:59:36 +0530 Subject: Add readme on nlay --- scripts/nlay/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scripts/nlay/README.md (limited to 'scripts') diff --git a/scripts/nlay/README.md b/scripts/nlay/README.md new file mode 100644 index 0000000..4671eec --- /dev/null +++ b/scripts/nlay/README.md @@ -0,0 +1,31 @@ +## nlay + +`nlay` (*NnnpLAY*) is a customizable media type or action handler + +### Usage + +`nlay` is not used by `nnn` now. However, the bash script can be used to run desktop search utility or screensaver: + + nlay file type + file: absolute path to file ("" for an action) + type: type of media or action + +### Default apps + +* gnome-search-tool, catfish - file search +* vlock - terminal screensaver (alternatives - cmatrix, termsaver) + +### Perks + +- simple to modify (extensive in-file notes, comments and indicative code) +- handle files by category (e.g. plaintext, search, screensaver) +- support for multiple apps by order of preference +- run app in the foreground or silently detached in the background +- optionally add app arguments + +### Tips to modify + +- set `app=` in any category to change the player +- set `opts=` to use app options +- toggle `bg=` to enable or disable running app silently (`stdout` and `stderr` redirected to `/dev/null`) in background. E.g., vim (CLI) should be verbose and in the foreground while Sublime Text (GUI) can be started silently in the background. +- enable the commented out code under `ENABLE_FILE_TYPE_HANDLING` to handle specific file extensions e.g. use a different app than the one used for the category. -- cgit v1.2.3-70-g09d2 From 10c8344fbd91fe24063d1a700f7a4b2a2d35426e Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Wed, 20 Mar 2019 09:14:39 +0530 Subject: Update docs --- README.md | 5 +++-- nnn.1 | 4 ++-- scripts/auto-completion/fish/nnn.fish | 2 +- scripts/auto-completion/zsh/_nnn | 2 +- src/nnn.c | 2 +- src/nnn.h | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/README.md b/README.md index 54861b4..f18cf37 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ It supports as many scripts as you need! Integrate utilities like sxiv (view ima - File picker, vim (or neovim) plugin - Navigation - *Navigate-as-you-type* with auto-select directory + - *Wild load* for *navigate-as-you-type* - 4 contexts (_aka_ tabs _aka_ workspaces) - Bookmarks; pin and visit a directory - Familiar, easy shortcuts (arrows, ~, -, @) @@ -213,7 +214,7 @@ optional args: -s string filters [default: regex] -S du mode -v show version - -w wild mode + -w wild load -h show help ``` @@ -339,7 +340,7 @@ When there's a unique match and it's a directory, `nnn` auto selects the directo This mode takes navigation to the next level when short, unique keypress sequences are possible. For example, to reach `nnn` development directory (located at `~/GitHub/nnn`) from my `$HOME` (which is the default directory the terminal starts in), I use the sequence gn. -The **_wild mode_** program option can be extremely handy for users who use this mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode. +The **_wild load_** option can be extremely handy for users who use this mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode. #### File indicators diff --git a/nnn.1 b/nnn.1 index bda63a7..f442eb2 100644 --- a/nnn.1 +++ b/nnn.1 @@ -68,7 +68,7 @@ supports the following options: show version and exit .Pp .Fl w - wild mode - entries unsorted on directory load + wild load - entries unsorted on directory load .Pp .Fl h show program help and exit @@ -119,7 +119,7 @@ allowing continuous navigation. Works best with the \fBarrow keys\fR. .br When there's a unique match and it's a directory, `nnn` auto selects the directory and enters it in this mode. .br -The \fIwild mode\fR can be extremely handy for users who use the \fInavigate-as-you-type\fR mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode. +The \fIwild load\fR option can be extremely handy for users who use the \fInavigate-as-you-type\fR mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode. .Sh SELECTION MODE The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if NNN_COPIER is set (see ENVIRONMENT section below). diff --git a/scripts/auto-completion/fish/nnn.fish b/scripts/auto-completion/fish/nnn.fish index 59182b5..02f8024 100644 --- a/scripts/auto-completion/fish/nnn.fish +++ b/scripts/auto-completion/fish/nnn.fish @@ -16,4 +16,4 @@ complete -c nnn -s p -r -d 'copy selection to file' complete -c nnn -s s -d 'use substring match for filters' complete -c nnn -s S -d 'start in disk usage analyzer mode' complete -c nnn -s v -d 'show program version and exit' -complete -c nnn -s w -d 'wild mode' +complete -c nnn -s w -d 'wild load' diff --git a/scripts/auto-completion/zsh/_nnn b/scripts/auto-completion/zsh/_nnn index bda285b..20a313f 100644 --- a/scripts/auto-completion/zsh/_nnn +++ b/scripts/auto-completion/zsh/_nnn @@ -20,7 +20,7 @@ args=( '(-s)-s[use substring match for filters]' '(-S)-S[start in disk usage analyzer mode]' '(-v)-v[show program version and exit]' - '(-w)-w[wild mode]' + '(-w)-w[wild load]' '*:filename:_files' ) _arguments -S -s $args diff --git a/src/nnn.c b/src/nnn.c index 88656ad..a952514 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -3940,7 +3940,7 @@ static void usage(void) " -s string filters [default: regex]\n" " -S du mode\n" " -v show version\n" - " -w wild mode\n" + " -w wild load\n" " -h show help\n\n" "v%s\n%s\n", __func__, VERSION, GENERAL_INFO); } diff --git a/src/nnn.h b/src/nnn.h index 3c4b909..2104ede 100644 --- a/src/nnn.h +++ b/src/nnn.h @@ -185,7 +185,7 @@ static struct key bindings[] = { { CONTROL('J'), SEL_BSIZE }, /* Toggle sort by time */ { 't', SEL_MTIME }, - /* Wild mode */ + /* Wild load */ { CONTROL('W'), SEL_WILD }, /* Redraw window */ { CONTROL('L'), SEL_REDRAW }, -- cgit v1.2.3-70-g09d2