aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/imgsxiv
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-11-22 17:51:13 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-11-22 17:51:13 +0530
commit594d645e259083b217518ef0507edfe5395711af (patch)
tree531fcf59d50287011797fd3179258379b0376622 /plugins/imgsxiv
parent085bda03305ffd5cb502743a06ac6b2513b7234e (diff)
downloadnnn-594d645e259083b217518ef0507edfe5395711af.tar.gz
Rename plugins, group related ones
Diffstat (limited to 'plugins/imgsxiv')
-rwxr-xr-xplugins/imgsxiv20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/imgsxiv b/plugins/imgsxiv
new file mode 100755
index 0000000..1fe81b7
--- /dev/null
+++ b/plugins/imgsxiv
@@ -0,0 +1,20 @@
+#!/usr/bin/env sh
+
+# Description: Open images in hovered directory and thumbnails
+# open hovered image in sxiv and browse other images in the directory
+#
+# Shell: POSIX compliant
+# Author: Arun Prakash Jana
+
+if command -v sxiv >/dev/null 2>&1; then
+ if ! [ -z "$1" ]; then
+ if [ -f "$1" ]; then
+ sxiv -q "$PWD"
+ elif [ -d "$1" ] || [ -h "$1" ]; then
+ sxiv -qt "$1"
+ fi
+ fi
+else
+ echo "sxiv missing"
+ read -r _
+fi