From 636f95874b2567a25620a9ffa6bffba0817ba524 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sat, 16 Apr 2022 01:35:45 +0200 Subject: [PATCH] Notify of low battery in Waybar --- waybar/.config/waybar/config | 8 ++++---- waybar/.config/waybar/style.css | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config index e8f7997..ca2db43 100644 --- a/waybar/.config/waybar/config +++ b/waybar/.config/waybar/config @@ -44,8 +44,8 @@ "bat": "BAT0", "states": { "good": 95, - "warning": 60, - "critical": 20 + "warning": 30, + "critical": 10 }, "format": "{icon} {capacity}%", "format-charging": " {capacity}%", @@ -59,8 +59,8 @@ "bat": "BAT1", "states": { "good": 95, - "warning": 60, - "critical": 20 + "warning": 30, + "critical": 10 }, "format": "{icon} {capacity}%", "format-charging": " {capacity}%", diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 5ef21ce..7038f86 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -89,10 +89,18 @@ window#waybar.chromium { @keyframes blink { to { + background-color: #f53c3c; + color: #000000; } } -#battery.critical:not(.charging) { +#battery.bat2.critical:not(.charging) { + color: #ffffff; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: 10; + animation-direction: alternate; } label:focus {