This script allows spawning a shell or an arbitrary command in a new window, exporting information about the current session in the environment.
The following commands are specialized implementations that all follow the same prototype. They all take an optional argument, a shell command that will be run in the newly created window. If no command is passed, a shell is spawned.
The environment of the newly created window will contain the following environment variables:
-
KAK_SESSION
: name of the parent session that spawned the window -
KAK_CLIENT
: name of the parent client that spawned the window
Implementation used when no multiplexer is detected and the $DISPLAY
environment variable is not empty. A new terminal is spawned using the termcmd
option.
Implementation used when the $TMUX
environment variable is not empty, creates an horizontal split by default.