add sxiv_dir script

This commit is contained in:
Václav Uruba 2024-04-18 22:35:07 +02:00
parent 636c0562b3
commit 32e7af65bd
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C

13
scripts/scripts/sxiv_dir Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
if command -v sxiv >/dev/null 2>&1; then
if [ -d "${@: -1}" ] || [ -h "${@: -1}" ]; then
sxiv -t "$@"
else
sxiv "$@"
fi
elif command -v feh >/dev/null 2>&1; then
feh "$@"
else
echo "Please install SXIV or FEH!"
fi