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

Device battery percentage on the indicator #34

Open
astra1 opened this issue Dec 17, 2015 · 4 comments
Open

Device battery percentage on the indicator #34

astra1 opened this issue Dec 17, 2015 · 4 comments

Comments

@astra1
Copy link

astra1 commented Dec 17, 2015

it would be nice if an icon will show graphical or text information about battery or storage
thanks

@orangemango
Copy link

+1
It will be great to have the ability to display the current percent of battery in topbar.
Like for computer battery.
Here the example with Elementary OS:
indicator

@tlegutko
Copy link

tlegutko commented Jan 8, 2017

bump. is there a possibility of this feature? It's great that indicator shows battery in context menu, but I'd like to see battery status at first glance. Can I extract this information in some other way? Like text format to parse? Anything is fine.
I looked at kdeconnect-cli, but I couldn't find an option for that. I also looked for options at indicator-kdeconnect, but no luck there either.

Quick look at source code tells me it should probably be possible to call dbus from command line to imitate this call for battery info here https://github.com/vikoadi/indicator-kdeconnect/blob/2f8ae36ce9b1b1ea32c6524dcbc085d2a9aff66a/src/Device.vala (51-61 or 154-174 for signal subscription).

@vikoadi I'm not too knowledgable about dbus, is it possible to reverse engineer it that way? Or no luck there because particular session is needed or something?

Or maybe it's stored somewhere locally, so I could get it? Or maybe some other tool provides that info?

@albertvaka
Copy link

qdbus org.kde.kdeconnect /modules/kdeconnect/devices/<YOUR_DEVICE_ID> org.kde.kdeconnect.device.battery.charge

Actually, since qdbus has autocompletion it's easy to explore all the properties exposed in dbus :)

@tlegutko
Copy link

@albertvaka you. are. my. HERO!! Nice!! This is perfect!!

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

No branches or pull requests

4 participants