From efdc57cef7323b6c6c898e227d6bed9e99297ce2 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 1 Nov 2023 11:21:19 +0100 Subject: [PATCH] rc windowing sway: add sway-terminal-{vertical/horizontal} --- rc/windowing/sway.kak | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/rc/windowing/sway.kak b/rc/windowing/sway.kak index 4df12240..28de84a0 100644 --- a/rc/windowing/sway.kak +++ b/rc/windowing/sway.kak @@ -9,6 +9,26 @@ evaluate-commands %sh{ require-module 'wayland' +define-command sway-terminal-vertical -params 1.. -docstring ' + sway-terminal-vertical []: create a new terminal as a Sway window + The current pane is split into two, top and bottom + The program passed as argument will be executed in the new terminal' \ +%{ + nop %sh{swaymsg split vertical} + wayland-terminal-window %arg{@} +} +complete-command sway-terminal-vertical shell + +define-command sway-terminal-horizontal -params 1.. -docstring ' + sway-terminal-horizontal []: create a new terminal as a Sway window + The current pane is split into two, left and right + The program passed as argument will be executed in the new terminal' \ +%{ + nop %sh{swaymsg split horizontal} + wayland-terminal-window %arg{@} +} +complete-command sway-terminal-horizontal shell + define-command sway-focus-pid -hidden %{ evaluate-commands %sh{ pid=$kak_client_pid @@ -45,7 +65,6 @@ If no client is passed, then the current client is used' \ } complete-command -menu sway-focus client -unalias global focus alias global focus sway-focus }