vikoadi / indicator-kdeconnect

AppIndicator for KDE Connect
http://vikoadi.blogspot.com/
Other
118 stars 54 forks source link

Device battery percentage on the indicator #34

Open astra1 opened 8 years ago

astra1 commented 8 years ago

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

orangemango commented 8 years ago

+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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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