~anjan/public-inbox

sxmo-userscripts: Added scale_display.sh v1 APPLIED

Frank Oltmanns: 1
 Added scale_display.sh

 1 files changed, 24 insertions(+), 0 deletions(-)
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/~anjan/public-inbox/patches/28098/mbox | git am -3
Learn more about email & git

[PATCH sxmo-userscripts] Added scale_display.sh Export this patch

A simple script that let's you select the scale factor of the device's
display.
---
 scripts/scale_display.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 scripts/scale_display.sh

diff --git a/scripts/scale_display.sh b/scripts/scale_display.sh
new file mode 100755
index 0000000..4f1eb77
--- /dev/null
+++ b/scripts/scale_display.sh
@@ -0,0 +1,24 @@
#!/bin/sh
# Simple script that let's you select the scale factor of the device's
# display.
#
# License: MIT

menu() {
	sxmo_keyboard.sh open
	SCALEINPUT="$(
	echo "
		2
		1.75
		1.5
		1.25
		1
		Close Menu
	" | awk 'NF' | awk '{$1=$1};1' | sxmo_dmenu.sh -p Select scale factor
	)"
	sxmo_keyboard.sh close
	[ "Close Menu" = "$SCALEINPUT" ] && exit 0
	swaymsg "output \"DSI-1\" scale $SCALEINPUT"
}

menu
-- 
2.34.1
I added a simple commit to the readme explaining what the script does.

https://git.sr.ht/~anjan/sxmo-userscripts/commit/6d81f1758dbbf948370020da0373fe631b109a37

Thanks - Applied,
Anjandev Momi
--
w:] www.momi.ca
pgp:] https://momi.ca/publickey.txt