From dd99ddbe61911d2a1f3ae956da2b1903aca084b9 Mon Sep 17 00:00:00 2001 From: Matthew Ryan Dillon Date: Tue, 24 Sep 2024 06:33:25 -0400 Subject: [PATCH] feat(zellij): set up tabnav plugin and fix some keybinds --- home/.chezmoiexternal.toml.tmpl | 4 ++++ home/private_dot_config/zellij/config.kdl | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/home/.chezmoiexternal.toml.tmpl b/home/.chezmoiexternal.toml.tmpl index bda8828..e48bdb3 100644 --- a/home/.chezmoiexternal.toml.tmpl +++ b/home/.chezmoiexternal.toml.tmpl @@ -9,3 +9,7 @@ url = "https://github.com/chriskempson/base16-shell.git" refreshPeriod = "168h" {{- end }} +[".config/zellij/plugins/room.wasm"] + type = "file" + url = "https://github.com/rvcas/room/releases/latest/download/room.wasm" + refreshPeriod = "168h" diff --git a/home/private_dot_config/zellij/config.kdl b/home/private_dot_config/zellij/config.kdl index cecf36d..a68bb17 100644 --- a/home/private_dot_config/zellij/config.kdl +++ b/home/private_dot_config/zellij/config.kdl @@ -1,5 +1,6 @@ // If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" keybinds { + unbind "Ctrl n" normal { // uncomment this and adjust key if using copy_on_select=false // bind "Alt c" { Copy; } @@ -8,7 +9,7 @@ keybinds { bind "Ctrl g" { SwitchToMode "Normal"; } } resize { - // bind "Ctrl n" { SwitchToMode "Normal"; } + bind "Ctrl r" { SwitchToMode "Normal"; } bind "h" "Left" { Resize "Increase Left"; } bind "j" "Down" { Resize "Increase Down"; } bind "k" "Up" { Resize "Increase Up"; } @@ -158,6 +159,13 @@ keybinds { bind "Alt -" { Resize "Decrease"; } bind "Alt [" { PreviousSwapLayout; } bind "Alt ]" { NextSwapLayout; } + bind "Ctrl u" { + LaunchOrFocusPlugin "file:~/.config/zellij/plugins/room.wasm" { + floating true + ignore_case true + quick_jump true + } + } } shared_except "normal" "locked" { bind "Enter" "Esc" { SwitchToMode "Normal"; } @@ -166,7 +174,7 @@ keybinds { bind "Ctrl p" { SwitchToMode "Pane"; } } shared_except "resize" "locked" { - bind "Ctrl n" { SwitchToMode "Resize"; } + bind "Ctrl r" { SwitchToMode "Resize"; } } shared_except "scroll" "locked" { bind "Ctrl s" { SwitchToMode "Scroll"; }