From fdb7f082d68a240e68da49db46467184aa5db3f4 Mon Sep 17 00:00:00 2001 From: "Agatha V. Lovelace" Date: Sun, 2 Apr 2023 12:52:25 +0200 Subject: [PATCH] Polybar cleanup --- common/fragments/graphical/polybar.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/common/fragments/graphical/polybar.nix b/common/fragments/graphical/polybar.nix index af03e4b..7e388c7 100644 --- a/common/fragments/graphical/polybar.nix +++ b/common/fragments/graphical/polybar.nix @@ -7,8 +7,15 @@ in { systemd.user.services.polybar = { Service = { - Environment = lib.mkForce - "PATH=${config.home-manager.users.agatha.services.polybar.package}/bin:/run/wrappers/bin:${pkgs.dbus}/bin:${pkgs.dunst}/bin"; + Environment = lib.mkForce (lib.concatStringsSep ":" [ + "PATH=${config.home-manager.users.agatha.services.polybar.package}/bin" + "/run/wrappers/bin" + "${pkgs.dbus}/bin" + "${pkgs.dunst}/bin" + "${pkgs.systemd}/bin" + "${pkgs.util-linux}/bin" + "${pkgs.gnused}/bin" + ]); }; Install = { WantedBy = [ "graphical-session.target" ]; }; }; @@ -134,7 +141,7 @@ in { format-prefix-foreground = "\${colors.foreground-alt}"; label = '' - %{A3:${pkgs.dunst}/bin/dunstify ' Calendar' "$(cal --color=always | sed "s#\\x1b\\[7m##;s#\\x1b\\[27m##g")​":}%date%%{A} %time%''; + %{A3:${pkgs.dunst}/bin/dunstify ' Calendar' "$(${pkgs.util-linux}/bin/cal --color=always | ${pkgs.gnused}/bin/sed "s#\\x1b\\[7m##;s#\\x1b\\[27m##g")​":}%date%%{A} %time%''; }; "module/filesystem" = { @@ -172,7 +179,7 @@ in { label-volume-foreground = "\${root.foreground}"; label-muted = " muted"; - label-muted-foreground = "#666"; + label-muted-foreground = "\${colors.primary}"; bar.volume = { width = 14; @@ -211,9 +218,9 @@ in { menu = { "0-0" = "reboot"; - "0-0-exec" = "reboot"; + "0-0-exec" = "${pkgs.systemd}/bin/reboot"; "0-1" = "power off"; - "0-1-exec" = "sudo poweroff"; + "0-1-exec" = "sudo ${pkgs.systemd}/bin/poweroff"; }; };