aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sxiv
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-11-19 21:01:59 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-11-19 21:01:59 +0530
commit9729b1f5a60d612e173695f3e3a997a44f5d7a94 (patch)
treea4306cebd3b86168e8302869bee761cacaa46cd6 /plugins/sxiv
parent97e16364bb52a8132254b08fc95ab5a094ec9537 (diff)
downloadnnn-9729b1f5a60d612e173695f3e3a997a44f5d7a94.tar.gz
Refresh dirs on disruptive chnages, update sxiv plugin to browse and rename
Diffstat (limited to 'plugins/sxiv')
-rwxr-xr-xplugins/sxiv16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/sxiv b/plugins/sxiv
index ef21cf7..2c677fe 100755
--- a/plugins/sxiv
+++ b/plugins/sxiv
@@ -1,8 +1,20 @@
#!/usr/bin/env sh
-# Description: Open images in current directory in sxiv
+# 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
-sxiv -q * >/dev/null 2>&1 &
+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 dummy
+fi