Goals of this patch :
- display the signal quality
I used a thermometer icon cause there is no available icon with a
filleable bar o_O
- display the currently used network technology (4g, 3g, etc...)
I used the mapping from:
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/blob/master/include/ModemManager-enums.h#L220
Dylan also said:
Anything from POTS to GPRS = 2G
UMTS to EVDOB = 3G
LTE = 4G
5GNR = 5G
- display the modem infos when modemmonitor is disabled
We want to decorelate the modem monitor from the icon. We still want to
know easily if modem monitor is runing but we also want those modem
infos if not.
- simplify the modem state determination (no state file anymore)
The statusbar probe mmcli itself.
- fix the leading timer without call issue
This was caused by the "pgrep -f" command that was matching itself.
Using a simple "pgrep" looks good enough anyway.
- fix some sxmo_statusbar update spaming issues (vol control)
This one point took me a lot of time to findout a good solution. We want
the USR1 kill to be spamable without causing issue to the displayed bar.
We dont want mid rendered bar (half the icons).
We dont want empty bars (empty stdout line).
I use some variable to store pid, smart waits and a better trap function
to make it to works cleanly. Now we can spam statusbarupdate. Only the
last one will actually redraw the bar.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Wireless devices have "Wireless" type, so we search for nodes with type
"Battery". We also may handle wireless devices that way, if anyone needs
that.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
This is a huge patch for Swmo, Sxmo over Sway.
It is Dwm backward compatible so dwm users should not expect regressions.
If you install all dependencies, you then can toggle between Sway and Dwm using a new config entry. It will reboot the phone.
This commit also contains:
* Make the modemmonitor bullet proof
* various other smaller fixes
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
If modemmonitor crash for some reason, status bar is not updated. The
reason is that statusbar check if modemmonitor is running, which it is
when trying to shutdown itself.
We change the way modemmonitor is detected using a single modem state
file. If the file is not present, then the monitor is considered not
running.
This single file permit to add more state in the future, without adding
any more files.
We also add a sleep 1, look like it is required to have instand status
bar update.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Breaking change. Make sure you send an email to the mailing list
telling users to move their
$XDG_CONFIG_HOME/{modem,notifications} files/folders to
$XDG_DATA_HOME
Signed-off-by: Anjandev Momi <anjan@momi.ca>