Files

35 lines
530 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors
# shellcheck disable=SC2086
export TERM=xterm-256color
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
SXMO_TERMINAL="${SXMO_TERMINAL:-st}"
if [ -z "$*" ]; then
set -- ${SHELL:-/bin/sh}
fi
if [ -z "$TERMNAME" ]; then
TERMNAME="$*"
fi
case "$SXMO_TERMINAL" in
"st"*)
set -- $SXMO_TERMINAL -T "$TERMNAME" -e "$@"
;;
*)
set -- st -T "$TERMNAME" -e "$@"
;;
esac
exec 4<&0
exec 5>&1
exec 6>&2
exec "$@"