2 Commits

Author SHA1 Message Date
d2fffc40ea Add migration to prevent Waybar stacking 2025-07-23 16:26:13 -04:00
8884cc7a5c Prevent stacking of waybars after unlock by SIGUSR2'ing it
Bit crude, but better than a full kill.
Closes #196
2025-07-23 16:22:14 -04:00
2 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,7 @@ general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
on_unlock_cmd = pkill -SIGUSR2 waybar # prevent stacking of waybar when waking
}
listener {

8
migrations/1753302134.sh Normal file
View File

@ -0,0 +1,8 @@
echo "Reload Waybar on unlock to prevent stacking"
if ! grep -q 'on_unlock_cmd *= *pkill -SIGUSR2 waybar' ~/.config/hypr/hypridle.conf; then
sed -i '/^general[[:space:]]*{/,/^}/ {
/on_unlock_cmd *=/d
/^}$/ i\ on_unlock_cmd = pkill -SIGUSR2 waybar # prevent stacking of waybar when waking
}' ~/.config/hypr/hypridle.conf
fi