File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ declare -A terminals=(
4848 [" kitty" ]=" kitty $cmd "
4949 [" ptyxis" ]=" ptyxis -- $cmd "
5050 [" konsole" ]=" konsole -e $cmd "
51+ [" kgx" ]=" kgx --wait -- $cmd "
5152 [" gnome-terminal" ]=" gnome-terminal --wait -- $cmd "
5253 [" xfce4-terminal" ]=" xfce4-terminal --disable-server --command '$cmd '"
5354 [" lxterminal" ]=" lxterminal -e $cmd "
@@ -56,11 +57,14 @@ declare -A terminals=(
5657 [" foot" ]=" foot $cmd "
5758 [" rio" ]=" rio -e $cmd "
5859)
59- declare -a term_order=(" alacritty" " kitty" " ptyxis" " konsole" " gnome-terminal" " xfce4-terminal" " lxterminal" " xterm" " st" " foot" " rio" )
60+ declare -a term_order=(" alacritty" " kitty" " ptyxis" " konsole" " kgx " " gnome-terminal" " xfce4-terminal" " lxterminal" " xterm" " st" " foot" " rio" )
6061
6162if [ -z " $terminal " ] || ! command -v " $terminal " & > /dev/null; then
6263for entry in ${term_order[@]} ; do
6364 if command -v " $entry " > /dev/null 2>&1 ; then
65+ # gnome-console does not exit on command completion so we need to kill
66+ # it manually
67+ [[ " $entry " == " kgx" ]] && echo " kill -SIGQUIT \$ PPID 2>/dev/null" >> " $file "
6468 terminal=" $entry "
6569 break ;
6670 fi
@@ -72,5 +76,5 @@ if [ -z "$terminal" ]; then
7276 exit 1
7377fi
7478
75- eval " ${terminals[${terminal}]} " || { rm " $file " ; exit 2; }
79+ eval " ${terminals[${terminal}]} " 2> /dev/null || [[ " $terminal " != " kgx " ]] && { rm " $file " ; exit 2; }
7680rm " $file "
You can’t perform that action at this time.
0 commit comments