dotfiles/scripts/random_wallpaper.sh
2023-04-04 18:08:58 +09:00

15 lines
424 B
Bash
Executable File

#!/bin/bash
#wal_dir=~/ShareDirectory/wallpaper/idol/landscape/karina
#wal_dir=~/ShareDirectory/wallpaper/idol/portrait/karina
wal_dir=~/walls/normal
# random wallpaper
files=()
while IFS= read -r -d $'\0'; do
files+=("$REPLY")
done < <(find $wal_dir -type f -name "*" -print0)
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
echo $randomfile
#wal -i $randomfile --saturate 1.0
feh --bg-fill $randomfile