feat(home/base/tui/zellij): update config

This commit is contained in:
Ryan Yin
2025-05-20 11:08:25 +08:00
parent e2a0d429de
commit 9649a79e75

View File

@@ -1,4 +1,6 @@
show_startup_tips false
// Generating a new Example config via:
// zellij setup --dump-config
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds clear-defaults=true {
@@ -38,6 +40,7 @@ keybinds clear-defaults=true {
bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
bind "i" { TogglePanePinned; SwitchToMode "Normal"; }
}
move {
bind "Ctrl h" { SwitchToMode "Normal"; }
@@ -56,6 +59,9 @@ keybinds clear-defaults=true {
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"; }
@@ -112,7 +118,38 @@ keybinds clear-defaults=true {
bind "Ctrl o" { SwitchToMode "Normal"; }
bind "Ctrl s" { SwitchToMode "Scroll"; }
bind "d" { Detach; }
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"
}
}
// Allow to use tmux inside zellij
//
// tmux {
// bind "[" { SwitchToMode "Scroll"; }
// bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
@@ -139,7 +176,10 @@ keybinds clear-defaults=true {
shared_except "locked" {
bind "Ctrl g" { SwitchToMode "Locked"; }
bind "Ctrl q" { Quit; }
bind "Alt f" { ToggleFloatingPanes; }
bind "Alt n" { NewPane; }
bind "Alt i" { MoveTab "Left"; }
bind "Alt o" { MoveTab "Right"; }
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
@@ -170,20 +210,40 @@ keybinds clear-defaults=true {
shared_except "move" "locked" {
bind "Ctrl h" { SwitchToMode "Move"; }
}
// shared_except "tmux" "locked" {
// bind "Ctrl b" { SwitchToMode "Tmux"; }
// }
}
// 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"; }
tab-bar location="zellij:tab-bar"
status-bar location="zellij:status-bar"
strider location="zellij:strider"
compact-bar location="zellij:compact-bar"
session-manager location="zellij:session-manager"
welcome-screen location="zellij:session-manager" {
welcome_screen true
}
filepicker location="zellij:strider" {
cwd "/"
}
configuration location="zellij:configuration"
plugin-manager location="zellij:plugin-manager"
about location="zellij:about"
}
// Plugins to load in the background when a new session starts
load_plugins {
// "file:/path/to/my-plugin.wasm"
// "https://example.com/my-plugin.wasm"
}
// 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
@@ -199,10 +259,13 @@ plugins {
// Choose the path to the default shell that zellij will use for opening new panes
// Default: $SHELL
// Change to nushell
//
default_shell "nu"
// 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)
@@ -217,6 +280,29 @@ default_shell "nu"
//
// auto_layout true
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
// (Requires restart)
// Options:
// - true (default)
// - false
//
// session_serialization false
// Whether pane viewports are serialized along with the session, default is false
// (Requires restart)
// Options:
// - true
// - false (default)
//
// serialize_pane_viewport true
// 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.
// (Requires restart)
//
// scrollback_lines_to_serialize 10000
// 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
@@ -285,8 +371,10 @@ themes {
//
theme "catppuccin-mocha"
// The name of the default layout to load on startup
// Default: "default"
// (Requires restart)
//
// default_layout "compact"
@@ -298,6 +386,7 @@ theme "catppuccin-mocha"
// Toggle enabling the mouse mode.
// On certain configurations, or terminals this could
// potentially interfere with copying text.
// (Requires restart)
// Options:
// - true (default)
// - false
@@ -307,6 +396,7 @@ theme "catppuccin-mocha"
// 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
//
@@ -344,14 +434,52 @@ theme "catppuccin-mocha"
// 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
// The folder in which Zellij will look for layouts
// (Requires restart)
//
// layout_dir "/path/to/my/layout_dir"
// The folder in which Zellij will look for themes
// (Requires restart)
//
// theme_dir "/path/to/my/theme_dir"
// 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
// 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 true
// 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 release notes on first version run
// Default: true
//
show_release_notes false
// Whether to show startup tips on session start
// Default: true
//
show_startup_tips false