Notify of low battery in Waybar

This commit is contained in:
coolneng 2022-04-16 01:35:45 +02:00
parent 13ba2c19ea
commit 636f95874b
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 13 additions and 5 deletions

View File

@ -44,8 +44,8 @@
"bat": "BAT0", "bat": "BAT0",
"states": { "states": {
"good": 95, "good": 95,
"warning": 60, "warning": 30,
"critical": 20 "critical": 10
}, },
"format": "<span foreground='#88C0D0'>{icon}</span> {capacity}%", "format": "<span foreground='#88C0D0'>{icon}</span> {capacity}%",
"format-charging": "<span foreground='#88C0D0'></span> {capacity}%", "format-charging": "<span foreground='#88C0D0'></span> {capacity}%",
@ -59,8 +59,8 @@
"bat": "BAT1", "bat": "BAT1",
"states": { "states": {
"good": 95, "good": 95,
"warning": 60, "warning": 30,
"critical": 20 "critical": 10
}, },
"format": "<span foreground='#88C0D0'>{icon}</span> {capacity}%", "format": "<span foreground='#88C0D0'>{icon}</span> {capacity}%",
"format-charging": "<span foreground='#88C0D0'></span> {capacity}%", "format-charging": "<span foreground='#88C0D0'></span> {capacity}%",

View File

@ -89,10 +89,18 @@ window#waybar.chromium {
@keyframes blink { @keyframes blink {
to { 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 { label:focus {