From c44bb1b4d52539f8c497defa0efab885b23478f3 Mon Sep 17 00:00:00 2001 From: Nulo Date: Sun, 10 Jul 2022 21:06:33 -0300 Subject: [PATCH] kak: Preferir tmux por sobre Wayland MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Y agregar comentario de donde encontré el snippet de tmux --- .config/kak/kakrc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 05e74d8..08a167c 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -58,15 +58,8 @@ hook global WinSetOption filetype=go %{ # ------------ eval %sh{ - if test -n "$WAYLAND_DISPLAY"; then echo ' - hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" } - define-command terminal-popup -params 1.. -shell-completion %{ - set-option global termcmd "footclient --app-id=fzf sh -c" - wayland-terminal %arg{@} - set-option global termcmd "footclient sh -c" - } - ' - elif test -n "$TMUX"; then echo " + # https://github.com/alexherbo2/kakoune.cr/issues/33#issuecomment-1112160325 + if test -n "$TMUX"; then echo " define-command tmux-terminal-popup -params 1.. -shell-completion -docstring ' tmux-terminal-popup []: create a new terminal as a tmux popup The program passed as argument will be executed in the new popup' \ @@ -75,6 +68,14 @@ eval %sh{ } alias global terminal-popup tmux-terminal-popup " + elif test -n "$WAYLAND_DISPLAY"; then echo ' + hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" } + define-command terminal-popup -params 1.. -shell-completion %{ + set-option global termcmd "footclient --app-id=fzf sh -c" + wayland-terminal %arg{@} + set-option global termcmd "footclient sh -c" + } + ' fi }