This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/terminal

38 lines
841 B
Bash
Executable File

#!/bin/sh
CLASS="terminal"
while test $# -gt 0;do
case $1 in
-c|--class)
shift
CLASS=$1
shift
;;
*)
break
;;
esac
done
test "$1" = "-e" && shift
# {%@@ if terminal == "alacritty" @@%} #
command -v alacritty > /dev/null &&
{
test $# -gt 0 &&
exec alacritty --class "$CLASS" -e $@ ||
exec alacritty --class "$CLASS"
}
# {%@@ elif terminal == "foot" @@%} #
if ! pidof foot; then
foot --server 2> /dev/null &
fi
command -v footclient > /dev/null &&
exec footclient --app-id "$CLASS" -- $@
# {%@@ elif terminal == "kitty" @@%} #
command -v kitty > /dev/null &&
exec kitty --class "$CLASS" -- $@
# {%@@ endif @@%} #
notify-send "Error" "Terminal program missing"