From 64c4a4fb7e151ec16c647b51926677dd7fc22af4 Mon Sep 17 00:00:00 2001 From: eshanized Date: Tue, 16 Apr 2024 18:23:04 +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 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/usr/bin/exec-terminal b/usr/bin/exec-terminal index 6d1e5aa..ec77d8a 100644 --- a/usr/bin/exec-terminal +++ b/usr/bin/exec-terminal @@ -70,3 +70,27 @@ if [ -z "$terminal" ] || ! command -v "$terminal" &>/dev/null; then fi done fi + +if [ -z "$terminal" ]; then + notify-send -t 15000 --app-name=Garuda\ Linux "No terminal installed" "No supported terminal emulator is installed. Please install a terminal emulator like Alacritty." + exit 1 +fi + +# Special kgx, thanks gnome +if [ "$terminal" == "kgx" ]; then + sed -i '2i sleep 0.1' $initfile + echo 'kill -SIGINT $PPID' >>$initfile +fi + +eval "${terminals[${terminal}]}" || { + exitcode=$? +} + +rm "$initfile" +if [ "$codefile" != "$initfile" ]; then + rm "$codefile" +fi + +if [ ! -z "$exitcode" ] && [ "$exitcode" != 130 ]; then + exit 2 +fi