From 852ed9870149fca1092c72c75335a878dc272ec3 Mon Sep 17 00:00:00 2001 From: aclist Date: Sat, 8 Oct 2022 13:46:56 +0900 Subject: [PATCH] Fix terminal params --- dzgui.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 84333a2..ca2046c 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -370,7 +370,7 @@ set_term(){ } sel_term(){ #only terminals known to support -e flag - for i in "$TERMINAL" urxvt alacritty konsole gnome-terminal terminator xfce4-terminal xterm st tilix; do + for i in "$TERMINAL" urxvt alacritty konsole gnome-terminal terminator xfce4-terminal xterm tilix; do [[ $(command -v $i) ]] && terms+=($i) done #FIXME: if no terms, error @@ -383,6 +383,14 @@ calc_mod_sizes(){ done totalmodsize=$(echo -e "${mods[@]}" | awk '{s+=$1}END{print s}') } +term_params(){ + case $term in + konsole) $term --hold -e "bash $helpers_path/scmd.sh $totalmodsize $1";; + urxvt) $term -e bash -c "/$helpers_path/scmd.sh $totalmodsize $1";; + alacritty) $term -e bash -c "/$helpers_path/scmd.sh $totalmodsize $1";; + terminator|xterm|tilix|xfce4-terminal) $term -e "bash $helpers_path/scmd.sh $totalmodsize $1";; + esac +} auto_mod_install(){ cmd=$(printf "%q " "$@") if [[ -z "$term" ]]; then @@ -396,7 +404,9 @@ auto_mod_install(){ [[ -z "$term" ]] && return 1 echo "[DZGUI] Kicking off auto mod script" calc_mod_sizes - $term -e bash -c "/$helpers_path/scmd.sh $totalmodsize $cmd" + term_params "$cmd" + #$term -e bash -c "/$helpers_path/scmd.sh $totalmodsize $cmd" +# $term -e "bash $helpers_path/scmd.sh $totalmodsize $cmd" compare if [[ -z $diff ]]; then passed_mod_check > >(zenity --pulsate --progress --auto-close --width=500 2>/dev/null)