fix(home): keep waybar + wallpaper on surviving monitor after unplug

Hyprland drops the layer-shell surfaces on the remaining output when a
monitor is removed and does not recreate them, so waybar and the awww
wallpaper vanish on unplug. The socket2 watcher only reacted to
`monitoradded`, which masked it — reconnecting re-fired the add and
restored both. Handle `monitorremoved` too, and on either event re-push
the wallpaper and reload waybar (SIGUSR2 rebuilds its per-output bars).
Renamed `wallpaper-hotplug` to `monitor-hotplug` since it now does both.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-09 10:48:16 +02:00
co-authored by Claude Opus 4.8
parent fbf68fa4a4
commit 752ee84430
2 changed files with 15 additions and 9 deletions
+2 -2
View File
@@ -661,8 +661,8 @@ 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 the wallpaper onto monitors connected after login (media.nix)
"wallpaper-hotplug"
# re-push wallpaper + reload waybar on monitor add/remove (media.nix)
"monitor-hotplug"
];
};
};