upower backend for battery widget WIP #266
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this PR ain't complete, rather i opened it to get some feedback
since acpi can't detect the remaining time of battery for my laptop but upower can i decided to try and add the option to use upower as backend for the battery widget based on the watch widget recipe examples from https://awesomewm.org/recipes/watch/
i still have to clean stuff up and parse the information for the notification.
expected output from
upower -i $(upower -e | grep BAT)
expected output from
upower -i $(upower -e | grep BAT) | sed -n '/present/,/icon-name/p'
from what i understand this widget can display information for more than one battery with acpi but i only have one battery on my laptop.
i will push some cleanups later.
anyway waiting for feedback 👍