~mil/sxmo-devel

sxmo-utils: sxmo_hook_statusbar: simple suboptimal notch implementation v1 PROPOSED

Maarten van Gompel: 1
 sxmo_hook_statusbar: simple suboptimal notch implementation

 2 files changed, 9 insertions(+), 1 deletions(-)
#1212228 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/51596/mbox | git am -3
Learn more about email & git

[PATCH sxmo-utils] sxmo_hook_statusbar: simple suboptimal notch implementation Export this patch

* set SXMO_NOTCH to a string to use for the notch (length determines width), do not use spaces/tabs
* optionally set SXMO_NOTCH_PRIO to a placement value (trial and error)
---
 configs/default_hooks/sxmo_hook_statusbar.sh             | 9 ++++++++-
 .../sxmo_deviceprofile_oneplus,enchilada.sh              | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configs/default_hooks/sxmo_hook_statusbar.sh b/configs/default_hooks/sxmo_hook_statusbar.sh
index 2c3c309..6e2871b 100755
--- a/configs/default_hooks/sxmo_hook_statusbar.sh
+++ b/configs/default_hooks/sxmo_hook_statusbar.sh
@@ -414,6 +414,12 @@ set_volume() {
	fi
}

set_notch() {
	if [ -n "$SXMO_NOTCH" ]; then
		sxmobar -a notch "${SXMO_NOTCH_PRIO:-29}" "$SXMO_NOTCH"
	fi
}

sxmo_debug "$@"
case "$1" in
	network)
@@ -424,7 +430,7 @@ case "$1" in
		shift
		set_battery "$@"
		;;
	time|modem|volume|state|notifications)
	time|modem|volume|state|notifications|notch)
		set_"$1"
		;;
	periodics|state_change) # 55 s loop and screenlock triggers
@@ -446,6 +452,7 @@ case "$1" in
		fi
		set_state
		set_notifications
		set_notch
		set_network wifi wlan0
		;;
	*)
diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh b/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh
index 8b9c62b..ab7f296 100755
--- a/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh
+++ b/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh
@@ -8,3 +8,4 @@ export SXMO_MONITOR="DSI-1"
export SXMO_VIBRATE_DEV="/dev/input/by-path/platform-c440000.spmi-platform-c440000.spmi:pmic@3:haptics@c000-event"
export SXMO_VIBRATE_STRENGTH="5000"
export SXMO_SWAY_SCALE="3"
export SXMO_NOTCH="··········"
-- 
2.45.0
Please send a patch documenting this. Otherwise, this is ready to merge.
sxmo-utils/patches/test.yml: SUCCESS in 22s

[sxmo_hook_statusbar: simple suboptimal notch implementation][0] from [Maarten van Gompel][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/51596
[1]: mailto:proycon@anaproy.nl

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