fix(hypr): improve swww launch script

This commit is contained in:
Price Hiller 2023-12-09 23:47:21 -06:00
parent fcebae2917
commit a9fb3f9040
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
log() { log() {
printf "%s\n" "${*}" printf "%s\n" "${*}"
@ -48,10 +47,14 @@ set-wallpapers() {
set-wallpaper "eDP-1" "${HOME}/.dot_files/dots/.local/share/wallpapers/Industrial-Shaded.png" set-wallpaper "eDP-1" "${HOME}/.dot_files/dots/.local/share/wallpapers/Industrial-Shaded.png"
} }
main() { init() {
until swww init; do until swww init; do
sleep .1 sleep .1
done done
}
main() {
init
log "swww daemon running, setting wallpapers" log "swww daemon running, setting wallpapers"
while :; do while :; do
while IFS= read -r line while IFS= read -r line
@ -61,7 +64,8 @@ main() {
fi fi
sleep .1 sleep .1
done < <(swww query) done < <(swww query)
sleep .1 sleep .5
swww init
done done
} }