aboutsummaryrefslogtreecommitdiff
path: root/gallery
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-08-20 21:02:40 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-08-20 21:02:40 -0300
commitd8cb07b0e53e6757c42d7ad5adcfee2cef5826cc (patch)
tree03665c60ac2a4160ffce7f2ffd97d503db413188 /gallery
parenta09a77ee87df69b1e9fe9fba98c21b11983d0150 (diff)
downloadutils-x11-d8cb07b0e53e6757c42d7ad5adcfee2cef5826cc.tar.gz
utils-x11-d8cb07b0e53e6757c42d7ad5adcfee2cef5826cc.tar.bz2
Adds gallery script
Diffstat (limited to 'gallery')
-rwxr-xr-xgallery22
1 files changed, 22 insertions, 0 deletions
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