diff --git a/chezmoi.roots/_home.macos/private_dot_local/bin/executable_vast-teleport b/chezmoi.roots/_home.macos/private_dot_local/bin/executable_vast-teleport index c8ceec7..23d7708 100644 --- a/chezmoi.roots/_home.macos/private_dot_local/bin/executable_vast-teleport +++ b/chezmoi.roots/_home.macos/private_dot_local/bin/executable_vast-teleport @@ -180,25 +180,22 @@ _do_search() { else "" end) + "cluster_psnt=\(.metadata.labels.cluster_psnt)," - + "hostname=\(.spec.hostname)," - + "teleport.internal/resource-id=\(.metadata.labels["teleport.internal/resource-id"])" + + "hostname=\(.spec.hostname)" ' )" if [[ -z "$BATCH" && "${OPTIONS}" == *$'\n'* ]]; then - SELECTED_RAW="$( tv --no-preview <<<"$OPTIONS" )" + SELECTED="$( tv --no-preview <<<"$OPTIONS" )" else - SELECTED_RAW="$OPTIONS" + SELECTED="$OPTIONS" fi - if [[ -z "$SELECTED_RAW" ]]; then + if [[ -z "$SELECTED" ]]; then ${SILENT:+:} printf 'Aborted (empty response)\n' >&2 exit 2 - else - SELECTED="$(<<<"$SELECTED_RAW" awk -F',' '{ print $4 }' )" fi - ${SILENT:+:} printf '\n%s selected.\n' "$SELECTED_RAW" >&2 + ${SILENT:+:} printf '\n%s selected.\n' "$SELECTED" >&2 echo "$SELECTED" } diff --git a/chezmoi.roots/_home/private_dot_config/sz.env/executable_000_load.sh b/chezmoi.roots/_home/private_dot_config/sz.env/executable_000_load.sh index c203a33..11c1f80 100644 --- a/chezmoi.roots/_home/private_dot_config/sz.env/executable_000_load.sh +++ b/chezmoi.roots/_home/private_dot_config/sz.env/executable_000_load.sh @@ -13,8 +13,6 @@ is_sourced() { BASE_0=${BASE_0:-$0} export SHELL="${SHELL:-${shell:+$(command -v ${shell})}}" BASE_SHELL=$(basename "$SHELL") -_NL=' -' is_cmd() { type -p -- "${@}" 2> /dev/null 1> /dev/null @@ -41,38 +39,48 @@ if is_sourced; then #shellcheck source=/dev/null . "${1}" } - + load_all() { - ${DBG:+:} local LOAD_ENV_FILES ALL_ENV_FILES - local FILES DIRS + local ALL_ENV_FILES + local FILES DIRS if [ -z "$SZ_ENV_LOADED" ]; then SZ_ENV_LOADED=1 LOAD_EXIT=0 # The following constructs a list of load_next ... commands - # Find all .env files, exclude lib directory - ALL_ENV_FILES="$(find $USER_HOME/.config/sz.env -type f -name '*.env' -or -name "*.env.$BASE_SHELL" -not -path '*/lib/*' | sort)" - - # Collect _PATH_ files first - LOAD_ENV_FILES="$(echo "$ALL_ENV_FILES" | grep -E '/[[:digit:]]{3}_(ID|PATH)_')" - - # Collect the rest of the .env files - LOAD_ENV_FILES="${LOAD_ENV_FILES:+${LOAD_ENV_FILES}${_NL}}$(echo "$ALL_ENV_FILES" | grep -Ev '/[[:digit:]]{3}_(ID|PATH)_')" - - # Add the cleanup file if it exists - LOAD_ENV_FILES="${LOAD_ENV_FILES:+${LOAD_ENV_FILES}${_NL}}$(echo "$LOAD_ENV_FILES" | grep '999_PATH_zz_cleanup.env$')" - - # prefix each file with load_next - LOAD_ENV_FILES="$( <<<"$LOAD_ENV_FILES" sed -e 's/^/load_next "/; s/$/";/' )" + FIND_CMD="$( printf "%s " \ + "find $USER_HOME/.config/sz.env -xdev -type d -not -name '*.off' -not -path '$USER_HOME/.config/sz.env/lib' -not -path '$USER_HOME/.config/sz.env/lib/*' " \ + "-exec sh -c '" \ + 'find "$1" -xdev -maxdepth 1 -type f' \ + '-name "ID_*.env" -or -name "ID_*.env.'"${BASE_SHELL}"\" \ + "| sort' shell '{}' ';'" \ + "-exec sh -c '" \ + 'find "$1" -xdev -maxdepth 1 -type f' \ + '-name "???_PATH_*.env" -or -name "???_PATH_*.env.'"${BASE_SHELL}"\" \ + "| sort' shell '{}' ';'" \ + "-exec sh -c '" \ + 'find "$1" -xdev -maxdepth 1 -type f' \ + '-name "*.env" -or -name "*.env.'"${BASE_SHELL}"\" \ + '| grep -Ev "/[[:digit:]]+_(PATH|ID)_[^/]+$"' \ + "| sort' shell '{}' ';'" \ + "-exec sh -c '" \ + 'find "$1" -xdev -maxdepth 1 -type f -name "999_PATH_zz_cleanup.env"' \ + "' shell '{}' ';'" + )" + ALL_ENV_FILES="$( + eval "$FIND_CMD" | sed -e 's/^/load_next "/; s/$/";/' + )" + ${DBG/%1/:} unset FIND_CMD if [ -n "$DBG_NO_SZ_LOAD" ]; then - LOAD_ENV_FILES=$(<<<"$LOAD_ENV_FILES" sed -Ee ' + ALL_ENV_FILES=$(<<<"$ALL_ENV_FILES" sed -Ee ' /PATH_/!s/^(load_next )/# \1/ ') - printf 'Loading limited environment...\n' + printf 'Loading limited environment...\n' fi # Run the constructed (see above) list - eval "$LOAD_ENV_FILES" + eval "$ALL_ENV_FILES" + ${DBG/%1/:} unset ALL_ENV_FILES fi } load_all diff --git a/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.locked b/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.locked new file mode 100644 index 0000000..e7a8e03 --- /dev/null +++ b/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.locked @@ -0,0 +1,438 @@ +// +// THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /Users/gal.szkolnik/.config/zellij/config.kdl.bak.1 +// + +keybinds clear-defaults=true { + locked { + bind "Alt z" { SwitchToMode "normal"; } + } + pane { + 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 "locked"; } + bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "locked"; } + bind "f" { ToggleFocusFullscreen; SwitchToMode "locked"; } + bind "h" { MoveFocus "left"; } + bind "i" { TogglePanePinned; SwitchToMode "locked"; } + bind "j" { MoveFocus "down"; } + bind "k" { MoveFocus "up"; } + bind "l" { MoveFocus "right"; } + bind "n" { NewPane; SwitchToMode "locked"; } + bind "p" { SwitchToMode "normal"; } + bind "r" { NewPane "right"; SwitchToMode "locked"; } + bind "w" { ToggleFloatingPanes; SwitchToMode "locked"; } + bind "x" { CloseFocus; SwitchToMode "locked"; } + bind "z" { TogglePaneFrames; SwitchToMode "locked"; } + bind "tab" { SwitchFocus; } + } + tab { + bind "left" { GoToPreviousTab; } + bind "down" { GoToNextTab; } + bind "up" { GoToPreviousTab; } + bind "right" { GoToNextTab; } + 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"; } + bind "[" { BreakPaneLeft; SwitchToMode "locked"; } + bind "]" { BreakPaneRight; SwitchToMode "locked"; } + bind "b" { BreakPane; SwitchToMode "locked"; } + bind "h" { GoToPreviousTab; } + bind "j" { GoToNextTab; } + bind "k" { GoToPreviousTab; } + bind "l" { GoToNextTab; } + bind "n" { NewTab; SwitchToMode "locked"; } + bind "r" { SwitchToMode "renametab"; TabNameInput 0; } + bind "s" { ToggleActiveSyncTab; SwitchToMode "locked"; } + bind "t" { SwitchToMode "normal"; } + bind "x" { CloseTab; SwitchToMode "locked"; } + bind "tab" { ToggleTab; } + } + 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 "r" { SwitchToMode "normal"; } + } + move { + bind "left" { MovePane "left"; } + bind "down" { MovePane "down"; } + bind "up" { MovePane "up"; } + bind "right" { MovePane "right"; } + bind "h" { MovePane "left"; } + bind "j" { MovePane "down"; } + bind "k" { MovePane "up"; } + bind "l" { MovePane "right"; } + bind "m" { SwitchToMode "normal"; } + bind "n" { MovePane; } + bind "p" { MovePaneBackwards; } + bind "tab" { MovePane; } + } + scroll { + bind "Alt left" { MoveFocusOrTab "left"; SwitchToMode "locked"; } + bind "Alt down" { MoveFocus "down"; SwitchToMode "locked"; } + bind "Alt up" { MoveFocus "up"; SwitchToMode "locked"; } + bind "Alt right" { MoveFocusOrTab "right"; SwitchToMode "locked"; } + bind "e" { EditScrollback; SwitchToMode "locked"; } + bind "f" { SwitchToMode "entersearch"; SearchInput 0; } + bind "Alt h" { MoveFocusOrTab "left"; SwitchToMode "locked"; } + bind "Alt j" { MoveFocus "down"; SwitchToMode "locked"; } + bind "Alt k" { MoveFocus "up"; SwitchToMode "locked"; } + bind "Alt l" { MoveFocusOrTab "right"; SwitchToMode "locked"; } + bind "s" { SwitchToMode "normal"; } + } + search { + bind "c" { SearchToggleOption "CaseSensitivity"; } + bind "n" { Search "down"; } + bind "o" { SearchToggleOption "WholeWord"; } + bind "p" { Search "up"; } + bind "w" { SearchToggleOption "Wrap"; } + } + session { + bind "a" { + LaunchOrFocusPlugin "zellij:about" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "c" { + LaunchOrFocusPlugin "configuration" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "d" { Detach; } + bind "o" { SwitchToMode "normal"; } + bind "p" { + LaunchOrFocusPlugin "plugin-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "w" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + } + shared_among "normal" "locked" { + bind "Alt left" { MoveFocusOrTab "left"; } + bind "Alt down" { MoveFocus "down"; } + bind "Alt up" { MoveFocus "up"; } + bind "Alt right" { MoveFocusOrTab "right"; } + bind "Alt +" { Resize "Increase"; } + bind "Alt -" { Resize "Decrease"; } + bind "Alt =" { Resize "Increase"; } + bind "Alt [" { PreviousSwapLayout; } + bind "Alt ]" { NextSwapLayout; } + bind "Alt f" { ToggleFloatingPanes; } + bind "Alt h" { MoveFocusOrTab "left"; } + bind "Alt i" { MoveTab "left"; } + bind "Alt j" { MoveFocus "down"; } + bind "Alt k" { MoveFocus "up"; } + bind "Alt l" { MoveFocusOrTab "right"; } + bind "Alt n" { NewPane; } + bind "Alt o" { MoveTab "right"; } + } + shared_except "locked" "renametab" "renamepane" { + bind "Alt z" { SwitchToMode "locked"; } + bind "Ctrl q" { Quit; } + } + shared_except "locked" "entersearch" { + bind "enter" { SwitchToMode "locked"; } + } + shared_except "locked" "entersearch" "renametab" "renamepane" { + bind "esc" { SwitchToMode "locked"; } + } + shared_except "locked" "entersearch" "renametab" "renamepane" "move" { + bind "m" { SwitchToMode "move"; } + } + shared_except "locked" "entersearch" "search" "renametab" "renamepane" "session" { + bind "o" { SwitchToMode "session"; } + } + shared_except "locked" "tab" "entersearch" "renametab" "renamepane" { + bind "t" { SwitchToMode "tab"; } + } + shared_except "locked" "tab" "scroll" "entersearch" "renametab" "renamepane" { + bind "s" { SwitchToMode "scroll"; } + } + shared_among "normal" "resize" "tab" "scroll" "prompt" "tmux" { + bind "p" { SwitchToMode "pane"; } + } + shared_except "locked" "resize" "pane" "tab" "entersearch" "renametab" "renamepane" { + bind "r" { SwitchToMode "resize"; } + } + 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 "locked"; } + bind "d" { HalfPageScrollDown; } + bind "Ctrl f" { PageScrollDown; } + bind "h" { PageScrollUp; } + bind "j" { ScrollDown; } + bind "k" { ScrollUp; } + bind "l" { PageScrollDown; } + bind "u" { HalfPageScrollUp; } + } + entersearch { + bind "Ctrl c" { SwitchToMode "scroll"; } + bind "esc" { SwitchToMode "scroll"; } + bind "enter" { SwitchToMode "search"; } + } + renametab { + bind "esc" { UndoRenameTab; SwitchToMode "tab"; } + } + shared_among "renametab" "renamepane" { + bind "Ctrl c" { SwitchToMode "locked"; } + } + renamepane { + bind "esc" { UndoRenamePane; SwitchToMode "pane"; } + } +} + +// Plugin aliases - can be used to change the implementation of Zellij +// changing these requires a restart to take effect +plugins { + 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 + } +} + +// 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: +// - true +// - false (Default) +// +// simplified_ui true + +// Choose the theme that is specified in the themes section. +// Default: default +// +// theme "dracula" + +// 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 +// +// default_shell "fish" + +// Choose the path to override cwd that zellij will use for opening new panes +// +// default_cwd "/tmp" + +// The name of the default layout to load on startup +// Default: "default" +// +// default_layout "compact" + +// The folder in which Zellij will look for layouts +// (Requires restart) +// +// 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 +// potentially interfere with copying text. +// Options: +// - true (default) +// - 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 +// +// 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 +// +// copy_command "pbcopy" + +// 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 automatic copying (and clearing) of selection when releasing mouse +// Default: true +// +// copy_on_select true + +// Path to the default editor to use to edit pane scrollbuffer +// Default: $EDITOR or $VISUAL +// scrollback_editor "/usr/bin/vim" + +// 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: +// +// 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 +// +// attach_to_session true + +// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible +// Options: +// - true (default) +// - false +// +// auto_layout false + +// 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 +// +// show_release_notes false diff --git a/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.locked-full b/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.locked-full new file mode 100644 index 0000000..7b26fef --- /dev/null +++ b/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.locked-full @@ -0,0 +1,439 @@ +// +// THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /Users/gal.szkolnik/.config/zellij/config.kdl.bak.1 +// + +keybinds clear-defaults=true { + locked { + bind "Alt z" { SwitchToMode "normal"; } + } + pane { + 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 "locked"; } + bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "locked"; } + bind "f" { ToggleFocusFullscreen; SwitchToMode "locked"; } + bind "h" { MoveFocus "left"; } + bind "i" { TogglePanePinned; SwitchToMode "locked"; } + bind "j" { MoveFocus "down"; } + bind "k" { MoveFocus "up"; } + bind "l" { MoveFocus "right"; } + bind "n" { NewPane; SwitchToMode "locked"; } + bind "p" { SwitchToMode "normal"; } + bind "r" { NewPane "right"; SwitchToMode "locked"; } + bind "w" { ToggleFloatingPanes; SwitchToMode "locked"; } + bind "x" { CloseFocus; SwitchToMode "locked"; } + bind "z" { TogglePaneFrames; SwitchToMode "locked"; } + bind "tab" { SwitchFocus; } + } + tab { + bind "left" { GoToPreviousTab; } + bind "down" { GoToNextTab; } + bind "up" { GoToPreviousTab; } + bind "right" { GoToNextTab; } + 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"; } + bind "[" { BreakPaneLeft; SwitchToMode "locked"; } + bind "]" { BreakPaneRight; SwitchToMode "locked"; } + bind "b" { BreakPane; SwitchToMode "locked"; } + bind "h" { GoToPreviousTab; } + bind "j" { GoToNextTab; } + bind "k" { GoToPreviousTab; } + bind "l" { GoToNextTab; } + bind "n" { NewTab; SwitchToMode "locked"; } + bind "r" { SwitchToMode "renametab"; TabNameInput 0; } + bind "s" { ToggleActiveSyncTab; SwitchToMode "locked"; } + bind "t" { SwitchToMode "normal"; } + bind "x" { CloseTab; SwitchToMode "locked"; } + bind "tab" { ToggleTab; } + } + 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 "r" { SwitchToMode "normal"; } + } + move { + bind "left" { MovePane "left"; } + bind "down" { MovePane "down"; } + bind "up" { MovePane "up"; } + bind "right" { MovePane "right"; } + bind "h" { MovePane "left"; } + bind "j" { MovePane "down"; } + bind "k" { MovePane "up"; } + bind "l" { MovePane "right"; } + bind "m" { SwitchToMode "normal"; } + bind "n" { MovePane; } + bind "p" { MovePaneBackwards; } + bind "tab" { MovePane; } + } + scroll { + bind "Alt left" { MoveFocusOrTab "left"; SwitchToMode "locked"; } + bind "Alt down" { MoveFocus "down"; SwitchToMode "locked"; } + bind "Alt up" { MoveFocus "up"; SwitchToMode "locked"; } + bind "Alt right" { MoveFocusOrTab "right"; SwitchToMode "locked"; } + bind "e" { EditScrollback; SwitchToMode "locked"; } + bind "f" { SwitchToMode "entersearch"; SearchInput 0; } + bind "Alt h" { MoveFocusOrTab "left"; SwitchToMode "locked"; } + bind "Alt j" { MoveFocus "down"; SwitchToMode "locked"; } + bind "Alt k" { MoveFocus "up"; SwitchToMode "locked"; } + bind "Alt l" { MoveFocusOrTab "right"; SwitchToMode "locked"; } + bind "s" { SwitchToMode "normal"; } + } + search { + bind "c" { SearchToggleOption "CaseSensitivity"; } + bind "n" { Search "down"; } + bind "o" { SearchToggleOption "WholeWord"; } + bind "p" { Search "up"; } + bind "w" { SearchToggleOption "Wrap"; } + } + session { + bind "a" { + LaunchOrFocusPlugin "zellij:about" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "c" { + LaunchOrFocusPlugin "configuration" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "d" { Detach; } + bind "o" { SwitchToMode "normal"; } + bind "p" { + LaunchOrFocusPlugin "plugin-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + bind "w" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "locked" + } + } +// shared_among "normal" "locked" { + shared_among "normal" { + bind "Alt left" { MoveFocusOrTab "left"; } + bind "Alt down" { MoveFocus "down"; } + bind "Alt up" { MoveFocus "up"; } + bind "Alt right" { MoveFocusOrTab "right"; } + bind "Alt +" { Resize "Increase"; } + bind "Alt -" { Resize "Decrease"; } + bind "Alt =" { Resize "Increase"; } + bind "Alt [" { PreviousSwapLayout; } + bind "Alt ]" { NextSwapLayout; } + bind "Alt f" { ToggleFloatingPanes; } + bind "Alt h" { MoveFocusOrTab "left"; } + bind "Alt i" { MoveTab "left"; } + bind "Alt j" { MoveFocus "down"; } + bind "Alt k" { MoveFocus "up"; } + bind "Alt l" { MoveFocusOrTab "right"; } + bind "Alt n" { NewPane; } + bind "Alt o" { MoveTab "right"; } + } + shared_except "locked" "renametab" "renamepane" { + bind "Alt z" { SwitchToMode "locked"; } + bind "Ctrl q" { Quit; } + } + shared_except "locked" "entersearch" { + bind "enter" { SwitchToMode "locked"; } + } + shared_except "locked" "entersearch" "renametab" "renamepane" { + bind "esc" { SwitchToMode "locked"; } + } + shared_except "locked" "entersearch" "renametab" "renamepane" "move" { + bind "m" { SwitchToMode "move"; } + } + shared_except "locked" "entersearch" "search" "renametab" "renamepane" "session" { + bind "o" { SwitchToMode "session"; } + } + shared_except "locked" "tab" "entersearch" "renametab" "renamepane" { + bind "t" { SwitchToMode "tab"; } + } + shared_except "locked" "tab" "scroll" "entersearch" "renametab" "renamepane" { + bind "s" { SwitchToMode "scroll"; } + } + shared_among "normal" "resize" "tab" "scroll" "prompt" "tmux" { + bind "p" { SwitchToMode "pane"; } + } + shared_except "locked" "resize" "pane" "tab" "entersearch" "renametab" "renamepane" { + bind "r" { SwitchToMode "resize"; } + } + 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 "locked"; } + bind "d" { HalfPageScrollDown; } + bind "Ctrl f" { PageScrollDown; } + bind "h" { PageScrollUp; } + bind "j" { ScrollDown; } + bind "k" { ScrollUp; } + bind "l" { PageScrollDown; } + bind "u" { HalfPageScrollUp; } + } + entersearch { + bind "Ctrl c" { SwitchToMode "scroll"; } + bind "esc" { SwitchToMode "scroll"; } + bind "enter" { SwitchToMode "search"; } + } + renametab { + bind "esc" { UndoRenameTab; SwitchToMode "tab"; } + } + shared_among "renametab" "renamepane" { + bind "Ctrl c" { SwitchToMode "locked"; } + } + renamepane { + bind "esc" { UndoRenamePane; SwitchToMode "pane"; } + } +} + +// Plugin aliases - can be used to change the implementation of Zellij +// changing these requires a restart to take effect +plugins { + 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 + } +} + +// 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: +// - true +// - false (Default) +// +// simplified_ui true + +// Choose the theme that is specified in the themes section. +// Default: default +// +// theme "dracula" + +// 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 +// +// default_shell "fish" + +// Choose the path to override cwd that zellij will use for opening new panes +// +// default_cwd "/tmp" + +// The name of the default layout to load on startup +// Default: "default" +// +// default_layout "compact" + +// The folder in which Zellij will look for layouts +// (Requires restart) +// +// 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 +// potentially interfere with copying text. +// Options: +// - true (default) +// - 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 +// +// 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 +// +// copy_command "pbcopy" + +// 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 automatic copying (and clearing) of selection when releasing mouse +// Default: true +// +// copy_on_select true + +// Path to the default editor to use to edit pane scrollbuffer +// Default: $EDITOR or $VISUAL +// scrollback_editor "/usr/bin/vim" + +// 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: +// +// 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 +// +// attach_to_session true + +// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible +// Options: +// - true (default) +// - false +// +// auto_layout false + +// 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 +// +// show_release_notes false diff --git a/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.normal b/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.normal new file mode 100644 index 0000000..bc889a3 --- /dev/null +++ b/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.normal @@ -0,0 +1,466 @@ +// +// THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /Users/gal.szkolnik/.config/zellij/config.kdl.bak +// + +keybinds clear-defaults=true { + locked { + bind "Ctrl g" { SwitchToMode "normal"; } + } + pane { + 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 "i" { TogglePanePinned; SwitchToMode "normal"; } + bind "j" { MoveFocus "down"; } + bind "k" { MoveFocus "up"; } + bind "l" { MoveFocus "right"; } + bind "n" { NewPane; SwitchToMode "normal"; } + bind "p" { SwitchFocus; } + bind "Ctrl p" { SwitchToMode "normal"; } + bind "r" { NewPane "right"; SwitchToMode "normal"; } + bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } + bind "z" { TogglePaneFrames; SwitchToMode "normal"; } + } + tab { + bind "left" { GoToPreviousTab; } + bind "down" { GoToNextTab; } + bind "up" { GoToPreviousTab; } + bind "right" { GoToNextTab; } + 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 "[" { BreakPaneLeft; SwitchToMode "normal"; } + bind "]" { BreakPaneRight; SwitchToMode "normal"; } + bind "b" { BreakPane; SwitchToMode "normal"; } + bind "h" { GoToPreviousTab; } + bind "j" { GoToNextTab; } + bind "k" { GoToPreviousTab; } + bind "l" { GoToNextTab; } + bind "n" { NewTab; SwitchToMode "normal"; } + bind "r" { SwitchToMode "renametab"; TabNameInput 0; } + bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } + bind "Ctrl t" { SwitchToMode "normal"; } + bind "x" { CloseTab; SwitchToMode "normal"; } + bind "tab" { ToggleTab; } + } + 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"; } + } + move { + bind "left" { MovePane "left"; } + bind "down" { MovePane "down"; } + bind "up" { MovePane "up"; } + bind "right" { MovePane "right"; } + bind "h" { MovePane "left"; } + bind "Ctrl h" { SwitchToMode "normal"; } + bind "j" { MovePane "down"; } + bind "k" { MovePane "up"; } + bind "l" { MovePane "right"; } + bind "n" { MovePane; } + bind "p" { MovePaneBackwards; } + bind "tab" { MovePane; } + } + scroll { + bind "Alt left" { MoveFocusOrTab "left"; SwitchToMode "normal"; } + bind "Alt down" { MoveFocus "down"; SwitchToMode "normal"; } + bind "Alt up" { MoveFocus "up"; SwitchToMode "normal"; } + bind "Alt right" { MoveFocusOrTab "right"; SwitchToMode "normal"; } + bind "e" { EditScrollback; SwitchToMode "normal"; } + bind "Alt h" { MoveFocusOrTab "left"; SwitchToMode "normal"; } + bind "Alt j" { MoveFocus "down"; SwitchToMode "normal"; } + bind "Alt k" { MoveFocus "up"; SwitchToMode "normal"; } + bind "Alt l" { MoveFocusOrTab "right"; SwitchToMode "normal"; } + bind "s" { SwitchToMode "entersearch"; SearchInput 0; } + } + search { + bind "c" { SearchToggleOption "CaseSensitivity"; } + bind "n" { Search "down"; } + bind "o" { SearchToggleOption "WholeWord"; } + bind "p" { Search "up"; } + bind "w" { SearchToggleOption "Wrap"; } + } + session { + bind "a" { + LaunchOrFocusPlugin "zellij:about" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + bind "c" { + LaunchOrFocusPlugin "configuration" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + bind "Ctrl o" { SwitchToMode "normal"; } + bind "p" { + LaunchOrFocusPlugin "plugin-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + bind "w" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + } + shared_except "locked" { + bind "Alt +" { Resize "Increase"; } + bind "Alt -" { Resize "Decrease"; } + bind "Alt =" { Resize "Increase"; } + bind "Alt [" { PreviousSwapLayout; } + bind "Alt ]" { NextSwapLayout; } + bind "Alt f" { ToggleFloatingPanes; } + bind "Ctrl g" { SwitchToMode "locked"; } + bind "Alt i" { MoveTab "left"; } + bind "Alt n" { NewPane; } + bind "Alt o" { MoveTab "right"; } + bind "Ctrl q" { Quit; } + } + shared_except "locked" "move" { + bind "Ctrl h" { SwitchToMode "move"; } + } + shared_except "locked" "session" { + bind "Ctrl o" { SwitchToMode "session"; } + } + shared_except "locked" "scroll" { + bind "Alt left" { MoveFocusOrTab "left"; } + bind "Alt down" { MoveFocus "down"; } + bind "Alt up" { MoveFocus "up"; } + bind "Alt right" { MoveFocusOrTab "right"; } + bind "Alt h" { MoveFocusOrTab "left"; } + bind "Alt j" { MoveFocus "down"; } + bind "Alt k" { MoveFocus "up"; } + bind "Alt l" { MoveFocusOrTab "right"; } + } + shared_except "locked" "scroll" "search" "tmux" { + bind "Ctrl b" { SwitchToMode "tmux"; } + } + shared_except "locked" "scroll" "search" { + bind "Ctrl s" { SwitchToMode "scroll"; } + } + shared_except "locked" "tab" { + bind "Ctrl t" { SwitchToMode "tab"; } + } + shared_except "locked" "pane" { + bind "Ctrl p" { SwitchToMode "pane"; } + } + shared_except "locked" "resize" { + bind "Ctrl n" { SwitchToMode "resize"; } + } + shared_except "normal" "locked" "entersearch" { + bind "enter" { SwitchToMode "normal"; } + } + shared_except "normal" "locked" "entersearch" "renametab" "renamepane" { + bind "esc" { SwitchToMode "normal"; } + } + shared_among "pane" "tmux" { + bind "x" { CloseFocus; SwitchToMode "normal"; } + } + 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 "Ctrl s" { SwitchToMode "normal"; } + bind "u" { HalfPageScrollUp; } + } + entersearch { + bind "Ctrl c" { SwitchToMode "scroll"; } + bind "esc" { SwitchToMode "scroll"; } + bind "enter" { SwitchToMode "search"; } + } + renametab { + bind "esc" { UndoRenameTab; SwitchToMode "tab"; } + } + shared_among "renametab" "renamepane" { + bind "Ctrl c" { SwitchToMode "normal"; } + } + renamepane { + bind "esc" { UndoRenamePane; SwitchToMode "pane"; } + } + shared_among "session" "tmux" { + bind "d" { Detach; } + } + 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"; } + } +} + +// Plugin aliases - can be used to change the implementation of Zellij +// changing these requires a restart to take effect +plugins { + 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 + } +} + +// 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: +// - true +// - false (Default) +// +// simplified_ui true + +// Choose the theme that is specified in the themes section. +// Default: default +// +// theme "dracula" + +// Choose the base input mode of zellij. +// Default: normal +// +default_mode "normal" + +// 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 "/tmp" + +// The name of the default layout to load on startup +// Default: "default" +// +// default_layout "compact" + +// The folder in which Zellij will look for layouts +// (Requires restart) +// +// 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 +// potentially interfere with copying text. +// Options: +// - true (default) +// - 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 +// +// 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 +// +// copy_command "pbcopy" + +// 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 automatic copying (and clearing) of selection when releasing mouse +// Default: true +// +// copy_on_select true + +// Path to the default editor to use to edit pane scrollbuffer +// Default: $EDITOR or $VISUAL +// scrollback_editor "/usr/bin/vim" + +// 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: +// +// 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 +// +// attach_to_session true + +// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible +// Options: +// - true (default) +// - false +// +// auto_layout false + +// 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 +// +// show_release_notes false diff --git a/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.tmpl b/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.tmpl deleted file mode 100644 index 8d272cf..0000000 --- a/chezmoi.roots/_home/private_dot_config/zellij/config.kdl.tmpl +++ /dev/null @@ -1,438 +0,0 @@ -// Note that "keybinds clear-defaults=true", this override the default -// keybindings completely, thus all bindings are important. -// -// It is receommended to check for updates here from time to time -// for new features. -// -keybinds clear-defaults=true { - normal { - // uncomment this and adjust key if using copy_on_select=false - // bind "Alt c" { Copy; } - } - locked { - bind {{ list (dig "style" "zellij" "leader-modifer" "Alt" .) (dig "style" "zellij" "leader-key" "a" .) | join " " | quote }} { SwitchToMode "Normal"; } - } - resize { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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 "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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;} - bind "i" { TogglePanePinned; SwitchToMode "Normal"; } - } - move { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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 "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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; } - } - scroll { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} s" { SwitchToMode "Normal"; } - bind "e" { EditScrollback; SwitchToMode "Normal"; } - bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} c" { ScrollToBottom; SwitchToMode "Normal"; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} f" "PageDown" "Right" "l" { PageScrollDown; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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 "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} s" { SwitchToMode "Normal"; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} c" { ScrollToBottom; SwitchToMode "Normal"; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} f" "PageDown" "Right" "l" { PageScrollDown; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "n" { Search "down"; } - bind "p" { Search "up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} c" "Esc" { SwitchToMode "Scroll"; } - bind "Enter" { SwitchToMode "Search"; } - } - renametab { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } - } - renamepane { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } - } - session { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} o" { SwitchToMode "Normal"; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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" - } - } - tmux { - bind "[" { SwitchToMode "Scroll"; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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 {{ list (dig "style" "zellij" "leader-modifer" "Alt" .) (dig "style" "zellij" "leader-key" "a" .) | join " " | quote }} { SwitchToMode "Locked"; } - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} q" { Quit; } - bind "Alt Shift 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"; } - bind "Alt k" "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 "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} p" { SwitchToMode "Pane"; } - } - shared_except "resize" "locked" { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} n" { SwitchToMode "Resize"; } - } - shared_except "scroll" "locked" { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} s" { SwitchToMode "Scroll"; } - } - shared_except "session" "locked" { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} o" { SwitchToMode "Session"; } - } - shared_except "tab" "locked" { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} t" { SwitchToMode "Tab"; } - } - shared_except "move" "locked" { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} h" { SwitchToMode "Move"; } - } - shared_except "tmux" "locked" { - bind "{{ dig "style" "zellij" "leader-modifer" "Alt" . }} 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 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 -// -// 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 {{ get (dict "n" "false") ( dig "style" "zellij" "frames" "y" .) | default "true" }} - -// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible -// Options: -// - true (default) -// - false -// -// 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 -// -// 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 {{ dig "style" "zellij" "theme" "default" . | quote }} - -// The name of the default layout to load on startup -// Default: "default" -// (Requires restart) -// -// 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. -// (Requires restart) -// 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. -// (Requires restart) -// 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) -// (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