From 9e2499214d002c81678ff4ab0035925bd3653d66 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 14 Sep 2024 11:34:01 +0200 Subject: [PATCH] waybar: add systemd restart triggers Fixes #3186 --- modules/programs/waybar.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index 72d247323..8150223c1 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -2,7 +2,8 @@ let inherit (lib) - all filterAttrs hasAttr isStorePath literalExpression optionalAttrs types; + all filterAttrs hasAttr isStorePath literalExpression optional optionalAttrs + types; inherit (lib.options) mkEnableOption mkOption; inherit (lib.modules) mkIf mkMerge; @@ -310,6 +311,10 @@ in { Documentation = "https://github.com/Alexays/Waybar/wiki"; PartOf = [ "graphical-session.target" ]; After = [ "graphical-session-pre.target" ]; + X-Restart-Triggers = optional (settings != [ ]) + "${config.xdg.configFile."waybar/config".source}" + ++ optional (cfg.style != null) + "${config.xdg.configFile."waybar/style.css".source}"; }; Service = {