fzopen - add option to open files in nuke

This commit is contained in:
Arun Prakash Jana 2021-07-17 20:32:01 +05:30
parent e31f71285d
commit d54bc230f6
No known key found for this signature in database
GPG Key ID: A75979F35C080412
4 changed files with 11 additions and 3 deletions

View 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 |

View File

@ -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=""

View File

@ -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
#

View File

@ -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