From 0f985c6acea52db5ba6cd738692bb9b7ee9e3eef Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 13 Feb 2021 13:17:44 -0300 Subject: Adds gallery wrapper --- gallery | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 gallery diff --git a/gallery b/gallery new file mode 100755 index 0000000..45e46eb --- /dev/null +++ b/gallery @@ -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 -- cgit v1.2.3