From aa6bde6dde14634bd9d8565c19a7920593ad9902 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 26 Mar 2024 22:16:04 -0400 Subject: [PATCH] waybar: added charging indicator/ --- home/waybar/default.nix | 15 +++++++-------- home/waybar/waybar.css | 11 +++++++---- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/home/waybar/default.nix b/home/waybar/default.nix index 986cc3c5..c63c44cd 100644 --- a/home/waybar/default.nix +++ b/home/waybar/default.nix @@ -25,8 +25,8 @@ "clock" ]; - "hyprland/workspaces" = { " - all-outputs" = true; + "hyprland/workspaces" = { + "all-outputs" = true; "format" = "󰧞"; }; "hyprland/window" = { "max-length" = 100; }; @@ -36,13 +36,12 @@ "format" = "{:%I:%M%p}"; }; "battery" = { - "states" = { - "critical" = 20; - "normal" = 90; - "full" = 100; - }; + "states" = { "critical" = 20; }; "format" = "{icon}"; "format-icons" = [ "󰁺" "󰁼" "󰁿" "󰂁" "󰁹" ]; + "tooltip-format" = '' + {capacity}%: {timeTo}. + Using {power} watts.''; }; "bluetooth" = { "format" = "󰂯 {status}"; @@ -82,7 +81,7 @@ "power-profiles-daemon" = { "format" = "{icon}"; "tooltip-format" = '' - Power profile: {profile} + Profile: {profile} Driver: {driver}''; "tooltip" = true; "format-icons" = { diff --git a/home/waybar/waybar.css b/home/waybar/waybar.css index 32fa4014..0874c51a 100644 --- a/home/waybar/waybar.css +++ b/home/waybar/waybar.css @@ -20,7 +20,10 @@ window#waybar { padding: 0 10px; margin: 0 5px; } -#battery.critical { color: #e78284; } -#battery.full { color: #ca9ee6; } -#battery.normal { color: #FAFAFA; } - +#battery { color: #FAFAFA; } +#battery.charging { + color: #ca9ee6; +} +#battery.critical:not(.charging) { + color: #e78284; +}