From 7fae36b9b0e219586695ecf63c2ac4ff4f72af5e Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Thu, 25 Jul 2024 23:13:15 +0700 Subject: [PATCH] zellij: update session management keybindings --- home/programs/zellij.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/home/programs/zellij.nix b/home/programs/zellij.nix index 326a5b6..d96c729 100644 --- a/home/programs/zellij.nix +++ b/home/programs/zellij.nix @@ -19,7 +19,7 @@ in ZELLIJ_AUTO_ATTACH=${lib.boolToString cfg.autoAttach} if [[ -z "$ZELLIJ" ]]; then if [[ "$ZELLIJ_AUTO_ATTACH" == "true" ]]; then - zellij attach --index 0 -c + zellij attach -c default else zellij fi @@ -48,7 +48,7 @@ in bind "Ctrl a" "Ctrl c" "Esc" { SwitchToMode "Normal"; } bind "w" { SwitchToMode "Resize"; } bind "e" { SwitchToMode "Scroll"; } - bind "s" { SwitchToMode "Session"; } + bind "S" { SwitchToMode "Session"; } bind "r" { SwitchToMode "RenamePane"; PaneNameInput 0; } bind "R" { SwitchToMode "RenameTab"; TabNameInput 0; } bind "/" { SwitchToMode "EnterSearch"; SearchInput 0; } @@ -81,6 +81,15 @@ in bind "7" { GoToTab 7; SwitchToMode "Normal"; } bind "8" { GoToTab 8; SwitchToMode "Normal"; } bind "9" { GoToTab 9; SwitchToMode "Normal"; } + + // Session management + bind "s" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + }; + SwitchToMode "Normal" + } } resize { @@ -135,7 +144,7 @@ in session { bind "Ctrl c" "Esc" { SwitchToMode "Normal"; } bind "d" { Detach; } - bind "s" { + bind "S" { LaunchOrFocusPlugin "session-manager" { floating true move_to_focused_tab true