From 31df30211ce32c341734cd47300d2ee223de9154 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Sat, 22 Jan 2022 19:52:29 -0500 Subject: [PATCH] Add wallpapers preview script --- home/bin/wallpapers_preview | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 home/bin/wallpapers_preview diff --git a/home/bin/wallpapers_preview b/home/bin/wallpapers_preview new file mode 100755 index 0000000..b5672d8 --- /dev/null +++ b/home/bin/wallpapers_preview @@ -0,0 +1,10 @@ +#! /bin/sh + +case "$1" in + '') dir="$DIR_WALLPAPERS";; + *) dir="$1";; +esac + +# XXX Apparently injecting a filepath with {} is bad: https://github.com/koalaman/shellcheck/wiki/SC2156 +#find "$dir" -type f -exec bash -c 'feh --bg-scale "{}"; read' \; +find "$dir" -type f -exec bash -c 'feh --bg-scale "$1"; read' shell '{}' \; -- 2.20.1