mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 21:32:36 +01:00
Fix terminal params
This commit is contained in:
parent
1633e5cf2d
commit
852ed98701
1 changed files with 12 additions and 2 deletions
14
dzgui.sh
14
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)
|
||||
|
|
Loading…
Reference in a new issue