From dda65c0877b0b6c98d0f628374f2651d92597086 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 26 Jul 2018 17:59:06 +0200 Subject: [PATCH] polybar: let systemd reload trigger restart --- modules/services/polybar.nix | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/modules/services/polybar.nix b/modules/services/polybar.nix index 52ea7b4e..a187f62a 100644 --- a/modules/services/polybar.nix +++ b/modules/services/polybar.nix @@ -119,6 +119,7 @@ in Description = "Polybar status bar"; After = [ "graphical-session-pre.target" ]; PartOf = [ "graphical-session.target" ]; + X-Restart-Triggers = [ config.xdg.configFile."polybar/config".source ]; }; Service = { @@ -131,21 +132,6 @@ in WantedBy = [ "graphical-session.target" ]; }; }; - - home.activation.checkPolybar = dag.entryBefore [ "linkGeneration" ] '' - if ! cmp --quiet \ - "${configFile}" \ - "$HOME/.config/polybar/config"; then - polybarChanged=1 - fi - ''; - - home.activation.applyPolybar = dag.entryAfter [ "reloadSystemD" ] '' - if [[ -v polybarChanged && -v DISPLAY ]]; then - echo "Restarting polybar" - ${config.systemd.user.systemctlPath} --user restart polybar.service - fi - ''; }; }