frues-clan/users/pedro/home-configuration/scripts/scripts/wallpaper-picker.sh
Pedro Rey Anca 7606f9e051
Some checks failed
Update `flake.lock` / update_lockfile (push) Waiting to run
Flake check / check (push) Has been cancelled
Migrate config (frues-pc machine for now) from https://git.peprolinbot.com/peprolinbot/nixos-config, with improvements
2025-09-08 18:59:28 +02:00

14 lines
No EOL
557 B
Bash
Executable file

bpotd_entry="⚙️ Bing's Picture Of The Day"
apotd_entry="⚙️ NASA's Astronomy Picture Of The Day"
wallpapers_folder=$HOME/Pictures/Wallpapers/
wallpaper_name=$(echo -e "$bpotd_entry\n$apotd_entry" | { cat; find "$wallpapers_folder" -type f | sed "s|$wallpapers_folder||"; } | fuzzel --dmenu)
if [ "$wallpaper_name" == "$bpotd_entry" ]; then
setbg-bpotd
elif [ "$wallpaper_name" == "$apotd_entry" ]; then
setbg-apotd
elif [[ -f $wallpapers_folder/$wallpaper_name ]]; then
wall-change "$wallpapers_folder/$wallpaper_name"
else
exit 1
fi