aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/.cbcp16
-rwxr-xr-xplugins/.nmv2
-rw-r--r--plugins/.nnn-plugin-helper2
-rwxr-xr-xplugins/chksum2
-rwxr-xr-xplugins/diffs2
-rwxr-xr-xplugins/dragdrop2
-rwxr-xr-xplugins/kdeconnect8
-rwxr-xr-xplugins/mocplay2
-rwxr-xr-xplugins/renamer2
-rwxr-xr-xplugins/splitjoin2
-rwxr-xr-xplugins/x2sel4
11 files changed, 22 insertions, 22 deletions
diff --git a/plugins/.cbcp b/plugins/.cbcp
index 022e88a..8830e90 100755
--- a/plugins/.cbcp
+++ b/plugins/.cbcp
@@ -19,27 +19,27 @@
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" # protect trailing \n
-SELECTION=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
if which xsel >/dev/null 2>&1; then
# Linux
- tr '\0' '\n' < "$SELECTION" | xsel -bi
+ tr '\0' '\n' < "$selection" | xsel -bi
elif which xclip >/dev/null 2>&1; then
# Linux
- tr '\0' '\n' < "$SELECTION" | xclip -sel clip
+ tr '\0' '\n' < "$selection" | xclip -sel clip
elif which pbcopy >/dev/null 2>&1; then
# macOS
- tr '\0' '\n' < "$SELECTION" | pbcopy
+ tr '\0' '\n' < "$selection" | pbcopy
elif which termux-clipboard-set >/dev/null 2>&1; then
# Termux
- tr '\0' '\n' < "$SELECTION" | termux-clipboard-set
+ tr '\0' '\n' < "$selection" | termux-clipboard-set
elif which clip.exe >/dev/null 2>&1; then
# WSL
- tr '\0' '\n' < "$SELECTION" | clip.exe
+ tr '\0' '\n' < "$selection" | clip.exe
elif which clip >/dev/null 2>&1; then
# Cygwin
- tr '\0' '\n' < "$SELECTION" | clip
+ tr '\0' '\n' < "$selection" | clip
elif which wl-copy >/dev/null 2>&1; then
# Wayland
- tr '\0' '\n' < "$SELECTION" | wl-copy
+ tr '\0' '\n' < "$selection" | wl-copy
fi
diff --git a/plugins/.nmv b/plugins/.nmv
index 023328d..7762546 100755
--- a/plugins/.nmv
+++ b/plugins/.nmv
@@ -21,7 +21,7 @@ TMPDIR="${TMPDIR:-/tmp}"
INCLUDE_HIDDEN="${INCLUDE_HIDDEN:-0}"
VERBOSE="${VERBOSE:-0}"
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
exit_status=0
dst_file=$(mktemp "$TMPDIR/.nnnXXXXXX")
diff --git a/plugins/.nnn-plugin-helper b/plugins/.nnn-plugin-helper
index a42ee69..06b3bcb 100644
--- a/plugins/.nnn-plugin-helper
+++ b/plugins/.nnn-plugin-helper
@@ -5,7 +5,7 @@
# Shell: POSIX compliant
# Author: Anna Arad
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
export selection
## Set CUR_CTX to 1 to open directory in current context
diff --git a/plugins/chksum b/plugins/chksum
index 0c13da2..1514de7 100755
--- a/plugins/chksum
+++ b/plugins/chksum
@@ -14,7 +14,7 @@
# Shell: POSIX compliant
# Author: ath3, Arun Prakash Jana
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
resp=f
chsum=md5
diff --git a/plugins/diffs b/plugins/diffs
index ff85aa8..294c5e7 100755
--- a/plugins/diffs
+++ b/plugins/diffs
@@ -10,7 +10,7 @@
# Shell: POSIX compliant
# Authors: Arun Prakash Jana, ath3
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
if which nvim >/dev/null 2>&1; then
diffcmd="nvim -d"
diff --git a/plugins/dragdrop b/plugins/dragdrop
index bbbd19e..bc01d87 100755
--- a/plugins/dragdrop
+++ b/plugins/dragdrop
@@ -13,7 +13,7 @@
# Shell: POSIX compliant
# Author: 0xACE
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
resp=f
all=
if which dragon-drag-and-drop >/dev/null 2>&1; then
diff --git a/plugins/kdeconnect b/plugins/kdeconnect
index 9ee2e60..f1cfd95 100755
--- a/plugins/kdeconnect
+++ b/plugins/kdeconnect
@@ -5,13 +5,13 @@
# Shell: POSIX compliant
# Author: juacq97
-SELECTION=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
id=$(kdeconnect-cli -a --id-only | awk '{print $1}')
-if [ "$(find "$SELECTION")" ]; then
- kdeconnect-cli -d "$id" --share "$(cat "$SELECTION")"
+if [ "$(find "$selection")" ]; then
+ kdeconnect-cli -d "$id" --share "$(cat "$selection")"
# If you want a system notification, uncomment the next 3 lines.
-# notify-send -a "Kdeconnect" "Sending $(cat "$SELECTION")"
+# notify-send -a "Kdeconnect" "Sending $(cat "$selection")"
#else
# notify-send -a "Kdeconnect" "No file selected"
fi
diff --git a/plugins/mocplay b/plugins/mocplay
index 6f5a2a0..5db44b9 100755
--- a/plugins/mocplay
+++ b/plugins/mocplay
@@ -12,7 +12,7 @@
# Author: Arun Prakash Jana, ath3
IFS="$(printf '\n\r')"
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
cmd=$(pgrep -x mocp 2>/dev/null)
ret=$cmd
diff --git a/plugins/renamer b/plugins/renamer
index 8ea2d92..4c15764 100755
--- a/plugins/renamer
+++ b/plugins/renamer
@@ -12,7 +12,7 @@
# Shell: POSIX compliant
# Author: José Neder
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
if command -v qmv >/dev/null 2>&1; then
batchrenamesel="qmv -fdo -da"
diff --git a/plugins/splitjoin b/plugins/splitjoin
index fcd49de..545eadb 100755
--- a/plugins/splitjoin
+++ b/plugins/splitjoin
@@ -8,7 +8,7 @@
# Shell: POSIX compliant
# Authors: Arun Prakash Jana, ath3
-selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
resp=s
if [ -s "$selection" ]; then
diff --git a/plugins/x2sel b/plugins/x2sel
index 3113773..79856eb 100755
--- a/plugins/x2sel
+++ b/plugins/x2sel
@@ -16,7 +16,7 @@
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" # protect trailing \n
-SELECTION=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
+selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
getclip () {
@@ -54,4 +54,4 @@ for file in $CLIPBOARD ; do
fi
done
-printf "%s" "$CLIPBOARD" | tr '\n' '\0' > "$SELECTION"
+printf "%s" "$CLIPBOARD" | tr '\n' '\0' > "$selection"