diff options
| author | hmjsp <hmjsp@liber8bits.com> | 2025-12-28 20:16:20 +0000 |
|---|---|---|
| committer | hmjsp <hmjsp@liber8bits.com> | 2025-12-28 20:35:35 +0000 |
| commit | 83a9af61eef6c3c760a137c6cbacb47d6f419135 (patch) | |
| tree | 9d9eb4344c86323bdf84d09a85811683bf21d1b1 /rand_wall.sh | |
| download | album-wall-83a9af61eef6c3c760a137c6cbacb47d6f419135.zip | |
initial commit
Diffstat (limited to 'rand_wall.sh')
| -rwxr-xr-x | rand_wall.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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') |
