aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Juan Adrián Castro Quintana <juacq97@gmail.com>2019-03-24 22:33:18 -0700
committerGravatar GitHub <noreply@github.com>2019-03-24 22:33:18 -0700
commit6c27098533344d8800c6ca5d632b2877f854f431 (patch)
tree65b134090fb8b674f4a6ccdeae38f358b353bda2 /scripts
parent21e259ecd491f62ab2971c3f7ae533ae82cb86dc (diff)
parent28ef959e7119e0ff8eed426f636f19744825e4dd (diff)
downloadnnn-6c27098533344d8800c6ca5d632b2877f854f431.tar.gz
Merge branch 'master' into add-kdeconnect
Diffstat (limited to 'scripts')
-rw-r--r--scripts/auto-completion/fish/nnn.fish2
-rw-r--r--scripts/auto-completion/zsh/_nnn2
-rw-r--r--scripts/nlay/README.md31
3 files changed, 33 insertions, 2 deletions
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/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.