#!/usr/bin/env bash
# -*-coding:utf-8 -*-
# Auto updated?
#   Yes
#File :
#   i3_run
#Author:
#   The-Repo-Club [wayne6324@gmail.com]
#
# Created:
#   Sun 19 October 2022, 01:26:51 PM [GMT]
# Modified:
#   Fri 21 January 2022, 02:29:56 PM [GMT]
#
# Description:
#   <Todo>
#

i3_run () {
    for terminal in "$TERMINAL" kitty alacritty terminator xfce4-terminal urxvt termit xterm termite lxterminal terminology st konsole ; do
        if command -v "$terminal" > /dev/null 2>&1; then
            if [ "$terminal" = "alacritty" ]; then
                exec "$terminal" --title $1 --class $1,$1 -e "$@"
            elif [ "$terminal" = "kitty" ]; then
                exec "$terminal" --title=$1 --class=$1 --name=$1 -e "$@"
            else
                exec "$terminal" "$@"
            fi
        fi
    done
}

i3_run $@