fix(hypr): ensure swww launcher does not get caught in infinite loop
This commit is contained in:
parent
d23725b659
commit
a2a10c382d
@ -15,11 +15,9 @@ set-wallpaper() {
|
|||||||
local monitor="${1}"
|
local monitor="${1}"
|
||||||
local wallpaper_path="${2}"
|
local wallpaper_path="${2}"
|
||||||
|
|
||||||
until [[ "$(get-monitor-wallpaper "${monitor}")" == "${wallpaper_path}" ]]; do
|
log "Setting wallpaper for monitor: '${monitor}' to '${wallpaper_path}'"
|
||||||
log "Setting wallpaper for monitor: '${monitor}' to '${wallpaper_path}'"
|
swww img -t none "${wallpaper_path}" -o "${monitor}"
|
||||||
swww img -t none "${wallpaper_path}" -o "${monitor}"
|
log "Set wallpaper for monitor: '${monitor}' to '${wallpaper_path}'"
|
||||||
log "Set wallpaper for monitor: '${monitor}' to '${wallpaper_path}'"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set-wallpapers() {
|
set-wallpapers() {
|
||||||
@ -64,9 +62,8 @@ main() {
|
|||||||
init
|
init
|
||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
while IFS= read -r line
|
while IFS= read -r line; do
|
||||||
do
|
if grep "color: 000000" <<<"${line}"; then
|
||||||
if grep "color: 000000" <<< "${line}"; then
|
|
||||||
set-wallpapers
|
set-wallpapers
|
||||||
fi
|
fi
|
||||||
sleep .1
|
sleep .1
|
||||||
|
Loading…
Reference in New Issue
Block a user