aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sxiv
blob: 2c677fe9e1f7cb4241582053bbc17708d7d851d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 dummy
fi