Simplify the termmode detection

As we now rely on sxmo_terminal.sh and the TERMCMD env variable, we then
can simplify things.

In the sxmo dwm context, TERMCMD="st -e" so sxmo_terminal.sh will run
the command in st.

In the ssh context, we dont have TERMCMD so sxmo_terminal.sh will just
run the command

In a tmux context, we can set TERMCMD="tmux split-window" with
set-environment -g TERMCMD "tmux split-window"
so sxmo_terminal.sh will run the command in a splited window.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
Stacy Harper 2021-06-17 19:01:46 +02:00 committed by Maarten van Gompel
parent a10d556993
commit e428d0c4a4
3 changed files with 4 additions and 9 deletions

View file

@ -6,7 +6,7 @@ envvars() {
[ -f /etc/profile ] && . /etc/profile
# shellcheck source=/dev/null
[ -f "$HOME"/.profile ] && . "$HOME"/.profile
command -v "$TERMCMD" || export TERMCMD=st
command -v "$TERMCMD" || export TERMCMD="st -e"
command -v "$BROWSER" || export BROWSER=surf
command -v "$EDITOR" || export EDITOR=vis
command -v "$SHELL" || export SHELL=/bin/sh