nnn/plugins/imgsxiv

21 lines
487 B
Plaintext
Raw Normal View History

2019-01-03 17:35:51 +00:00
#!/usr/bin/env sh
# Description: Open images in hovered directory and thumbnails
# open hovered image in sxiv and browse other images in the directory
2019-01-03 17:35:51 +00:00
#
2019-04-18 04:59:47 +00:00
# Shell: POSIX compliant
2019-01-03 17:35:51 +00:00
# Author: Arun Prakash Jana
if command -v sxiv >/dev/null 2>&1; then
if ! [ -z "$1" ]; then
if [ -f "$1" ]; then
2019-11-23 05:07:46 +00:00
sxiv -q "$1" "$PWD"
elif [ -d "$1" ] || [ -h "$1" ]; then
sxiv -qt "$1"
fi
fi
else
echo "sxiv missing"
2019-11-21 20:44:25 +00:00
read -r _
fi