fix(home): relaunch waybar on monitor hotplug instead of SIGUSR2 reload

A real DP/HDMI unplug makes Hyprland tear down the layer-shell surfaces on
the surviving monitor and not recreate them, so waybar and the wallpaper
vanish there. A SIGUSR2 reload rereads waybar's config but does not
recreate a bar that was already destroyed, so it left the laptop bar gone.
Kill and restart waybar instead — a fresh process enumerates the current
outputs and draws a bar on each — and add a settle delay before re-pushing
the wallpaper so it lands on the settled geometry. Verified against a real
DP-1 unplug: the LVDS-1 bar and wallpaper survive.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-09 11:37:03 +02:00
co-authored by Claude Opus 4.8
parent 752ee84430
commit 102fb3c3c4
2 changed files with 19 additions and 9 deletions
+1 -1
View File
@@ -661,7 +661,7 @@ in
# the ~/.local/share/bg symlink if it exists.
"awww-daemon"
"sh -c '[ -e \"$HOME/.local/share/bg\" ] && awww img \"$HOME/.local/share/bg\"'"
# re-push wallpaper + reload waybar on monitor add/remove (media.nix)
# re-push wallpaper + relaunch waybar on monitor add/remove (media.nix)
"monitor-hotplug"
];
};