diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2021-02-13 13:17:44 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2021-02-13 13:17:44 -0300 |
commit | 0f985c6acea52db5ba6cd738692bb9b7ee9e3eef (patch) | |
tree | 6d01c37a9848e02f86e219b7a19d9a1e1c3bcfda | |
parent | 2f12b3754e9d42cc77dc3e632d9bdbb8371b40a0 (diff) | |
download | scripts-0f985c6acea52db5ba6cd738692bb9b7ee9e3eef.tar.gz scripts-0f985c6acea52db5ba6cd738692bb9b7ee9e3eef.tar.bz2 |
Adds gallery wrapper
-rwxr-xr-x | gallery | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -0,0 +1,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 |