~mil/sxmo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 3

[PATCH sxmo-utils v2] Replace attachment icon emoji with a glyph from Nerd Fonts

Details
Message ID
<20220511144142.37878-1-jami.kettunen@protonmail.com>
DKIM signature
missing
Download raw message
Patch: +6 -3
This looks much cleaner with the rest of the UI already using glyphs
anyway.

Additionally split the long ATTACHMENTS assignment into multiple lines,
fix printf formatting usage and basename for filenames with spaces.

Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
---
 configs/default_hooks/sxmo_hook_icons.sh | 2 +-
 scripts/modem/sxmo_modemtext.sh          | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/configs/default_hooks/sxmo_hook_icons.sh b/configs/default_hooks/sxmo_hook_icons.sh
index dcb5c98..fef5a8b 100644
--- a/configs/default_hooks/sxmo_hook_icons.sh
+++ b/configs/default_hooks/sxmo_hook_icons.sh
@@ -23,7 +23,7 @@ icon_ard=""
icon_arl=""
icon_arr=""
icon_aru=""
icon_att="📎"
icon_att=""
icon_bel=""
icon_bok=""
icon_btd="" # bluethooth device
diff --git a/scripts/modem/sxmo_modemtext.sh b/scripts/modem/sxmo_modemtext.sh
index 12be29a..08cfa17 100755
--- a/scripts/modem/sxmo_modemtext.sh
+++ b/scripts/modem/sxmo_modemtext.sh
@@ -67,7 +67,10 @@ sendtextmenu() {
		ATTACHMENTS=
		if [ -f "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" ]; then
			# shellcheck disable=SC2016
			ATTACHMENTS="$(tr '\n' '\0' < "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" | xargs -0 -I{} sh -c 'printf " 📎 "$(basename {})" :: {}\n"')"
			ATTACHMENTS="$(
				tr '\n' '\0' < "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" |
				xargs -0 -I{} sh -c 'printf "%s %s %s :: %s\n" "" "" "$(basename "{}")" "{}"'
			)"
		fi

		RECIPIENTS=
@@ -94,7 +97,7 @@ sendtextmenu() {
				fi
				;;
			# Remove Attachment
			" 📎"*)
			" "*)
				FILE="$(printf %s "$CONFIRM" | awk -F' :: ' '{print $2}')"  
				sed -i "\|$FILE|d" "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt"
				if [ ! -s "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" ] ; then
-- 
2.36.1

[sxmo-utils/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CJX0FNSTWXBR.2BQ6MHAK5UEEO@cirno2>
In-Reply-To
<20220511144142.37878-1-jami.kettunen@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
sxmo-utils/patches/.build.yml: SUCCESS in 23s

[Replace attachment icon emoji with a glyph from Nerd Fonts][0] v2 from [Jami Kettunen][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/32179
[1]: jamipkettunen@gmail.com

✓ #756022 SUCCESS sxmo-utils/patches/.build.yml https://builds.sr.ht/~mil/job/756022
Details
Message ID
<YnvXCFVyUfcsHMua@auriol.trilidun.org>
In-Reply-To
<20220511144142.37878-1-jami.kettunen@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
Thank you, applied!


--
sic dicit magister P
https://phartman.sites.luc.edu/
GPG keyID 0xE0DBD3D6 (CAE6 3A6F 755F 7BC3 36CA  330D B3E6 39C6 E0DB D3D6)
Reply to thread Export thread (mbox)