Do not enforce -e TERMCMD args and fix TERMMODE
Enforcing -e break some possibilities to use TERMCMD that dont use it. TERMCMD should be setup in xinit. This way, in ssh mode, the value still is empty. This way, some custom bash or tmux config could use it, configuring it.
This commit is contained in:
parent
77420ebaf2
commit
c5c5537873
2 changed files with 4 additions and 12 deletions
|
@ -52,6 +52,8 @@ command -v firefox && export BROWSER=firefox
|
|||
#(useful for getting notifications)
|
||||
#export SXMO_RTCWAKEINTERVAL=300
|
||||
|
||||
export TERMCMD="st -e"
|
||||
|
||||
# Immediately turn the screen off when locking the device
|
||||
export SXMO_LOCK_SCREEN_OFF=1
|
||||
|
||||
|
|
|
@ -1,17 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# You can export a different terminal in your xinit
|
||||
TERMCMD="${TERMCMD:-st}"
|
||||
TERMMODE=$([ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && echo "true")
|
||||
|
||||
if [ "$TERMMODE" = "true" ]; then
|
||||
while [ "-e" != "$1" ] || [ 0 -eq $# ]; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
else
|
||||
set -- "$TERMCMD" -e "$@"
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
set -- $TERMCMD "$@"
|
||||
|
||||
if [ -z "$*" ]; then
|
||||
echo "sxmo_terminal.sh called in TERMMODE without any arguments (returning, nothing to do)" >&2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue