Theme changer: Wait for hyprpaper socket to be available

This commit is contained in:
Viyurz 2024-06-30 12:49:44 +02:00
parent 302f344ee6
commit 01d584b925
Signed by: Viyurz
SSH key fingerprint: SHA256:IskOHTmhHSJIvAt04N6aaxd5SZCVWW1Guf9tEcxIMj8

View file

@ -178,6 +178,9 @@ function set_betterdiscord_theme {
function set_desktop_wallpaper_theme {
if ! pgrep -u "$USER" hyprpaper > /dev/null; then
hyprctl dispatch exec hyprpaper > /dev/null
while ! hyprctl hyprpaper listloaded &> /dev/null; do
sleep 0.25
done
fi
hyprctl hyprpaper preload "$wallpaper"