From e8582f4212a6c1bf6e252a7bb22dbb76e8288f68 Mon Sep 17 00:00:00 2001 From: eshanized Date: Tue, 16 Apr 2024 18:22:33 +0530 Subject: [PATCH] =?UTF-8?q?=E2=8F=B3=20@eshanized=20updated=20the=20reposi?= =?UTF-8?q?tory=20=F0=9F=8E=89=20!!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/bin/exec-terminal | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/usr/bin/exec-terminal b/usr/bin/exec-terminal index e51fcee..55f3ecc 100644 --- a/usr/bin/exec-terminal +++ b/usr/bin/exec-terminal @@ -40,3 +40,24 @@ terminal="" declare -A terminals=(["alacritty"]="alacritty -e $cmd || LIBGL_ALWAYS_SOFTWARE=1 alacritty -e $cmd" ["konsole"]="konsole -e $cmd" ["kgx"]="kgx -- $cmd" ["gnome-terminal"]="gnome-terminal --wait -- $cmd" ["xfce4-terminal"]="xfce4-terminal --disable-server --command '$cmd'" ["qterminal"]="qterminal -e $cmd" ["lxterminal"]="lxterminal -e $cmd" ["mate-terminal"]="mate-terminal --disable-factory -e $cmd" ["xterm"]="xterm -e $cmd" ["foot"]="foot -T launch-terminal -e $cmd") declare -a term_order=("alacritty" "konsole" "kgx" "gnome-terminal" "mate-terminal" "xfce4-terminal" "qterminal" "lxterminal" "xterm" "foot") +case "$XDG_CURRENT_DESKTOP" in +KDE) + terminal=konsole + ;; +GNOME) + if command -v "kgx" &>/dev/null; then + terminal=kgx + else + terminal=gnome-terminal + fi + ;; +XFCE) + terminal=xfce4-terminal + ;; +LXQt) + terminal=qterminal + ;; +MATE) + terminal=mate-terminal + ;; +esac