aboutsummaryrefslogtreecommitdiff
path: root/gallery
blob: 45e46eb63ba2f0721ec3ab5a0398f5da9da5890d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#
# Image galleries: a wrapper for sxiv(1).
#

# Parameters
BASENAME="`basename $0`"
IMAGES="$HOME/data/images"
GALLERY="${1:-$IMAGES}"

# Check
if [ "$GALLERY" != "-" ] && [ ! -d "$GALLERY" ]; then
  echo "$BASENAME: path not found: $GALLERY"
  exit 1
elif ! which sxiv &> /dev/null; then
  echo "$BASENAME: please install sxiv"
  exit 1
fi

# Dispatch
# Option -o allows piping the selection output to other tools
sxiv -t -q -b -o -r $GALLERY 2> /dev/null