]> Freerunner's - dotfiles.git/commitdiff
bin: add script for random wallpaper
authorAndre Ramnitz <tux.rising@gmail.com>
Thu, 14 Dec 2023 18:22:03 +0000 (19:22 +0100)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 18 Aug 2024 16:18:52 +0000 (18:18 +0200)
bin/.local/bin/rndwallpaper [new file with mode: 0755]

diff --git a/bin/.local/bin/rndwallpaper b/bin/.local/bin/rndwallpaper
new file mode 100755 (executable)
index 0000000..ece08e9
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+WALLDIR="$HOME/Bilder/Wallpapers"
+
+# set random wallpaper
+echo "$WALLDIR"/"$(find "$WALLDIR" -type f \( -iname \*jpg -o -iname \*jpeg -o -iname \*png -o -iname \*webp \) -printf '"%f"\n' | sort -R | tail -n1)"
+