2022-05-08 11:54:07 +02:00
|
|
|
#!/usr/bin/env bash
|
2020-12-21 18:32:41 +01:00
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
IFS=$'\n\t'
|
|
|
|
|
|
|
|
WALLPAPER_DIRECTORY="$HOME/pictures/wallpapers/enabled"
|
|
|
|
WALLPAPER_FILE="$(find "$WALLPAPER_DIRECTORY" -type l -print | shuf | head -n 1)"
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
sway)
|
|
|
|
swaymsg --quiet output "*" bg "$WALLPAPER_FILE" fill
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
hash feh 2>/dev/null && feh --bg-scale "$WALLPAPER_FILE"
|
|
|
|
;;
|
|
|
|
esac
|