~mil/sxmo-devel

sxmo-utils: statusbar: remove redundant symbols when modem has failed or unknown v1 PROPOSED

hazardchem: 1
 statusbar: remove redundant symbols when modem has failed or unknown

 1 files changed, 8 insertions(+), 4 deletions(-)
#1214552 test.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mil/sxmo-devel/patches/51669/mbox | git am -3
Learn more about email & git

[PATCH sxmo-utils] statusbar: remove redundant symbols when modem has failed or unknown Export this patch

This modifies the statusbar hook so that if there is a modem state that doesn't
match failed or unknown then show used techs and signal.

Currently if there isn't a sim in the modem there will be $icon_modem_failed, $icon_modem_notech, and $icon_modem_signal_0.

After this all that shows is $icon_modem_failed.

Signed-off-by: hazardchem <hazardchem@disroot.org>
---
 configs/default_hooks/sxmo_hook_statusbar.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/configs/default_hooks/sxmo_hook_statusbar.sh b/configs/default_hooks/sxmo_hook_statusbar.sh
index 2c3c309..27393cc 100755
--- a/configs/default_hooks/sxmo_hook_statusbar.sh
+++ b/configs/default_hooks/sxmo_hook_statusbar.sh
@@ -178,8 +178,10 @@ set_modem() {
				;;
		esac

	sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
		modem-tech 11 "$MODEMTECHCMP"
   if [ "$MODEMSTATE" != failed ] && [ "$MODEMSTATE" != unknown ]; then
        sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
            modem-tech 11 "$MODEMTECHCMP"
    fi

	MODEMSIGNALCMP="$icon_modem_signal_0"
	bgcolor=default
@@ -199,8 +201,10 @@ set_modem() {
		;;
	esac

	sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
		modem-signal 12 "$MODEMSIGNALCMP"
   if [ "$MODEMSTATE" != failed ] && [ "$MODEMSTATE" != unknown ]; then
        sxmobar -a -f "$fgcolor" -b "$bgcolor" -t "$style" \
            modem-signal 12 "$MODEMSIGNALCMP"
    fi
}

# $1 = type (wifi, tun)
-- 
2.44.0
sxmo-utils/patches/test.yml: SUCCESS in 22s

[statusbar: remove redundant symbols when modem has failed or unknown][0] from [hazardchem][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/51669
[1]: mailto:hazardchem@disroot.org

✓ #1214552 SUCCESS sxmo-utils/patches/test.yml https://builds.sr.ht/~mil/job/1214552