diff options
| author | Thomas Irgang <info@tomirgang.de> | 2026-08-16 10:21:39 +0200 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-08-29 21:41:34 -0700 |
| commit | 07a1296ca25d103ff9d66c8add4687f2d038b658 (patch) | |
| tree | a1ecf51a33866ad20062b5adc6410fcbcef38e12 /config/hypr/lua/keybind_helpers.lua | |
| parent | 9423a676432fe9aa40675e4cdf94a4736e6f5a64 (diff) | |
fix: Keep Waybar alive when switching themes from a bar module (#96)
Switching Dark/Light from the Waybar module left the bar gone until the
next login.
DarkLight.sh is wired to a Waybar module on-click, so it runs inside
waybar.service's cgroup. Its cleanup loop kills waybar, systemd tears down
the whole unit, and every process in that cgroup goes with it - DarkLight.sh
included, before it ever reaches Refresh.sh. Nothing is left to start the
replacement bar. Refresh.sh had the same problem on its own: it killed
waybar and relaunched it from a shell that had just been torn down.
Drop waybar from the DarkLight.sh cleanup loop and let Refresh.sh own the
restart, run as a transient systemd-run --user unit so it sits outside the
caller's cgroup and survives the teardown. Fall back to setsid where
systemd-run is unavailable.
Detect systemd management via the unit's LoadState instead of is-enabled.
WaybarStartup.sh starts the unit on demand and leaves it disabled, so
is-enabled reports "disabled" for setups that are in fact systemd-managed.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'config/hypr/lua/keybind_helpers.lua')
0 files changed, 0 insertions, 0 deletions
