Skip to content

Instantly share code, notes, and snippets.

@musjj
Last active March 13, 2024 07:48
Show Gist options
  • Save musjj/1f816620a2b46c95a0b243569c457af0 to your computer and use it in GitHub Desktop.
Save musjj/1f816620a2b46c95a0b243569c457af0 to your computer and use it in GitHub Desktop.
config.kdl
default_mode "locked"
keybinds {
normal {
bind "p" {
SwitchToMode "Pane"
}
bind "m" {
SwitchToMode "Move"
}
bind "t" {
SwitchToMode "Tab"
}
bind "r" {
SwitchToMode "Resize"
}
bind "s" {
SwitchToMode "Scroll"
}
bind "o" {
SwitchToMode "Session"
}
}
resize {
unbind "Ctrl n"
}
pane {
unbind "Ctrl p"
bind "n" {
NewPane
SwitchToMode "Locked"
}
bind "d" {
NewPane "Down"
SwitchToMode "Locked"
}
bind "r" {
NewPane "Right"
SwitchToMode "Locked"
}
bind "x" {
CloseFocus
SwitchToMode "Locked"
}
bind "f" {
SwitchToMode "Locked"
ToggleFocusFullscreen
}
bind "z" {
SwitchToMode "Locked"
TogglePaneFrames
}
bind "w" {
SwitchToMode "Locked"
ToggleFloatingPanes
}
bind "e" {
SwitchToMode "Locked"
TogglePaneEmbedOrFloating
}
}
move {
unbind "Ctrl h"
}
tab {
unbind "Ctrl t"
bind "n" {
NewTab
SwitchToMode "Locked"
}
bind "x" {
CloseTab
SwitchToMode "Locked"
}
bind "s" {
SwitchToMode "Locked"
ToggleActiveSyncTab
}
bind "b" {
BreakPane
SwitchToMode "Locked"
}
bind "]" {
BreakPaneRight
SwitchToMode "Locked"
}
bind "[" {
BreakPaneLeft
SwitchToMode "Locked"
}
bind "1" {
GoToTab 1
SwitchToMode "Locked"
}
bind "2" {
GoToTab 2
SwitchToMode "Locked"
}
bind "3" {
GoToTab 3
SwitchToMode "Locked"
}
bind "4" {
GoToTab 4
SwitchToMode "Locked"
}
bind "5" {
GoToTab 5
SwitchToMode "Locked"
}
bind "6" {
GoToTab 6
SwitchToMode "Locked"
}
bind "7" {
GoToTab 7
SwitchToMode "Locked"
}
bind "8" {
GoToTab 8
SwitchToMode "Locked"
}
bind "9" {
GoToTab 9
SwitchToMode "Locked"
}
}
scroll {
unbind "Ctrl s"
bind "e" {
EditScrollback
SwitchToMode "Locked"
}
bind "Ctrl c" {
ScrollToBottom
SwitchToMode "Locked"
}
}
search {
unbind "Ctrl s"
bind "Ctrl c" {
ScrollToBottom
SwitchToMode "Locked"
}
bind "Esc" {
SwitchToMode "Scroll"
}
}
renametab {
bind "Ctrl c" {
SwitchToMode "Locked"
}
}
renamepane {
bind "Ctrl c" {
SwitchToMode "Locked"
}
}
session {
unbind "Ctrl o"
bind "w" {
LaunchOrFocusPlugin "zellij:session-manager" {
floating true
move_to_focused_tab true
}
SwitchToMode "Locked"
}
}
shared_except "entersearch" "locked" {
bind "Enter" {
SwitchToMode "Locked"
}
}
shared_except "locked" {
bind "Esc" {
SwitchToMode "Locked"
}
bind "Ctrl g" {
SwitchToMode "Normal"
}
unbind "Ctrl q"
unbind "Alt n"
unbind "Alt h" "Alt Left"
unbind "Alt l" "Alt Right"
unbind "Alt j" "Alt Down"
unbind "Alt k" "Alt Up"
unbind "Alt =" "Alt +"
unbind "Alt -"
unbind "Alt ["
unbind "Alt ]"
}
shared_except "normal" {
bind "Ctrl q" {
Quit
}
bind "Alt n" {
NewPane
}
bind "Alt h" "Alt Left" {
MoveFocusOrTab "Left"
}
bind "Alt l" "Alt Right" {
MoveFocusOrTab "Right"
}
bind "Alt j" "Alt Down" {
MoveFocus "Down"
}
bind "Alt k" "Alt Up" {
MoveFocus "Up"
}
bind "Alt =" "Alt +" {
Resize "Increase"
}
bind "Alt -" {
Resize "Decrease"
}
bind "Alt [" {
PreviousSwapLayout
}
bind "Alt ]" {
NextSwapLayout
}
}
shared_except "pane" "locked" {
unbind "Ctrl p"
}
shared_except "move" "locked" {
unbind "Ctrl h"
}
shared_except "tab" "locked" {
unbind "Ctrl t"
}
shared_except "resize" "locked" {
unbind "Ctrl n"
}
shared_except "scroll" "locked" {
unbind "Ctrl s"
}
shared_except "session" "locked" {
unbind "Ctrl o"
}
shared_except "tmux" "locked" {
unbind "Ctrl b"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment