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