Update Battery widget plugin (#311)

* fix: invalid check in getWarningThreshold

* fix: invalid status

* feat: use dbus events instead of polling

* fix: invalid status again

* fix: dump version and set valid plugin API

* fix: add commandExists check

* fix: getColor function (warning color when not charging)

* feat: use upower instead of cat /sys

* feat: notify on error

* fix: cleaner code

* fix: use noctalia.tr for notification (not logs, intended)

* feat: migrate from dbus-monitor to gdbus (everything in one line)

* feat: use gdbus to init and update, parse only when needed

* feat: add label_content and optimisations

* fix: remove multiple commands check not needed anymore

* fix: update README and dump version

* fix: default data, warning_threshold check, floor percent
This commit is contained in:
Yocraft-2000
2026-08-12 09:37:30 -04:00
committed by GitHub
parent 97389b0ff8
commit e9121c114c
4 changed files with 197 additions and 57 deletions
+11 -1
View File
@@ -48,6 +48,16 @@
"warning_color": {
"description": "Color applied when charge is at or below noctalia's warning threshold.",
"label": "Warning Color"
},
"label_content": {
"label": "Label Content",
"description": "What the battery label shows: charge percentage, time remaining, or power draw.",
"percent": "Percent",
"time": "Time",
"rate": "Rate"
}
},
"notify": {
"error": "Something went wrong. Check the Noctalia log for details."
}
}
}