Update rc/client.kak
to fit the tmux changes
Trim the script to remove any reference to tmux, and reflect the changes made in the previous commit.
This commit is contained in:
parent
678acd32bc
commit
284a40f681
|
@ -1,9 +1,6 @@
|
||||||
# termcmd should be set such as the next argument is the whole
|
# termcmd should be set such as the next argument is the whole
|
||||||
# command line to execute
|
# command line to execute
|
||||||
decl str termcmd %sh{
|
decl str termcmd %sh{
|
||||||
if [ -n "$TMUX" ]; then
|
|
||||||
echo "'tmux split-window -h'"
|
|
||||||
else
|
|
||||||
for termcmd in 'termite -e ' \
|
for termcmd in 'termite -e ' \
|
||||||
'urxvt -e sh -c' \
|
'urxvt -e sh -c' \
|
||||||
'rxvt -e sh -c' \
|
'rxvt -e sh -c' \
|
||||||
|
@ -18,7 +15,6 @@ decl str termcmd %sh{
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def -docstring 'create a new kak client for current session' \
|
def -docstring 'create a new kak client for current session' \
|
||||||
|
@ -35,16 +31,14 @@ def -docstring 'create a new kak client for current session' \
|
||||||
|
|
||||||
def -docstring 'focus given client' \
|
def -docstring 'focus given client' \
|
||||||
-shell-params -client-completion \
|
-shell-params -client-completion \
|
||||||
focus %{ %sh{
|
focus-default %{ %sh{
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
echo "echo -color Error 'too many arguments, use focus [client]'"
|
echo "echo -color Error 'too many arguments, use focus [client]'"
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
echo "eval -client '$1' focus"
|
echo "eval -client '$1' focus"
|
||||||
else
|
|
||||||
if [ -n "$kak_client_env_TMUX" ]; then
|
|
||||||
TMUX="$kak_client_env_TMUX" tmux select-pane -t "$kak_client_env_TMUX_PANE" > /dev/null
|
|
||||||
else
|
else
|
||||||
xdotool windowactivate $kak_client_env_WINDOWID > /dev/null
|
xdotool windowactivate $kak_client_env_WINDOWID > /dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
} }
|
} }
|
||||||
|
## Create an alias to the default focus callback to allow overriding from custom scripts (i.e. tmux)
|
||||||
|
alias global focus focus-default
|
||||||
|
|
Loading…
Reference in New Issue
Block a user