From c018768e866a7f12903ac94e4f5f9f39b5eb9908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 21 Feb 2022 17:44:24 +0100 Subject: [PATCH] :sparkles: prettify polybar --- modules/desktop/polybar/default.nix | 40 +++++++++++++++++------------ 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/modules/desktop/polybar/default.nix b/modules/desktop/polybar/default.nix index 3ee126c..b872970 100644 --- a/modules/desktop/polybar/default.nix +++ b/modules/desktop/polybar/default.nix @@ -44,13 +44,13 @@ line-color = colors.pink; module-margin = 1; - separator = "|"; + separator = "%{F${colors.comment}}◆%{F-}"; font-0 = "FiraCode Nerd Font:size=10;0"; modules-left = "cpu memory network battery"; modules-center = "bspwm"; - modules-right = "pulseaudio date"; + modules-right = "pulseaudio date time"; tray-position = "right"; tray-padding = 2; @@ -66,14 +66,11 @@ adapter = "ACAD"; time-format = "%H:%M"; - format-charging = " "; - format-charging-foreground = colors.green; - - format-discharging = " "; - format-discharging-foreground = colors.red; - - format-full = ""; - format-full-foreground = colors.green; + format-charging = + "%{${colors.green}}%{F-} "; + format-discharging = + "%{${colors.red}}%{F-} "; + format-full = "%{${colors.green}}%{F-} "; label-charging = "%percentage%% %time% remaining"; label-discharging = "%percentage%% %time% remaining"; @@ -121,10 +118,21 @@ "module/cpu" = { type = "internal/cpu"; interval = 2; - format-prefix = " "; + format-prefix = " "; format-prefix-foreground = colors.red; label = "%percentage:2%%"; }; + "module/time" = { + type = "internal/date"; + interval = 1; + + time = "%H:%M"; + time-alt = "%H:%M:%S"; + + label = "%time%"; + format-prefix = " "; + format-prefix-foreground = colors.cyan; + }; "module/date" = { type = "internal/date"; interval = 5; @@ -132,12 +140,10 @@ date = "%A"; date-alt = "%Y-%m-%d"; - time = "%H:%M"; - time-alt = "%H:%M:%S"; + label = "%date%"; + format-prefix = " "; + format-prefix-foreground = colors.orange; - label = "%date% %time%"; - - click-middle = "${pkgs.kitty}/bin/kitty cal -m3"; }; "module/memory" = { type = "internal/memory"; @@ -145,7 +151,7 @@ format-prefix = " "; format-prefix-foreground = colors.green; - label = "%percentage_used%%"; + label = "%gb_used%"; }; "module/pulseaudio" = { type = "internal/pulseaudio";