Add wallpapers preview script
authorSiraaj Khandkar <siraaj@khandkar.net>
Sun, 23 Jan 2022 00:52:29 +0000 (19:52 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sun, 23 Jan 2022 00:52:29 +0000 (19:52 -0500)
home/bin/wallpapers_preview [new file with mode: 0755]

diff --git a/home/bin/wallpapers_preview b/home/bin/wallpapers_preview
new file mode 100755 (executable)
index 0000000..b5672d8
--- /dev/null
@@ -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 '{}' \;
This page took 0.027581 seconds and 4 git commands to generate.