diff options
-rw-r--r-- | waybar/config | 8 | ||||
-rw-r--r-- | waybar/style.css | 15 |
2 files changed, 20 insertions, 3 deletions
diff --git a/waybar/config b/waybar/config index 7775078..933dedc 100644 --- a/waybar/config +++ b/waybar/config @@ -215,9 +215,11 @@ //"on-click-right": "killall rofi" }, "custom/battery":{ - "interval": 60, - "format": "{}%", - "exec": "cat /sys/class/power_supply/BAT0/capacity", + "interval": 15, + "format": "{percentage}%", + "return-type": "json", + "exec": "custom-battery", + "tooltip": true, }, "custom/power":{ "format": "", diff --git a/waybar/style.css b/waybar/style.css index 865e806..ff6dc9a 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -223,6 +223,21 @@ label:focus { font-size: 18px; } +#custom-battery.battery_low{ + background-color: yellow; + color: #1b1d1c; +} + +#custom-battery.battery_crit{ + background-color: red; + color: #1b1d1c; +} + +#custom-battery.battery_charging{ + background-color: #1d1b1c; + color: #198844; +} + #custom-launcher{ background-color: #1b1d1c; font-size: 20px; |