]> Sergey Matveev's repositories - nnn.git/commitdiff
fzopen - add option to open files in nuke
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 17 Jul 2021 15:02:01 +0000 (20:32 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 17 Jul 2021 15:34:53 +0000 (21:04 +0530)
plugins/README.md
plugins/fzopen
plugins/imgur
plugins/wallpaper

index 03a23baa125988df8b1910f9200ccbd25bcb41ae..0acef1d7f826a70c7fe6b222a2d179694f6cc9db 100644 (file)
@@ -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 |
index fa4121be4fcc531a914246a381a6a092a4e364af..52abc87d05450eaa8ef2bd71ba0744481e349e5c 100755 (executable)
@@ -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=""
index 4aa7a65ee9076f7ab24eedac5ce4f4131a211e53..373de0551609414c7ee78e311e6ef301973c1c30 100755 (executable)
@@ -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
 #
index deea19a6f2bb075b2247084b4532e140cf16a133..5940df1906d387c2a75998c40ef2e65e03a496cb 100755 (executable)
@@ -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