feat: add battery widget to waybar

This commit is contained in:
Jeena 2026-05-08 23:11:51 +00:00
parent 11d2d51544
commit 5b81e86c5b

View file

@ -16,6 +16,7 @@
"hyprland/language", "hyprland/language",
"custom/notifications", "custom/notifications",
"custom/idle-inhibit", "custom/idle-inhibit",
"battery",
"custom/power" "custom/power"
], ],
@ -114,6 +115,23 @@
"format": " ⏻ ", "format": " ⏻ ",
"tooltip": false, "tooltip": false,
"on-click": "wlogout --protocol layer-shell" "on-click": "wlogout --protocol layer-shell"
},
"battery": {
"bat": "BAT0",
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"events": {
"on-discharging-warning": "notify-send -u normal 'Low Battery'",
"on-discharging-critical": "notify-send -u critical 'Very Low Battery'",
"on-charging-100": "notify-send -u normal 'Battery Full!'"
},
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""],
"max-length": 25
} }
} }