Skip to content

Instantly share code, notes, and snippets.

@ktunprasert
Last active March 24, 2025 21:45
Show Gist options
  • Select an option

  • Save ktunprasert/07ea4432552be4e6a7b202616d2e47a0 to your computer and use it in GitHub Desktop.

Select an option

Save ktunprasert/07ea4432552be4e6a7b202616d2e47a0 to your computer and use it in GitHub Desktop.

Revisions

  1. ktunprasert revised this gist Mar 24, 2025. 1 changed file with 321 additions and 213 deletions.
    534 changes: 321 additions & 213 deletions config.kdl
    Original file line number Diff line number Diff line change
    @@ -1,208 +1,260 @@
    //
    // THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /root/.config/zellij/config.kdl.bak
    //

    keybinds clear-defaults=true {
    normal {
    // uncomment this and adjust key if using copy_on_select=false
    // bind "Alt c" { Copy; }
    bind "Alt w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
    bind "Alt z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
    bind "Alt w" { ToggleFloatingPanes; SwitchToMode "normal"; }
    bind "Alt z" { ToggleFocusFullscreen; SwitchToMode "normal"; }
    }
    locked {
    bind "Ctrl g" { SwitchToMode "Normal"; }
    }
    resize {
    bind "Ctrl n" { SwitchToMode "Normal"; }
    bind "h" "Left" { Resize "Increase Left"; }
    bind "j" "Down" { Resize "Increase Down"; }
    bind "k" "Up" { Resize "Increase Up"; }
    bind "l" "Right" { Resize "Increase Right"; }
    bind "H" { Resize "Decrease Left"; }
    bind "J" { Resize "Decrease Down"; }
    bind "K" { Resize "Decrease Up"; }
    bind "L" { Resize "Decrease Right"; }
    bind "=" "+" { Resize "Increase"; }
    bind "-" { Resize "Decrease"; }
    bind "Ctrl g" { SwitchToMode "normal"; }
    }
    pane {
    bind "Ctrl p" { SwitchToMode "Normal"; }
    bind "h" "Left" { MoveFocus "Left"; }
    bind "l" "Right" { MoveFocus "Right"; }
    bind "j" "Down" { MoveFocus "Down"; }
    bind "k" "Up" { MoveFocus "Up"; }
    bind "left" { MoveFocus "left"; }
    bind "down" { MoveFocus "down"; }
    bind "up" { MoveFocus "up"; }
    bind "right" { MoveFocus "right"; }
    bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; }
    bind "d" { NewPane "down"; SwitchToMode "normal"; }
    bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; }
    bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; }
    bind "h" { MoveFocus "left"; }
    bind "j" { MoveFocus "down"; }
    bind "k" { MoveFocus "up"; }
    bind "l" { MoveFocus "right"; }
    bind "n" { NewPane; SwitchToMode "normal"; }
    bind "p" { SwitchFocus; }
    bind "n" { NewPane; SwitchToMode "Normal"; }
    bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
    bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
    bind "x" { CloseFocus; SwitchToMode "Normal"; }
    bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
    bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
    bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
    bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
    bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
    bind "Ctrl p" { SwitchToMode "normal"; }
    bind "r" { NewPane "right"; SwitchToMode "normal"; }
    bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; }
    bind "z" { TogglePaneFrames; SwitchToMode "normal"; }
    bind "i" { TogglePanePinned; SwitchToMode "Normal"; }
    }
    move {
    // bind "Ctrl h" { SwitchToMode "Normal"; }//
    // bind "n" "Tab" { MovePane; }//
    // bind "p" { MovePaneBackwards; }//
    // bind "h" "Left" { MovePane "Left"; }//
    // bind "j" "Down" { MovePane "Down"; }//
    // bind "k" "Up" { MovePane "Up"; }//
    // bind "l" "Right" { MovePane "Right"; }//
    resize {
    bind "left" { Resize "Increase left"; }
    bind "down" { Resize "Increase down"; }
    bind "up" { Resize "Increase up"; }
    bind "right" { Resize "Increase right"; }
    bind "+" { Resize "Increase"; }
    bind "-" { Resize "Decrease"; }
    bind "=" { Resize "Increase"; }
    bind "H" { Resize "Decrease left"; }
    bind "J" { Resize "Decrease down"; }
    bind "K" { Resize "Decrease up"; }
    bind "L" { Resize "Decrease right"; }
    bind "h" { Resize "Increase left"; }
    bind "j" { Resize "Increase down"; }
    bind "k" { Resize "Increase up"; }
    bind "l" { Resize "Increase right"; }
    bind "Ctrl n" { SwitchToMode "normal"; }
    }
    // tab {
    // // bind "Ctrl t" { SwitchToMode "Normal"; }
    // // bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
    // // bind "h" "Left" "Up" "k" { GoToPreviousTab; }
    // // bind "l" "Right" "Down" "j" { GoToNextTab; }
    // bind "n" { NewTab; SwitchToMode "Normal"; }
    // // bind "x" { CloseTab; SwitchToMode "Normal"; }
    // // bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
    // bind "1" { GoToTab 1; SwitchToMode "Normal"; }
    // bind "2" { GoToTab 2; SwitchToMode "Normal"; }
    // bind "3" { GoToTab 3; SwitchToMode "Normal"; }
    // bind "4" { GoToTab 4; SwitchToMode "Normal"; }
    // bind "5" { GoToTab 5; SwitchToMode "Normal"; }
    // bind "6" { GoToTab 6; SwitchToMode "Normal"; }
    // bind "7" { GoToTab 7; SwitchToMode "Normal"; }
    // bind "8" { GoToTab 8; SwitchToMode "Normal"; }
    // bind "9" { GoToTab 9; SwitchToMode "Normal"; }
    // bind "Tab" { ToggleTab; }
    // }
    scroll {
    bind "Ctrl z" { SwitchToMode "Normal"; }
    bind "e" { EditScrollback; SwitchToMode "Normal"; }
    bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
    bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
    bind "j" "Down" { ScrollDown; }
    bind "k" "Up" { ScrollUp; }
    bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
    bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
    bind "d" { HalfPageScrollDown; }
    bind "u" { HalfPageScrollUp; }
    // uncomment this and adjust key if using copy_on_select=false
    // bind "Alt c" { Copy; }
    bind "e" { EditScrollback; SwitchToMode "normal"; }
    bind "s" { SwitchToMode "entersearch"; SearchInput 0; }
    }
    search {
    bind "Ctrl z" { SwitchToMode "Normal"; }
    bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
    bind "j" "Down" { ScrollDown; }
    bind "k" "Up" { ScrollUp; }
    bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
    bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
    bind "d" { HalfPageScrollDown; }
    bind "u" { HalfPageScrollUp; }
    bind "c" { SearchToggleOption "CaseSensitivity"; }
    bind "n" { Search "down"; }
    bind "o" { SearchToggleOption "WholeWord"; }
    bind "p" { Search "up"; }
    bind "c" { SearchToggleOption "CaseSensitivity"; }
    bind "w" { SearchToggleOption "Wrap"; }
    bind "o" { SearchToggleOption "WholeWord"; }
    }
    entersearch {
    bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
    bind "Enter" { SwitchToMode "Search"; }
    }
    // renametab {
    // bind "Ctrl c" { SwitchToMode "Normal"; }
    // bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
    // }
    renamepane {
    bind "Ctrl c" { SwitchToMode "Normal"; }
    bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
    }
    session {
    bind "Ctrl o" { SwitchToMode "Normal"; }
    bind "Ctrl z" { SwitchToMode "Scroll"; }
    bind "d" { Detach; }
    bind "Ctrl o" { SwitchToMode "normal"; }
    bind "w" {
    LaunchOrFocusPlugin "zellij:session-manager" {
    floating true
    move_to_focused_tab true
    }
    SwitchToMode "normal"
    }
    bind "w" {
    LaunchOrFocusPlugin "session-manager" {
    floating true
    move_to_focused_tab true
    };
    SwitchToMode "Normal"
    }
    bind "c" {
    LaunchOrFocusPlugin "configuration" {
    floating true
    move_to_focused_tab true
    };
    SwitchToMode "Normal"
    }
    bind "p" {
    LaunchOrFocusPlugin "plugin-manager" {
    floating true
    move_to_focused_tab true
    };
    SwitchToMode "Normal"
    }
    bind "a" {
    LaunchOrFocusPlugin "zellij:about" {
    floating true
    move_to_focused_tab true
    };
    SwitchToMode "Normal"
    }
    }
    tmux {
    bind "[" { SwitchToMode "Scroll"; }
    bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
    bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
    bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
    bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
    bind "c" { NewTab; SwitchToMode "Normal"; }
    bind "," { SwitchToMode "RenameTab"; }
    bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
    bind "n" { GoToNextTab; SwitchToMode "Normal"; }
    bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
    bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
    bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
    bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
    bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
    bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
    bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
    bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
    bind "o" { FocusNextPane; }
    bind "d" { Detach; }
    bind "Space" { NextSwapLayout; }
    bind "x" { CloseFocus; SwitchToMode "Normal"; }
    }
    shared_except "locked" {
    bind "Ctrl g" { SwitchToMode "Locked"; }
    bind "Alt q" { Quit; }
    bind "Alt d" { Detach; }
    bind "Ctrl PageDown" { NextSwapLayout; }
    bind "Ctrl PageUp" { PreviousSwapLayout; }
    bind "Alt left" { MoveFocusOrTab "left"; }
    bind "Alt down" { MoveFocus "down"; }
    bind "Alt up" { MoveFocus "up"; }
    bind "Alt right" { MoveFocusOrTab "right"; }
    bind "Alt '" { NewPane; }
    bind "Alt Left" { MoveFocusOrTab "Left"; }
    bind "Alt Right" { MoveFocusOrTab "Right"; }
    bind "Alt Down" { MoveFocus "Down"; }
    bind "Alt Up" { MoveFocus "Up"; }
    bind "Alt =" "Alt +" { Resize "Increase"; }
    bind "Alt +" { Resize "Increase"; }
    bind "Alt -" { Resize "Decrease"; }
    bind "Alt =" { Resize "Increase"; }
    bind "Alt [" { PreviousSwapLayout; }
    bind "Alt ]" { NextSwapLayout; }
    bind "Alt d" { Detach; }
    bind "Ctrl g" { SwitchToMode "locked"; }
    bind "Alt q" { Quit; }
    }
    shared_except "locked" "session" {
    bind "Alt o" { SwitchToMode "session"; }
    }
    shared_except "locked" "scroll" "search" "tmux" {
    bind "Ctrl b" { SwitchToMode "tab"; }
    }
    shared_except "locked" "scroll" "search" {
    bind "Ctrl z" { SwitchToMode "scroll"; }
    }
    shared_except "locked" "pane" {
    bind "Alt p" { SwitchToMode "pane"; }
    }
    shared_except "normal" "locked" {
    bind "Enter" "Esc" { SwitchToMode "Normal"; }
    shared_except "locked" "resize" {
    bind "Ctrl n" { SwitchToMode "resize"; }
    }
    shared_except "pane" "locked" {
    bind "Alt p" { SwitchToMode "Pane"; }
    shared_except "normal" "locked" "entersearch" {
    bind "enter" { SwitchToMode "normal"; }
    }
    shared_except "resize" "locked" {
    bind "Ctrl n" { SwitchToMode "Resize"; }
    shared_except "normal" "locked" "entersearch" "renamepane" {
    bind "esc" { SwitchToMode "normal"; }
    }
    shared_except "scroll" "locked" {
    bind "Ctrl z" { SwitchToMode "Scroll"; }
    shared_among "pane" "tmux" {
    bind "x" { CloseFocus; SwitchToMode "normal"; }
    }
    shared_except "session" "locked" {
    bind "Alt o" { SwitchToMode "Session"; }
    shared_among "scroll" "search" {
    bind "PageDown" { PageScrollDown; }
    bind "PageUp" { PageScrollUp; }
    bind "left" { PageScrollUp; }
    bind "down" { ScrollDown; }
    bind "up" { ScrollUp; }
    bind "right" { PageScrollDown; }
    bind "Ctrl b" { PageScrollUp; }
    bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; }
    bind "d" { HalfPageScrollDown; }
    bind "Ctrl f" { PageScrollDown; }
    bind "h" { PageScrollUp; }
    bind "j" { ScrollDown; }
    bind "k" { ScrollUp; }
    bind "l" { PageScrollDown; }
    bind "u" { HalfPageScrollUp; }
    bind "Ctrl z" { SwitchToMode "normal"; }
    }
    entersearch {
    bind "Ctrl c" { SwitchToMode "scroll"; }
    bind "esc" { SwitchToMode "scroll"; }
    bind "enter" { SwitchToMode "search"; }
    }
    renamepane {
    bind "Ctrl c" { SwitchToMode "normal"; }
    bind "esc" { UndoRenamePane; SwitchToMode "pane"; }
    }
    shared_among "session" "tmux" {
    bind "d" { Detach; }
    }
    // shared_except "tab" "locked" {
    // bind "Alt t" { SwitchToMode "Tab"; }
    // tmux {
    // bind "left" { MoveFocus "left"; SwitchToMode "normal"; }
    // bind "down" { MoveFocus "down"; SwitchToMode "normal"; }
    // bind "up" { MoveFocus "up"; SwitchToMode "normal"; }
    // bind "right" { MoveFocus "right"; SwitchToMode "normal"; }
    // bind "space" { NextSwapLayout; }
    // bind "\"" { NewPane "down"; SwitchToMode "normal"; }
    // bind "%" { NewPane "right"; SwitchToMode "normal"; }
    // bind "," { SwitchToMode "renametab"; }
    // bind "[" { SwitchToMode "scroll"; }
    // bind "Ctrl b" { Write 2; SwitchToMode "normal"; }
    // bind "c" { NewTab; SwitchToMode "normal"; }
    // bind "h" { MoveFocus "left"; SwitchToMode "normal"; }
    // bind "j" { MoveFocus "down"; SwitchToMode "normal"; }
    // bind "k" { MoveFocus "up"; SwitchToMode "normal"; }
    // bind "l" { MoveFocus "right"; SwitchToMode "normal"; }
    // bind "n" { GoToNextTab; SwitchToMode "normal"; }
    // bind "o" { FocusNextPane; }
    // bind "p" { GoToPreviousTab; SwitchToMode "normal"; }
    // bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; }
    // }
    // shared_except "move" "locked" {
    // bind "Ctrl h" { SwitchToMode "Move"; }
    // }
    shared_except "tmux" "locked" {
    bind "Ctrl b" { SwitchToMode "Tmux"; }
    tab {
    bind "Ctrl t" { SwitchToMode "Normal"; }
    bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
    bind "h" "Left" "Up" "k" { GoToPreviousTab; }
    bind "l" "Right" "Down" "j" { GoToNextTab; }
    bind "n" { NewTab; SwitchToMode "Normal"; }
    bind "x" { CloseTab; SwitchToMode "Normal"; }
    bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
    bind "b" { BreakPane; SwitchToMode "Normal"; }
    bind "]" { BreakPaneRight; SwitchToMode "Normal"; }
    bind "[" { BreakPaneLeft; SwitchToMode "Normal"; }
    bind "1" { GoToTab 1; SwitchToMode "Normal"; }
    bind "2" { GoToTab 2; SwitchToMode "Normal"; }
    bind "3" { GoToTab 3; SwitchToMode "Normal"; }
    bind "4" { GoToTab 4; SwitchToMode "Normal"; }
    bind "5" { GoToTab 5; SwitchToMode "Normal"; }
    bind "6" { GoToTab 6; SwitchToMode "Normal"; }
    bind "7" { GoToTab 7; SwitchToMode "Normal"; }
    bind "8" { GoToTab 8; SwitchToMode "Normal"; }
    bind "9" { GoToTab 9; SwitchToMode "Normal"; }
    bind "Tab" { ToggleTab; }
    }
    }

    // Plugin aliases - can be used to change the implementation of Zellij
    // changing these requires a restart to take effect
    plugins {
    // tab-bar { path "tab-bar"; }
    status-bar { path "status-bar"; }
    strider { path "strider"; }
    compact-bar { path "compact-bar"; }
    about location="zellij:about"
    compact-bar location="zellij:compact-bar"
    configuration location="zellij:configuration"
    filepicker location="zellij:strider" {
    cwd "/"
    }
    plugin-manager location="zellij:plugin-manager"
    session-manager location="zellij:session-manager"
    status-bar location="zellij:status-bar"
    strider location="zellij:strider"
    tab-bar location="zellij:tab-bar"
    welcome-screen location="zellij:session-manager" {
    welcome_screen true
    }
    }

    // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
    // eg. when terminal window with an active zellij session is closed
    // Plugins to load in the background when a new session starts
    // eg. "file:/path/to/my-plugin.wasm"
    // eg. "https://example.com/my-plugin.wasm"
    load_plugins {
    }

    // Use a simplified UI without special fonts (arrow glyphs)
    // Options:
    // - detach (Default)
    // - quit
    // - true
    // - false (Default)
    //
    // on_force_close "detach"
    // simplified_ui true

    // Send a request for a simplified ui (without arrow fonts) to plugins
    // Options:
    // - true
    // - false (Default)
    // Choose the theme that is specified in the themes section.
    // Default: default
    //
    // simplified_ui true
    theme "gruvbox-dark"

    // Choose the base input mode of zellij.
    // Default: normal
    //
    // default_mode "locked"

    // Choose the path to the default shell that zellij will use for opening new panes
    // Default: $SHELL
    @@ -211,56 +263,22 @@ default_shell "fish"

    // Choose the path to override cwd that zellij will use for opening new panes
    //
    // default_cwd ""

    // Toggle between having pane frames around the panes
    // Options:
    // - true (default)
    // - false
    //
    pane_frames false

    // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
    // Options:
    // - true (default)
    // - false
    //
    // auto_layout true

    // Define color themes for Zellij
    // For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
    // Once these themes are defined, one of them should to be selected in the "theme" section of this file
    //
    // themes {
    // dracula {
    // fg 248 248 242
    // bg 40 42 54
    // red 255 85 85
    // green 80 250 123
    // yellow 241 250 140
    // blue 98 114 164
    // magenta 255 121 198
    // orange 255 184 108
    // cyan 139 233 253
    // black 0 0 0
    // white 255 255 255
    // }
    // }

    // Choose the theme that is specified in the themes section.
    // Default: default
    //
    // theme "default"
    // default_cwd "/tmp"

    // The name of the default layout to load on startup
    // Default: "default"
    //
    // default_layout "compact"
    default_layout "compact"

    // Choose the mode that zellij uses when starting up.
    // Default: normal
    // The folder in which Zellij will look for layouts
    // (Requires restart)
    //
    // default_mode "locked"
    // layout_dir "/tmp"

    // The folder in which Zellij will look for themes
    // (Requires restart)
    //
    // theme_dir "/tmp"

    // Toggle enabling the mouse mode.
    // On certain configurations, or terminals this could
    @@ -271,9 +289,34 @@ pane_frames false
    //
    // mouse_mode false

    // Toggle having pane frames around the panes
    // Options:
    // - true (default, enabled)
    // - false
    //
    pane_frames false

    // When attaching to an existing session with other users,
    // should the session be mirrored (true)
    // or should each user have their own cursor (false)
    // (Requires restart)
    // Default: false
    //
    // mirror_session true

    // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
    // eg. when terminal window with an active zellij session is closed
    // (Requires restart)
    // Options:
    // - detach (Default)
    // - quit
    //
    // on_force_close "quit"

    // Configure the scroll back buffer size
    // This is the number of lines zellij stores for each pane in the scroll back
    // buffer. Excess number of lines are discarded in a FIFO fashion.
    // (Requires restart)
    // Valid values: positive integers
    // Default value: 10000
    //
    @@ -288,6 +331,8 @@ pane_frames false
    // copy_command "xclip -selection clipboard" // x11
    // copy_command "wl-copy" // wayland
    // copy_command "pbcopy" // osx
    //
    // copy_command "pbcopy"

    // Choose the destination for copied text
    // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
    @@ -298,27 +343,90 @@ pane_frames false
    //
    // copy_clipboard "primary"

    // Enable or disable automatic copy (and clear) of selection when releasing mouse
    // Enable automatic copying (and clearing) of selection when releasing mouse
    // Default: true
    //
    // copy_on_select false
    // copy_on_select true

    // Path to the default editor to use to edit pane scrollbuffer
    // Default: $EDITOR or $VISUAL
    //
    // scrollback_editor "/usr/bin/vim"

    // When attaching to an existing session with other users,
    // should the session be mirrored (true)
    // or should each user have their own cursor (false)
    // A fixed name to always give the Zellij session.
    // Consider also setting `attach_to_session true,`
    // otherwise this will error if such a session exists.
    // Default: <RANDOM>
    //
    // session_name "My singleton session"

    // When `session_name` is provided, attaches to that session
    // if it is already running or creates it otherwise.
    // Default: false
    //
    // mirror_session true
    // attach_to_session true

    // The folder in which Zellij will look for layouts
    // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
    // Options:
    // - true (default)
    // - false
    //
    // layout_dir "/path/to/my/layout_dir"
    // auto_layout false

    // The folder in which Zellij will look for themes
    // Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
    // Options:
    // - true (default)
    // - false
    //
    // session_serialization false

    // Whether pane viewports are serialized along with the session, default is false
    // Options:
    // - true
    // - false (default)
    //
    // serialize_pane_viewport false

    // Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
    // defaults to the scrollback size. If this number is higher than the scrollback size, it will
    // also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
    //
    // scrollback_lines_to_serialize 10000

    // Enable or disable the rendering of styled and colored underlines (undercurl).
    // May need to be disabled for certain unsupported terminals
    // (Requires restart)
    // Default: true
    //
    // styled_underlines false

    // How often in seconds sessions are serialized
    //
    // serialization_interval 10000

    // Enable or disable writing of session metadata to disk (if disabled, other sessions might not know
    // metadata info on this session)
    // (Requires restart)
    // Default: false
    //
    // disable_session_metadata false

    // Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it)
    // (Requires restart)
    // Default: true (if the host terminal supports it)
    //
    // support_kitty_keyboard_protocol false

    // Whether to stack panes when resizing beyond a certain size
    // Default: true
    //
    // stacked_resize false

    // Whether to show tips on startup
    // Default: true
    //
    show_startup_tips false

    // Whether to show release notes on first version run
    // Default: true
    //
    // theme_dir "/path/to/my/theme_dir"
    show_release_notes false
  2. ktunprasert revised this gist Oct 28, 2023. 1 changed file with 29 additions and 27 deletions.
    56 changes: 29 additions & 27 deletions config.kdl
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@ keybinds clear-defaults=true {
    normal {
    // uncomment this and adjust key if using copy_on_select=false
    // bind "Alt c" { Copy; }
    bind "Alt w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
    bind "Alt z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
    }
    locked {
    bind "Ctrl g" { SwitchToMode "Normal"; }
    @@ -45,25 +47,25 @@ keybinds clear-defaults=true {
    // bind "k" "Up" { MovePane "Up"; }//
    // bind "l" "Right" { MovePane "Right"; }//
    }
    tab {
    // bind "Ctrl t" { SwitchToMode "Normal"; }
    // bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
    // bind "h" "Left" "Up" "k" { GoToPreviousTab; }
    // bind "l" "Right" "Down" "j" { GoToNextTab; }
    bind "n" { NewTab; SwitchToMode "Normal"; }
    // bind "x" { CloseTab; SwitchToMode "Normal"; }
    // bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
    bind "1" { GoToTab 1; SwitchToMode "Normal"; }
    bind "2" { GoToTab 2; SwitchToMode "Normal"; }
    bind "3" { GoToTab 3; SwitchToMode "Normal"; }
    bind "4" { GoToTab 4; SwitchToMode "Normal"; }
    bind "5" { GoToTab 5; SwitchToMode "Normal"; }
    bind "6" { GoToTab 6; SwitchToMode "Normal"; }
    bind "7" { GoToTab 7; SwitchToMode "Normal"; }
    bind "8" { GoToTab 8; SwitchToMode "Normal"; }
    bind "9" { GoToTab 9; SwitchToMode "Normal"; }
    bind "Tab" { ToggleTab; }
    }
    // tab {
    // // bind "Ctrl t" { SwitchToMode "Normal"; }
    // // bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
    // // bind "h" "Left" "Up" "k" { GoToPreviousTab; }
    // // bind "l" "Right" "Down" "j" { GoToNextTab; }
    // bind "n" { NewTab; SwitchToMode "Normal"; }
    // // bind "x" { CloseTab; SwitchToMode "Normal"; }
    // // bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
    // bind "1" { GoToTab 1; SwitchToMode "Normal"; }
    // bind "2" { GoToTab 2; SwitchToMode "Normal"; }
    // bind "3" { GoToTab 3; SwitchToMode "Normal"; }
    // bind "4" { GoToTab 4; SwitchToMode "Normal"; }
    // bind "5" { GoToTab 5; SwitchToMode "Normal"; }
    // bind "6" { GoToTab 6; SwitchToMode "Normal"; }
    // bind "7" { GoToTab 7; SwitchToMode "Normal"; }
    // bind "8" { GoToTab 8; SwitchToMode "Normal"; }
    // bind "9" { GoToTab 9; SwitchToMode "Normal"; }
    // bind "Tab" { ToggleTab; }
    // }
    scroll {
    bind "Ctrl z" { SwitchToMode "Normal"; }
    bind "e" { EditScrollback; SwitchToMode "Normal"; }
    @@ -97,10 +99,10 @@ keybinds clear-defaults=true {
    bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
    bind "Enter" { SwitchToMode "Search"; }
    }
    renametab {
    bind "Ctrl c" { SwitchToMode "Normal"; }
    bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
    }
    // renametab {
    // bind "Ctrl c" { SwitchToMode "Normal"; }
    // bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
    // }
    renamepane {
    bind "Ctrl c" { SwitchToMode "Normal"; }
    bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
    @@ -169,9 +171,9 @@ keybinds clear-defaults=true {
    shared_except "session" "locked" {
    bind "Alt o" { SwitchToMode "Session"; }
    }
    shared_except "tab" "locked" {
    bind "Alt t" { SwitchToMode "Tab"; }
    }
    // shared_except "tab" "locked" {
    // bind "Alt t" { SwitchToMode "Tab"; }
    // }
    // shared_except "move" "locked" {
    // bind "Ctrl h" { SwitchToMode "Move"; }
    // }
    @@ -181,7 +183,7 @@ keybinds clear-defaults=true {
    }

    plugins {
    tab-bar { path "tab-bar"; }
    // tab-bar { path "tab-bar"; }
    status-bar { path "status-bar"; }
    strider { path "strider"; }
    compact-bar { path "compact-bar"; }
  3. ktunprasert revised this gist Oct 7, 2023. 1 changed file with 18 additions and 10 deletions.
    28 changes: 18 additions & 10 deletions config.kdl
    Original file line number Diff line number Diff line change
    @@ -65,7 +65,7 @@ keybinds clear-defaults=true {
    bind "Tab" { ToggleTab; }
    }
    scroll {
    bind "Ctrl S" { SwitchToMode "Normal"; }
    bind "Ctrl z" { SwitchToMode "Normal"; }
    bind "e" { EditScrollback; SwitchToMode "Normal"; }
    bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
    bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
    @@ -79,7 +79,7 @@ keybinds clear-defaults=true {
    // bind "Alt c" { Copy; }
    }
    search {
    bind "Ctrl S" { SwitchToMode "Normal"; }
    bind "Ctrl z" { SwitchToMode "Normal"; }
    bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
    bind "j" "Down" { ScrollDown; }
    bind "k" "Up" { ScrollUp; }
    @@ -107,8 +107,15 @@ keybinds clear-defaults=true {
    }
    session {
    bind "Ctrl o" { SwitchToMode "Normal"; }
    bind "Ctrl S" { SwitchToMode "Scroll"; }
    bind "Ctrl z" { SwitchToMode "Scroll"; }
    bind "d" { Detach; }
    bind "w" {
    LaunchOrFocusPlugin "zellij:session-manager" {
    floating true
    move_to_focused_tab true
    }
    SwitchToMode "Normal"
    }
    }
    tmux {
    bind "[" { SwitchToMode "Scroll"; }
    @@ -135,7 +142,8 @@ keybinds clear-defaults=true {
    }
    shared_except "locked" {
    bind "Ctrl g" { SwitchToMode "Locked"; }
    bind "Ctrl Q" { Quit; }
    bind "Alt q" { Quit; }
    bind "Alt d" { Detach; }
    bind "Alt '" { NewPane; }
    bind "Alt Left" { MoveFocusOrTab "Left"; }
    bind "Alt Right" { MoveFocusOrTab "Right"; }
    @@ -156,17 +164,17 @@ keybinds clear-defaults=true {
    bind "Ctrl n" { SwitchToMode "Resize"; }
    }
    shared_except "scroll" "locked" {
    bind "Ctrl S" { SwitchToMode "Scroll"; }
    bind "Ctrl z" { SwitchToMode "Scroll"; }
    }
    shared_except "session" "locked" {
    bind "Alt o" { SwitchToMode "Session"; }
    }
    shared_except "tab" "locked" {
    bind "Alt t" { SwitchToMode "Tab"; }
    }
    shared_except "move" "locked" {
    bind "Ctrl H" { SwitchToMode "Move"; }
    }
    // shared_except "move" "locked" {
    // bind "Ctrl h" { SwitchToMode "Move"; }
    // }
    shared_except "tmux" "locked" {
    bind "Ctrl b" { SwitchToMode "Tmux"; }
    }
    @@ -185,7 +193,7 @@ plugins {
    // - detach (Default)
    // - quit
    //
    // on_force_close "quit"
    // on_force_close "detach"

    // Send a request for a simplified ui (without arrow fonts) to plugins
    // Options:
    @@ -197,7 +205,7 @@ plugins {
    // Choose the path to the default shell that zellij will use for opening new panes
    // Default: $SHELL
    //
    // default_shell "fish"
    default_shell "fish"

    // Choose the path to override cwd that zellij will use for opening new panes
    //
  4. ktunprasert revised this gist Aug 17, 2023. 1 changed file with 225 additions and 1 deletion.
    226 changes: 225 additions & 1 deletion config.kdl
    Original file line number Diff line number Diff line change
    @@ -87,4 +87,228 @@ keybinds clear-defaults=true {
    bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
    bind "d" { HalfPageScrollDown; }
    bind "u" { HalfPageScrollUp; }
    bind "n" { Search "down"
    bind "n" { Search "down"; }
    bind "p" { Search "up"; }
    bind "c" { SearchToggleOption "CaseSensitivity"; }
    bind "w" { SearchToggleOption "Wrap"; }
    bind "o" { SearchToggleOption "WholeWord"; }
    }
    entersearch {
    bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
    bind "Enter" { SwitchToMode "Search"; }
    }
    renametab {
    bind "Ctrl c" { SwitchToMode "Normal"; }
    bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
    }
    renamepane {
    bind "Ctrl c" { SwitchToMode "Normal"; }
    bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
    }
    session {
    bind "Ctrl o" { SwitchToMode "Normal"; }
    bind "Ctrl S" { SwitchToMode "Scroll"; }
    bind "d" { Detach; }
    }
    tmux {
    bind "[" { SwitchToMode "Scroll"; }
    bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
    bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
    bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
    bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
    bind "c" { NewTab; SwitchToMode "Normal"; }
    bind "," { SwitchToMode "RenameTab"; }
    bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
    bind "n" { GoToNextTab; SwitchToMode "Normal"; }
    bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
    bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
    bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
    bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
    bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
    bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
    bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
    bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
    bind "o" { FocusNextPane; }
    bind "d" { Detach; }
    bind "Space" { NextSwapLayout; }
    bind "x" { CloseFocus; SwitchToMode "Normal"; }
    }
    shared_except "locked" {
    bind "Ctrl g" { SwitchToMode "Locked"; }
    bind "Ctrl Q" { Quit; }
    bind "Alt '" { NewPane; }
    bind "Alt Left" { MoveFocusOrTab "Left"; }
    bind "Alt Right" { MoveFocusOrTab "Right"; }
    bind "Alt Down" { MoveFocus "Down"; }
    bind "Alt Up" { MoveFocus "Up"; }
    bind "Alt =" "Alt +" { Resize "Increase"; }
    bind "Alt -" { Resize "Decrease"; }
    bind "Alt [" { PreviousSwapLayout; }
    bind "Alt ]" { NextSwapLayout; }
    }
    shared_except "normal" "locked" {
    bind "Enter" "Esc" { SwitchToMode "Normal"; }
    }
    shared_except "pane" "locked" {
    bind "Alt p" { SwitchToMode "Pane"; }
    }
    shared_except "resize" "locked" {
    bind "Ctrl n" { SwitchToMode "Resize"; }
    }
    shared_except "scroll" "locked" {
    bind "Ctrl S" { SwitchToMode "Scroll"; }
    }
    shared_except "session" "locked" {
    bind "Alt o" { SwitchToMode "Session"; }
    }
    shared_except "tab" "locked" {
    bind "Alt t" { SwitchToMode "Tab"; }
    }
    shared_except "move" "locked" {
    bind "Ctrl H" { SwitchToMode "Move"; }
    }
    shared_except "tmux" "locked" {
    bind "Ctrl b" { SwitchToMode "Tmux"; }
    }
    }

    plugins {
    tab-bar { path "tab-bar"; }
    status-bar { path "status-bar"; }
    strider { path "strider"; }
    compact-bar { path "compact-bar"; }
    }

    // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
    // eg. when terminal window with an active zellij session is closed
    // Options:
    // - detach (Default)
    // - quit
    //
    // on_force_close "quit"

    // Send a request for a simplified ui (without arrow fonts) to plugins
    // Options:
    // - true
    // - false (Default)
    //
    // simplified_ui true

    // Choose the path to the default shell that zellij will use for opening new panes
    // Default: $SHELL
    //
    // default_shell "fish"

    // Choose the path to override cwd that zellij will use for opening new panes
    //
    // default_cwd ""

    // Toggle between having pane frames around the panes
    // Options:
    // - true (default)
    // - false
    //
    pane_frames false

    // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
    // Options:
    // - true (default)
    // - false
    //
    // auto_layout true

    // Define color themes for Zellij
    // For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
    // Once these themes are defined, one of them should to be selected in the "theme" section of this file
    //
    // themes {
    // dracula {
    // fg 248 248 242
    // bg 40 42 54
    // red 255 85 85
    // green 80 250 123
    // yellow 241 250 140
    // blue 98 114 164
    // magenta 255 121 198
    // orange 255 184 108
    // cyan 139 233 253
    // black 0 0 0
    // white 255 255 255
    // }
    // }

    // Choose the theme that is specified in the themes section.
    // Default: default
    //
    // theme "default"

    // The name of the default layout to load on startup
    // Default: "default"
    //
    // default_layout "compact"

    // Choose the mode that zellij uses when starting up.
    // Default: normal
    //
    // default_mode "locked"

    // Toggle enabling the mouse mode.
    // On certain configurations, or terminals this could
    // potentially interfere with copying text.
    // Options:
    // - true (default)
    // - false
    //
    // mouse_mode false

    // Configure the scroll back buffer size
    // This is the number of lines zellij stores for each pane in the scroll back
    // buffer. Excess number of lines are discarded in a FIFO fashion.
    // Valid values: positive integers
    // Default value: 10000
    //
    // scroll_buffer_size 10000

    // Provide a command to execute when copying text. The text will be piped to
    // the stdin of the program to perform the copy. This can be used with
    // terminal emulators which do not support the OSC 52 ANSI control sequence
    // that will be used by default if this option is not set.
    // Examples:
    //
    // copy_command "xclip -selection clipboard" // x11
    // copy_command "wl-copy" // wayland
    // copy_command "pbcopy" // osx

    // Choose the destination for copied text
    // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
    // Does not apply when using copy_command.
    // Options:
    // - system (default)
    // - primary
    //
    // copy_clipboard "primary"

    // Enable or disable automatic copy (and clear) of selection when releasing mouse
    // Default: true
    //
    // copy_on_select false

    // Path to the default editor to use to edit pane scrollbuffer
    // Default: $EDITOR or $VISUAL
    //
    // scrollback_editor "/usr/bin/vim"

    // When attaching to an existing session with other users,
    // should the session be mirrored (true)
    // or should each user have their own cursor (false)
    // Default: false
    //
    // mirror_session true

    // The folder in which Zellij will look for layouts
    //
    // layout_dir "/path/to/my/layout_dir"

    // The folder in which Zellij will look for themes
    //
    // theme_dir "/path/to/my/theme_dir"
  5. ktunprasert created this gist Aug 17, 2023.
    90 changes: 90 additions & 0 deletions config.kdl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,90 @@
    keybinds clear-defaults=true {
    normal {
    // uncomment this and adjust key if using copy_on_select=false
    // bind "Alt c" { Copy; }
    }
    locked {
    bind "Ctrl g" { SwitchToMode "Normal"; }
    }
    resize {
    bind "Ctrl n" { SwitchToMode "Normal"; }
    bind "h" "Left" { Resize "Increase Left"; }
    bind "j" "Down" { Resize "Increase Down"; }
    bind "k" "Up" { Resize "Increase Up"; }
    bind "l" "Right" { Resize "Increase Right"; }
    bind "H" { Resize "Decrease Left"; }
    bind "J" { Resize "Decrease Down"; }
    bind "K" { Resize "Decrease Up"; }
    bind "L" { Resize "Decrease Right"; }
    bind "=" "+" { Resize "Increase"; }
    bind "-" { Resize "Decrease"; }
    }
    pane {
    bind "Ctrl p" { SwitchToMode "Normal"; }
    bind "h" "Left" { MoveFocus "Left"; }
    bind "l" "Right" { MoveFocus "Right"; }
    bind "j" "Down" { MoveFocus "Down"; }
    bind "k" "Up" { MoveFocus "Up"; }
    bind "p" { SwitchFocus; }
    bind "n" { NewPane; SwitchToMode "Normal"; }
    bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
    bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
    bind "x" { CloseFocus; SwitchToMode "Normal"; }
    bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
    bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
    bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
    bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
    bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
    }
    move {
    // bind "Ctrl h" { SwitchToMode "Normal"; }//
    // bind "n" "Tab" { MovePane; }//
    // bind "p" { MovePaneBackwards; }//
    // bind "h" "Left" { MovePane "Left"; }//
    // bind "j" "Down" { MovePane "Down"; }//
    // bind "k" "Up" { MovePane "Up"; }//
    // bind "l" "Right" { MovePane "Right"; }//
    }
    tab {
    // bind "Ctrl t" { SwitchToMode "Normal"; }
    // bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
    // bind "h" "Left" "Up" "k" { GoToPreviousTab; }
    // bind "l" "Right" "Down" "j" { GoToNextTab; }
    bind "n" { NewTab; SwitchToMode "Normal"; }
    // bind "x" { CloseTab; SwitchToMode "Normal"; }
    // bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
    bind "1" { GoToTab 1; SwitchToMode "Normal"; }
    bind "2" { GoToTab 2; SwitchToMode "Normal"; }
    bind "3" { GoToTab 3; SwitchToMode "Normal"; }
    bind "4" { GoToTab 4; SwitchToMode "Normal"; }
    bind "5" { GoToTab 5; SwitchToMode "Normal"; }
    bind "6" { GoToTab 6; SwitchToMode "Normal"; }
    bind "7" { GoToTab 7; SwitchToMode "Normal"; }
    bind "8" { GoToTab 8; SwitchToMode "Normal"; }
    bind "9" { GoToTab 9; SwitchToMode "Normal"; }
    bind "Tab" { ToggleTab; }
    }
    scroll {
    bind "Ctrl S" { SwitchToMode "Normal"; }
    bind "e" { EditScrollback; SwitchToMode "Normal"; }
    bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
    bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
    bind "j" "Down" { ScrollDown; }
    bind "k" "Up" { ScrollUp; }
    bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
    bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
    bind "d" { HalfPageScrollDown; }
    bind "u" { HalfPageScrollUp; }
    // uncomment this and adjust key if using copy_on_select=false
    // bind "Alt c" { Copy; }
    }
    search {
    bind "Ctrl S" { SwitchToMode "Normal"; }
    bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
    bind "j" "Down" { ScrollDown; }
    bind "k" "Up" { ScrollUp; }
    bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
    bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
    bind "d" { HalfPageScrollDown; }
    bind "u" { HalfPageScrollUp; }
    bind "n" { Search "down"