ultrabug / py3status

py3status is an extensible i3status wrapper written in python

Home Page:https://ultrabug.github.io/py3status/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add connexion status in kdeconnector module

florencebiree opened this issue · comments

Dear developer,

Your py3status version
py3status version 3.47 (python 3.10.8) on sway

Describe the solution you'd like
I use kdeconnect and the kdeconnector module of py3status. It allow to display the percentage of battery from my smartphone, but I would like to display also the strength of the signal on the mobile network (from the smartphone). I think it should be possible, since gsconnect on gnome display it on the status bar.

Hello @florencebiree

I must admit that I have no knowledge about it or KDE related stuff.

@ritze I see you're the original author of the module so if you're around, would you maybe be willing to help here?

Thanks

Hi @florencebiree and @ultrabug,

I don't use kdeconnector anymore. But if gsconnect can display the signal strength of your mobile network, this information should be available via dbus as all the other information which are currently supported by the kdeconnector module.

Theoretically we just need to find out the dbus path for this. It should work the same as _get_battery().

Thanks @ritze

@florencebiree if you can provide the given output example, I can try to come up with a patch.

Maybe having two new variables: {net_type} and {net_quality}, net_type could be something like E (edge), 3G, 4g, etc… (GSConnect is able to retrieve this information, it must be on the dbus data…), and net_quality a percentage like the {quality} variable in the wifi module.

The default display could be something like {net_type} {net_quality} (ex: 4G 74%), added at the end of the actual default format.

There should be org.kde.kdeconnect.device.connectivity_report Dbus path ( https://invent.kde.org/network/kdeconnect-kde/-/blob/master/plugins/connectivity-report/connectivity_reportplugin.h#L45 )
This connectivity_report plugin was created about year ago so my ubuntu 20.04 kdeconnect is too old to help futher development. Currently I'm building kdeconnect from source.

Here is dbus interface:
image

I got raw data flowing, but cellularNetworkStrength needs some better output than just a number between 0-4.
Maybe add some icons like qsconnect: ( https://github.com/GSConnect/gnome-shell-extension-gsconnect/blob/80c3d156fbc61c97d3a3a004172f41056d8ff316/src/service/plugins/connectivity_report.js#L65 )
Or use similar logic as volume_control ? ( _▂▄▆█ )

done by @valdur55 👍