~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 2

[PATCH sxmo-utils] Differenciate TERMCMD and SXMO_TERMINAL

Details
Message ID
<20230829185642.28974-2-contact@willowbarraco.fr>
DKIM signature
missing
Download raw message
Patch: +13 -11
Without this, sxmo_open.sh and so sxmo_files.sh fails to setup the
correct window titles for terminal desktop programs

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
---
 configs/appcfg/profile_template |  5 ++++-
 scripts/core/sxmo_open.sh       |  1 -
 scripts/core/sxmo_terminal.sh   | 14 +++++++-------
 scripts/core/sxmo_winit.sh      |  2 +-
 scripts/core/sxmo_xinit.sh      |  2 +-
 5 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/configs/appcfg/profile_template b/configs/appcfg/profile_template
index 927e869..bed7542 100755
--- a/configs/appcfg/profile_template
+++ b/configs/appcfg/profile_template
@@ -28,7 +28,10 @@ command -v firefox >/dev/null && export BROWSER=firefox
#export SXMO_SUBREDDITS="postmarketos pinephoneOfficial pinephone unixporn"

# Change the default terminal command
# export TERMCMD="st -e"
export TERMCMD="sxmo_terminal.sh"

# Change the used terminal command
# export SXMO_TERMINAL="st -e"

# When scrolling past the beginning or end of a menu, wrap it around:
#export DMENU_WRAP_AROUND=1
diff --git a/scripts/core/sxmo_open.sh b/scripts/core/sxmo_open.sh
index 92b34fe..0e35fec 100755
--- a/scripts/core/sxmo_open.sh
+++ b/scripts/core/sxmo_open.sh
@@ -13,7 +13,6 @@ CACHE_DIR="${XDG_RUNTIME_DIR:-$HOME/.run}/xdg-open-cache"
[ ! -d "$CACHE_DIR" ] && mkdir -p "$CACHE_DIR"
attached=
debug=
TERMCMD="${TERMCMD:-st -e}"

# This will convert a mimeapps.list to a parsable mapping
# Lines with multiple mimetype will be splitted
diff --git a/scripts/core/sxmo_terminal.sh b/scripts/core/sxmo_terminal.sh
index 7a265c4..190d5cd 100755
--- a/scripts/core/sxmo_terminal.sh
+++ b/scripts/core/sxmo_terminal.sh
@@ -11,22 +11,22 @@ if [ -z "$TERMNAME" ]; then
	TERMNAME="$*"
fi

case "$TERMCMD" in
case "$SXMO_TERMINAL" in
	"st"*)
		set -- $TERMCMD -T "$TERMNAME" -e "$@"
		set -- $SXMO_TERMINAL -T "$TERMNAME" -e "$@"
		;;
	"foot"*)
		set -- $TERMCMD -T "$TERMNAME" "$@"
		set -- $SXMO_TERMINAL -T "$TERMNAME" "$@"
		;;
	"vte-2.91"*)
		set -- ${TERMCMD% --} --title "$TERMNAME" -- "$@"
		set -- ${SXMO_TERMINAL% --} --title "$TERMNAME" -- "$@"
		;;
	"alacritty"*)
		set -- $TERMCMD -T "$TERMNAME" -e "$@"
		set -- $SXMO_TERMINAL -T "$TERMNAME" -e "$@"
		;;
	*)
		printf "%s: '%s'\n" "Not implemented for TERMCMD" "$TERMCMD" >&2
		set -- $TERMCMD "$@"
		printf "%s: '%s'\n" "Not implemented for SXMO_TERMINAL" "$SXMO_TERMINAL" >&2
		set -- $SXMO_TERMINAL "$@"
esac

exec "$@"
diff --git a/scripts/core/sxmo_winit.sh b/scripts/core/sxmo_winit.sh
index fa78061..0b28d8b 100755
--- a/scripts/core/sxmo_winit.sh
+++ b/scripts/core/sxmo_winit.sh
@@ -8,7 +8,7 @@ envvars() {
	export SDL_VIDEODRIVER=wayland
	export XDG_CURRENT_DESKTOP=sway
	# shellcheck disable=SC2086
	command -v $TERMCMD "" >/dev/null || export TERMCMD="foot"
	command -v $SXMO_TERMINAL "" >/dev/null || export SXMO_TERMINAL="foot"
	command -v "$KEYBOARD" >/dev/null || export KEYBOARD=wvkbd-mobintl
	[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1
}
diff --git a/scripts/core/sxmo_xinit.sh b/scripts/core/sxmo_xinit.sh
index 4a71c48..c934149 100755
--- a/scripts/core/sxmo_xinit.sh
+++ b/scripts/core/sxmo_xinit.sh
@@ -9,7 +9,7 @@ envvars() {
	export SXMO_WM=dwm
	export XDG_CURRENT_DESKTOP=dwm
	# shellcheck disable=SC2086
	command -v $TERMCMD "" >/dev/null || export TERMCMD="st"
	command -v $SXMO_TERMINAL "" >/dev/null || export SXMO_TERMINAL="st -e"
	command -v "$KEYBOARD" >/dev/null || defaultkeyboard
	[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1
}
-- 
2.42.0

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

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CV59BJ56XOJF.3BBVO0L4BK8XB@cirno2>
In-Reply-To
<20230829185642.28974-2-contact@willowbarraco.fr> (view parent)
DKIM signature
missing
Download raw message
sxmo-utils/patches/test.yml: SUCCESS in 44s

[Differenciate TERMCMD and SXMO_TERMINAL][0] from [Willow Barraco][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/44135
[1]: contact@willowbarraco.fr

✓ #1049595 SUCCESS sxmo-utils/patches/test.yml https://builds.sr.ht/~mil/job/1049595
Details
Message ID
<CVE83DBG3NES.2OS588BEF1BAH@navi>
In-Reply-To
<20230829185642.28974-2-contact@willowbarraco.fr> (view parent)
DKIM signature
missing
Download raw message
Thanks!

To git@git.sr.ht:~mil/sxmo-utils
   e2b2c51..e6c02e3  master -> master
--
w:] www.momi.ca
pgp:] https://momi.ca/publickey.txt
Reply to thread Export thread (mbox)