From 968935e00f3dca2d0b64ca7eaf1b411c9ad1a344 Mon Sep 17 00:00:00 2001 From: hmj6502 Date: Sun, 28 Dec 2025 20:16:20 +0000 Subject: initial commit --- rand_wall.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 rand_wall.sh (limited to 'rand_wall.sh') diff --git a/rand_wall.sh b/rand_wall.sh new file mode 100755 index 0000000..062d231 --- /dev/null +++ b/rand_wall.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# generate a wallpaper using wall_gen.sh using a random image from a directory +# (including subdirectories; defaults to ~/Pictures/albums if no directory given) + +if [ $# -eq 0 ]; then + IMG_DIR="$HOME/Pictures/albums" +else + IMG_DIR="$1" +fi +wall_gen.sh $(find "$IMG_DIR" -not -path '*/.*' -type f -printf "%p\n" | sort -R | sed -n '1p') -- cgit v1.2.3