feat: add battery conservation mode with Waybar toggle
Update PKGBUILD version / update-pkgver (push) Successful in 2s
Update PKGBUILD version / update-pkgver (push) Successful in 2s
Laptops with charge_control_end_threshold support get a click-to-toggle on the battery module (80% ↔ 100%). A ♥ icon appears when conservation is active, hidden when inactive. State persists across reboots via systemd oneshot service. udev rule grants wheel group write access so no sudo is needed for toggling.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
"bluetooth",
|
||||
"group/sound",
|
||||
"backlight",
|
||||
"battery",
|
||||
"group/battery",
|
||||
"group/indicators"
|
||||
],
|
||||
"group/indicators": {
|
||||
@@ -58,6 +58,13 @@
|
||||
"transition-left-to-right": true
|
||||
}
|
||||
},
|
||||
"group/battery": {
|
||||
"orientation": "inherit",
|
||||
"modules": [
|
||||
"battery",
|
||||
"custom/batsaver"
|
||||
]
|
||||
},
|
||||
"group/sys": {
|
||||
"orientation": "inherit",
|
||||
"modules": [
|
||||
@@ -306,13 +313,26 @@
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"max-length": 25
|
||||
"max-length": 25,
|
||||
"on-click": "moonarch-batsaver-toggle"
|
||||
},
|
||||
"custom/batsaver": {
|
||||
"exec": "moonarch-waybar-batsaver",
|
||||
"return-type": "json",
|
||||
"interval": 30,
|
||||
"signal": 9
|
||||
},
|
||||
"bluetooth": {
|
||||
// "controller": "controller1", // specify the alias of the controller if there are more than 1 on the system
|
||||
|
||||
Reference in New Issue
Block a user