waybar: Avoid reload onChange when systemd integration is enabled

When systemd integration is enabled, systemd will handle the issuing of
`SIGUSR2` through `X-Reload-Triggers`.

All this would do is trigger multiple `SIGUSR2` signals, which can
exacerbate this upstream issue:
https://github.com/Alexays/Waybar/issues/3344#issuecomment-2390661508
This commit is contained in:
Ben Brown 2026-02-25 19:40:46 +00:00 committed by Austin Horstman
parent 4c4fd4ed6b
commit b42875c294

View file

@ -318,7 +318,7 @@ in
xdg.configFile."waybar/config" = mkIf (settings != [ ]) {
source = configSource;
onChange = ''
onChange = mkIf (!cfg.systemd.enable) ''
${pkgs.procps}/bin/pkill -u $USER -USR2 waybar || true
'';
};
@ -329,7 +329,7 @@ in
cfg.style
else
pkgs.writeText "waybar/style.css" cfg.style;
onChange = ''
onChange = mkIf (!cfg.systemd.enable) ''
${pkgs.procps}/bin/pkill -u $USER -USR2 waybar || true
'';
};