From 53ded3988bae6c5942b1f1b99ab769d262ca306e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Fri, 23 Aug 2024 12:54:10 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(waybar):=20add=20battery=20mod?= =?UTF-8?q?ule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/waybar/modules/battery.jsonc | 16 ++++++++++++++++ .config/waybar/style.css | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .config/waybar/modules/battery.jsonc diff --git a/.config/waybar/modules/battery.jsonc b/.config/waybar/modules/battery.jsonc new file mode 100644 index 00000000..d9274c03 --- /dev/null +++ b/.config/waybar/modules/battery.jsonc @@ -0,0 +1,16 @@ +{ + "battery": { + "format": "{capacity}% {icon}", + "format-icons": { + "charging": ["󰢜", "󰂆", "󰂇", "󰂈", "󰢝", "󰂉", "󰢞", "󰂊", "󰂋", "󰂅"], + "default": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"], + }, + "format-full": "Charged ", + "interval": 5, + "states": { + "warning": 20, + "critical": 10, + }, + "tooltip": false, + }, +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 81b25524..457d5e7b 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -27,6 +27,7 @@ } /* General Settings */ +#battery, #cava, #custom-cava, #custom-clipboard, @@ -162,6 +163,22 @@ window#waybar.hidden { } /* Individual Modules */ +#battery { + color: @mauve; +} + +#battery.warning { + color: @yellow; +} + +#battery.critical { + color: @peach; +} + +#battery.urgent { + color: @red; +} + #custom-cava { color: @lavender; border-radius: 12px;