commit d54bc230f67a02130296fc6196f92dd331430144
parent e31f71285d42052e8b90ec5765b8a8a3f0c5d360
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date: Sat, 17 Jul 2021 20:32:01 +0530
fzopen - add option to open files in nuke
Diffstat:
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/plugins/README.md b/plugins/README.md
@@ -32,7 +32,7 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina
| [getplugs](getplugs) | Update plugins to installed `nnn` version | sh | curl |
| [gpg\*](gpg\*) | Encrypt/decrypt files using GPG [✓] | sh | gpg |
| [gutenread](gutenread) | Browse, download, read from Project Gutenberg | sh | curl, unzip, w3m<br>[epr](https://github.com/wustho/epr) (optional) |
-| [imgresize](imgresize) | Resize images in dir to screen resolution | sh | [imgp](https://github.com/jarun/imgp) |
+| [imgresize](imgresize) | Batch resize images in dir to screen resolution | sh | [imgp](https://github.com/jarun/imgp) |
| [imgur](imgur) | Upload an image to imgur (from [imgur-screenshot](https://github.com/jomo/imgur-screenshot)) | bash | - |
| [imgview](imgview) | View (thumbnail)images, set wallpaper, [rename](https://github.com/jarun/nnn/wiki/Basic-use-cases#browse-rename-images) and [more](https://wiki.archlinux.org/index.php/Sxiv#Assigning_keyboard_shortcuts)| sh | _see in-file docs_ |
| [ipinfo](ipinfo) | Fetch external IP address and whois information | sh | curl, whois |
diff --git a/plugins/fzopen b/plugins/fzopen
@@ -17,6 +17,9 @@
# Shell: POSIX compliant
# Author: Arun Prakash Jana
+NUKE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke"
+USE_NUKE=0
+
. "$(dirname "$0")"/.nnn-plugin-helper
if type fzf >/dev/null 2>&1; then
@@ -51,6 +54,11 @@ if [ "$3" ]; then
exit 0
fi
+if [ "$USE_NUKE" -ne 0 ]; then
+ "$NUKE" "$entry"
+ exit 0
+fi
+
# Open the file (works for a single file only)
cmd_file=""
cmd_open=""
diff --git a/plugins/imgur b/plugins/imgur
@@ -28,7 +28,7 @@
##########################################################################
# https://github.com/jomo/imgur-screenshot
-# https://imgur.com/tools
+# https://help.imgur.com/hc/en-us/articles/209592766-Tools-for-Imgur
#
# Slightly modified for `nnn` integration
#
diff --git a/plugins/wallpaper b/plugins/wallpaper
@@ -14,7 +14,7 @@ if [ -n "$1" ]; then
elif type wal >/dev/null 2>&1; then
wal -i "$1"
else
- printf "nitrogen ir pywal missing"
+ printf "nitrogen or pywal missing"
read -r _
fi