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>
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>
This is usefull for cron jobs that would manage sxmo like screenlock by
example.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This add a script to use either the user hook or the default one.
Sometime we checked the user hook or a default code. We move this
default code in a defaut hook.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
mnc goal is to display when will occurs the next cron job.
We drop the "sxmo_screenlock.sh rtc" command and the
SXMO_RTCWAKEINTERVAL variable. We will now only use
"sxmo_screenlock.sh crust" which mean suspend until next cron job
(-2 seconds).
To replicate the old behavior of the blinking phone then returning to
suspension (if needed) we now use a new script.
By example:
*/15 * * * * DISPLAY=:0 sxmo_rtcwake.sh sleep 10
This will trigger a 10s sleep task every 15 minutes (the old default
rtcwake hook).
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This fixes a bug where I was getting "binary file
~/.local/modem/modemlog.tsv matches" instead of getting a list of recent
contacts in sxmo_modemtext.sh. Turns out, having gnu grep breaks the behaviour
of showing a list of contacts. This patch ensures we are always using busybox
grep.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
The Debian busybox does not provide those applets. This makes no
difference for PostmarketOS as they are an alias to busybox.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
We then simplify the sxmo_modemtext that was already using SSH related
behaviors.
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>
This reverts commit 3bb3fb6094.
We cannot use this special less argument as it is not busybox less
compatible.
I add busybox aliases to not reproduce the error in the future.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>