Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added battery plugin #409

Merged
merged 2 commits into from Feb 7, 2019
Merged

Added battery plugin #409

merged 2 commits into from Feb 7, 2019

Conversation

shahlin
Copy link
Contributor

@shahlin shahlin commented Feb 3, 2019

Provides information about battery such as the percentage, time remaining before empty, vendor, technology and energy consumption.

@pnhofmann
Copy link
Collaborator

Thanks!

upower is something linux specific or is there a mac version available? Which of course would be no problem - not every plugin needs to support every platform.
Howerever does mean, we should only enable this feature if we are on a linux-machine with upower installed. Since how to do that is not well documented (work in progess), I have added 2-line commit to do so. Hope you are OK.

I just don't know: Does battery always have this path: '/org/freedesktop/UPower/devices/battery_BAT0'? On my FreeBSD machine it's available as '/org/freedesktop/UPower/devices/battery_devxbatteryx0' - I'm honestly not the freedesktop-expert.

I'll test this plugin on my linux system, investigate if there is another way than hard-coded '/org/freedesktop/UPower/devices/battery_BAT0' and merge afterwards.

@shahlin
Copy link
Contributor Author

shahlin commented Feb 4, 2019

Yes, my bad, I should have made it Linux platform only. I tried it with Mac and it doesn't work.
I tried testing on other Linux distros and it seemed to work on all for now. Here are the screenshots:

@pnhofmann
Copy link
Collaborator

Finally had time to test... Works really nice! Interessting, FreeBSD called battery_BAT0 different - thanks for testing different different Linux-Distributions; looks really like on Linux it's allways BAT0.

Actually really like this one! Thanks!

@pnhofmann pnhofmann merged commit 510d219 into sukeesh:master Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants