Files
sxmo-utils/scripts/core/sxmo_terminal.sh
hazardchem bb0c5578b1 sxmo_terminal.sh: Add alacritty as option
Signed-off-by: hazardchem <pthom44@live.com.au>
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
2023-06-05 13:41:00 +02:00

33 lines
570 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors
# shellcheck disable=SC2086
if [ -z "$*" ]; then
set -- $SHELL
fi
if [ -z "$TERMNAME" ]; then
TERMNAME="$*"
fi
case "$TERMCMD" in
"st"*)
set -- $TERMCMD -T "$TERMNAME" -e "$@"
;;
"foot"*)
set -- $TERMCMD -T "$TERMNAME" "$@"
;;
"vte-2.91"*)
set -- ${TERMCMD% --} --title "$TERMNAME" -- "$@"
;;
"alacritty"*)
set -- $TERMCMD -T "$TERMNAME" -e "$@"
;;
*)
printf "%s: '%s'\n" "Not implemented for TERMCMD" "$TERMCMD" >&2
set -- $TERMCMD "$@"
esac
exec "$@"