I think this part of the waybar config can be better improved
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon}{capacity: >3}%",
"format-icons": ["", "", "", "", ""]
},
to
"battery": {
"interval": 2,
"states": {
"warning": 25,
"critical": 15
},
"format": "{icon}{capacity: >3}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-full": " {icon}{capacity}%",
"format-icons": ["", "", "", "", ""]
The improvements;
- the interval time has been significantly reduced from default 60 seconds to 2 seconds, this way changes in the battery state(charging, just got plugged in, stopped charging etc) are reflected almost immediately
- new states (plugged, full, charging) are added to properly reflect state particularly to differentiate when the battery is charging and when it isn’t.