client.kak: allow granular terminal ordering in termcmd option

This commit is contained in:
Alex Leferry 2 2014-07-04 15:41:49 +02:00
parent 6a1c98d04a
commit a73bb330ea

View File

@ -4,15 +4,16 @@ decl str termcmd %sh{
if [ -n "$TMUX" ]; then if [ -n "$TMUX" ]; then
echo "'tmux split-window -h'" echo "'tmux split-window -h'"
else else
for terminal in urxvt rxvt xterm roxterm mintty; do for termcmd in 'urxvt -e sh -c' \
'rxvt -e sh -c' \
'xterm -e sh -c' \
'roxterm -e sh -c' \
'mintty -e sh -c' \
'gnome-terminal -e ' \
'xfce4-terminal -e ' ; do
terminal=${termcmd%% *}
if which $terminal > /dev/null 2>&1; then if which $terminal > /dev/null 2>&1; then
echo "'$terminal -e sh -c'" echo "'$termcmd'"
exit
fi
done
for terminal in gnome-terminal xfce4-terminal; do
if which $terminal > /dev/null 2>&1; then
echo "'$terminal -e'"
exit exit
fi fi
done done