2022-01-21 00:19:23 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Start in the script's pwd
|
|
|
|
# (ideally something like /usr/share/wallpapers/thurstylark/)
|
|
|
|
wallp_dir=$(dirname "$0")
|
|
|
|
|
|
|
|
# Get one subdir from $wallp_dir
|
|
|
|
wallp_subdir=$(find "$wallp_dir" -type d | shuf -n 1)
|
|
|
|
|
|
|
|
# Get one file from $wallp_subdir
|
2022-01-21 01:15:47 +00:00
|
|
|
find $wallp_subdir -type f \( -iname \*.jpg -o -iname \*.png \) | shuf -n 1
|