Print escape sequence to set the window title

Using xdotool was probably a little less portable, because it relied on
the newly created window to be activated by the window manager.
This commit is contained in:
codesoap 2019-06-18 11:41:59 +02:00
parent feebad14b0
commit 9d8fb8bc31

View File

@ -15,9 +15,8 @@ All optional parameters are forwarded to the new window} \
exit exit
fi fi
if [ $# -eq 0 ]; then cmd="${SHELL:-sh}"; else cmd="$@"; fi if [ $# -eq 0 ]; then cmd="${SHELL:-sh}"; else cmd="$@"; fi
setsid ${kak_opt_termcmd} \ setsid ${kak_opt_termcmd} "printf '\e]2;kak_repl_window\a' \
"xdotool getactivewindow set_window --name kak_repl_window \ && ${cmd}" < /dev/null > /dev/null 2>&1 &
&& exec \"${cmd}\"" < /dev/null > /dev/null 2>&1 &
}} }}
define-command x11-send-text -docstring "send the selected text to the repl window" %{ define-command x11-send-text -docstring "send the selected text to the repl window" %{