chezmoi: bat, ideavim, lazygit, lsd, readline, vim, zellij, lesskey

This commit is contained in:
js0ny 2025-09-27 13:46:16 +01:00
parent 298b2290a8
commit f3f92431b2
15 changed files with 678 additions and 991 deletions

View file

@ -0,0 +1,41 @@
# $DOTFILES/common/bat.config
# Date: 2025-01-26
# Author: js0ny
# Location;
# Unix: $XDG_CONFIG_HOME/bat/config
# Windows:
# - Default: %AppData%\bat\config
# - Portable: (scoop prefix bat) + config
# Linking:
# ln -sf $DOTFILES/common/bat.config $XDG_CONFIG_HOME/bat/config
# This is `bat`s configuration file. Each line either contains a comment or
# a command-line option that you want to pass to `bat` by default. You can
# run `bat --help` to get a list of all possible configuration options.
# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
# for a list of all available themes
--theme="Catppuccin Mocha"
# Enable this to use italic text on the terminal. This is not supported on all
# terminal emulators (like tmux, by default):
#--italic-text=always
# Uncomment the following line to disable automatic paging:
#--paging=never
# Uncomment the following line if you are using less version >= 551 and want to
# enable mouse scrolling support in `bat` when running inside tmux. This might
# disable text selection, unless you press shift.
--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
# Syntax mappings: map a certain filename pattern to a language.
# Example 1: use the C++ syntax for Arduino .ino files
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
#--map-syntax "*.ino:C++"
#--map-syntax ".ignore:Git Ignore"
# Squeeze consecutive empty lines
--squeeze-blank

View file

@ -0,0 +1,42 @@
# $DOTFILES/common/bat.config
# Date: 2025-01-26
# Author: js0ny
# Location;
# Unix: $XDG_CONFIG_HOME/bat/config
# Windows:
# - Default: %AppData%\bat\config
# - Portable: (scoop prefix bat) + config
# Linking:
# ln -sf $DOTFILES/common/bat.config $XDG_CONFIG_HOME/bat/config
# This is `bat`s configuration file. Each line either contains a comment or
# a command-line option that you want to pass to `bat` by default. You can
# run `bat --help` to get a list of all possible configuration options.
# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
# for a list of all available themes
--theme="Catppuccin Latte"
# Enable this to use italic text on the terminal. This is not supported on all
# terminal emulators (like tmux, by default):
#--italic-text=always
# Uncomment the following line to disable automatic paging:
#--paging=never
# Uncomment the following line if you are using less version >= 551 and want to
# enable mouse scrolling support in `bat` when running inside tmux. This might
# disable text selection, unless you press shift.
--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
# Syntax mappings: map a certain filename pattern to a language.
# Example 1: use the C++ syntax for Arduino .ino files
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
#--map-syntax "*.ino:C++"
#--map-syntax ".ignore:Git Ignore"
# Squeeze consecutive empty lines
--squeeze-blank

View file

@ -0,0 +1 @@
bat.config.dark

View file

@ -0,0 +1,239 @@
" $DOTFILES/common/ideavimrc
" Date: 2024-12-22
" Author: js0ny
" Location:
" $XDG_CONFIG_HOME/ideavim/ideavimrc
" Linking:
" ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
source ~/.local/share/intellimacs/spacemacs.vim
source ~/.local/share/intellimacs/extra.vim
source ~/.local/share/intellimacs/major.vim
source ~/.local/share/intellimacs/hybrid.vim
source ~/.local/share/intellimacs/which-key.vim
" """ Basic Configs """
let mapleader = " " " set <leader> to <space>
""" Colemak """
noremap n j
noremap e k
noremap i l
" Similar position to i
noremap l i
noremap L I
" ne[k]st
noremap k n
noremap K N
" [j]ump
noremap j e
noremap J E
nnoremap H :bp<CR>
nnoremap I :bn<CR>
noremap N 5j
noremap E 5k
vnoremap H ^
xnoremap H ^
onoremap H ^
vnoremap I $
xnoremap I $
onoremap I $
" Y to yank to end of line
noremap Y y$
""" Options """
" search for actions: :actionlist <patter>
"" Vim Compat ""
set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard
set gdefault " substitute all occurrences in line per default
set history=4096 " keep x lines of command line history
set hlsearch
set ignorecase
set incsearch
set keymodel=startsel,stopsel
set matchpairs+=<:>
set showcmd
set smartcase " no ignore case when pattern is uppercase
set wrapscan " searches wrap around the end of the file
"" IDE Settings ""
set scrolloff=5
set sidescrolloff=10
"" IDE Features ""
set relativenumber " Hybrid Line Number shown
"" IdeaVim Only ""
set ideajoin
set ideastatusicon=enabled
""" Plugins """
Plug 'justinmk/vim-sneak'
Plug 'preservim/nerdtree'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'terryma/vim-multiple-cursors'
Plug 'machakann/vim-highlightedyank'
Plug 'easymotion/vim-easymotion'
""" Keybindings """
"" don't lose selection when indenting ""
vnoremap < <gv
vnoremap > >gv
vnoremap = =gv
"" edit ideavim config <leader>v + ""
nnoremap <leader>vv :e ~/.ideavimrc<CR>
nnoremap <leader>vr :source ~/.ideavimrc<CR>
"" NERDTree ""
nnoremap <leader>e :NERDTreeToggle<CR>
"" EasyMotion ""
nmap s <Plug>(easymotion-f)
nmap S <Plug>(easymotion-F)
"" Sneak ""
nmap f <Plug>(sneak-s)
nmap F <Plug>(sneak-S)
"" Language Server Protocol ""
nnoremap gd :action GotoDeclaration<CR>
nnoremap gtd :action GotoTypeDeclaration<CR>
nnoremap gtD :action QuickTypeDefinition<CR>
nnoremap gr :action ShowUsages<CR>
nnoremap gi :action GotoImplementation<CR>
nnoremap gpi :action QuickImplementations<CR>
nnoremap gs :action GotoSuperMethod<CR>
nnoremap ga :action ShowIntentionActions<CR>
nnoremap gq :action ShowIntentionActions<CR>
nnoremap ge :action GotoNextError<CR>
"" Collapse and Expand z + ""
nnoremap zi :action ExpandCollapseToggleAction<CR>
nnoremap zc :action CollapseRegion<CR>
nnoremap zC :action CollapseRegionRecursively<CR>
nnoremap zM :action CollapseAll<CR>
nnoremap zo :action ExpandRegion<CR>
nnoremap zO :action ExpandRegionRecursively<CR>
nnoremap zR :action ExpandAll<CR>
"" Miscs ""
nnoremap <leader>: :action GotoAction<CR>
nnoremap <leader><leader> :action GotoFile<CR>
nnoremap <leader>h :action PrevSplitter<CR>
nnoremap <leader>i :action NextSplitter<CR>
"" AI Related <leader>a + ""
nnoremap <leader>ac :action copilot.chat.show<CR>
nnoremap <leader>ad :action copilot.disableCopilot<CR>
nnoremap <leader>ae :action copilot.enableCopilot<CR>
nnoremap <leader>aa :action copilot.openCopilot<CR>
" <leader>b : +buffer
nnoremap <leader>bb :action Switcher<CR>
noremap <leader>bd :bdelete<CR>
noremap <leader>bh :bprevious<CR>
noremap <leader>bi :bnext<CR>
noremap <leader>bp :bprevious<CR>
noremap <leader>bn :bnext<CR>
" <leader>c : +code/compile
nnoremap <leader>cr :action Run<CR>
nnoremap <leader>cf :action ReformatCode<CR>
nnoremap <leader>cs :action GotoSymbol<CR>
nnoremap <leader>cS :action GotoSymbol<CR>
nnoremap <leader>cR :action RenameElement<CR>
""" Works for Rider only
nnoremap <leader>ce :action ReSharperGotoNextErrorInSolution<CR>
nnoremap <leader>cE :action ReSharperGotoPrevErrorInSolution<CR>
" <leader>d : +debug
" <leader>f : +file
nnoremap <leader>ff :action GotoFile<CR>
nnoremap <leader>fF :action TextSearchAction<CR>
nnoremap <leader>fc :action ShowSettings<CR>
nnoremap <leader>fC :action ShowSettings<CR>
nnoremap <leader>fe :NERDTreeToggle<CR>
nnoremap <leader>fo :OpenInAssociatedApplication<CR>
nnoremap <leader>ft :action ActivateTerminalToolWindow<CR>
nnoremap <leader>fx :action WelcomeScreen.Plugins<CR>
" <leader>g : +git
nnoremap <leader>gp :action Git.Pull<CR>
nnoremap <leader>gP :action Vcs.Push<CR>
nnoremap <leader>gb :action Git.Branches<CR>
nnoremap <leader>gR :action Git.Rebase<CR>
nnoremap <leader>gM :action Git.Merge<CR>
nnoremap <leader>gc :action CheckinProject<CR>
nnoremap <leader>gC :action Git.Clone<CR>
nnoremap <leader>gg :action ActivateVersionControlToolWindow<CR>
nnoremap <leader>gS :action Git.Stash<CR>
" <leader>h : +help
" <leader>p : +project
nnoremap <leader>pr :action Run<CR>
nnoremap <leader>pd :action Debug<CR>
nnoremap <leader>pb :action Build<CR>
" <leader>q : +quit
nnoremap <leader>qq :action Exit<CR>
nnoremap <leader>Q :action Exit<CR>
" <leader>r : +refactor
nnoremap <leader>ri :action Inline<CR>
nnoremap <leader>rr :action RenamElement<CR>
nnoremap <leader>rev :action IntroduceVariable<CR>
vnoremap <leader>rev :action IntroduceVariable<CR>
nnoremap <leader>rem :action ExtractMethod<CR>
vnoremap <leader>rem :action ExtractMethod<CR>
nnoremap <leader>rm :action Move<CR>
nnoremap <leader>ro :action OptimizeImports<CR>
nnoremap <leader>rG :action Generate<CR>
" <leader>t : +test
nnoremap <leader>tt :action RiderUnitTestRunSolutionAction<CR>
nnoremap <leader>tT :action Rider.UnitTesting.MainMenu<CR>
" <leader>u : +ui
nnoremap <leader>ui :action ChangeLaf<CR>
nnoremap <leader>uw :action EditorToggleUseSoftWraps<CR>
" <leader>w : +write/window
nnoremap <leader>ww :write<CR>
nnoremap <leader>wa :wall<CR>
nnoremap <leader>wq :wq<CR>
nnoremap <leader>W :write<CR>
nnoremap <leader>wh :action PrevSplitter<CR>
nnoremap <leader>wi :action NextSplitter<CR>
nnoremap <leader>wH :action SplitHorizontally<CR>
nnoremap <leader>wI :action SplitHorizontally<CR>
nnoremap <leader>wN :action SplitVertically<CR>
nnoremap <leader>wE :action SplitVertically<CR>
nnoremap <leader>w- :action SplitHorizontally<CR>
nnoremap <leader>w| :action SplitVertically<CR>
nnoremap <leader>w\ :action SplitVertically<CR>
nnoremap <C-p> :action ParameterInfo<CR>
inoremap <C-p> <C-o>:action ParameterInfo<CR>
""" Handling Ctrls """
sethandler <C-C> i:ide
sethandler <C-V> n-v:vim i:ide
sethandler <C-.> a:ide
sethandler <A-<CR>> a:ide

View file

27
dot_config/lesskey Normal file
View file

@ -0,0 +1,27 @@
# $DOTFILES/common/lesskey
# Date: 2024-12-22
# Author: js0ny
# Less the pager.
# Location:
# *nix: $XDG_CONFIG_HOME/lesskey (Or specified by the environment variable $LESSKEYIN)
# Windows: %LESSKEYIN% (environment variable, default: %UserProfile%/_lesskey)
# $Env:LESSKEYIN = $Env:AppData\less\lesskey
# Linking:
# ln -sf $DOTFILES/common/lesskey ~/.config/lesskey
# New-Item -ItemType SymbolicLink -Target $DOTFILES\common\lesskey -Path $Env:LESSKEYIN
# ===========================================================
# work for less -V > 582, for mac, use brew install less to override the system less
# In Windows (current version), the default pager is `more`, should be specifed to `less` by `$Env:Pager = less`
# Format: key action
# Arrow Remap (hnei -> hjkl)
n forw-line
e back-line
N forw-line-force
E back-line-force
# search with k : ne[k]st
k repeat-search
K reverse-search

155
dot_config/lsd/lsd.yaml Normal file
View file

@ -0,0 +1,155 @@
# Location:
# *nix: $XDG_CONFIG_HOME/lsd/config.yaml
# Windows: %APPDATA%\lsd\config.yaml
# Linking:
# ln -sf $DOTFILES/common/lsd.yaml $XDG_CONFIG_HOME/lsd/config.yaml
# == Classic ==
# This is a shorthand to override some of the options to be backwards compatible
# with `ls`. It affects the "color"->"when", "sorting"->"dir-grouping", "date"
# and "icons"->"when" options.
# Possible values: false, true
classic: false
# == Blocks ==
# This specifies the columns and their order when using the long and the tree
# layout.
# Possible values: permission, user, group, context, size, date, name, inode, links, git
blocks:
- permission
- user
- group
- size
- date
- name
# == Color ==
# This has various color options. (Will be expanded in the future.)
color:
# When to colorize the output.
# When "classic" is set, this is set to "never".
# Possible values: never, auto, always
when: auto
# How to colorize the output.
# When "classic" is set, this is set to "no-color".
# Possible values: default, custom
# When "custom" is set, lsd will look in the config directory for `colors.yaml`.
theme: custom
# == Date ==
# This specifies the date format for the date column. The freeform format
# accepts a strftime like string.
# When "classic" is set, this is set to "date".
# Possible values: date, locale, relative, '+<date_format>'
# `date_format` will be a `strftime` formatted value. e.g. `date: '+%d %b %y %X'` will give you a date like this: 17 Jun 21 20:14:55
date: date
# == Dereference ==
# Whether to dereference symbolic links.
# Possible values: false, true
dereference: false
# == Display ==
# What items to display. Do not specify this for the default behavior.
# Possible values: all, almost-all, directory-only
# display: all
# == Icons ==
icons:
# When to use icons.
# When "classic" is set, this is set to "never".
# Possible values: always, auto, never
when: auto
# Which icon theme to use.
# Possible values: fancy, unicode
theme: fancy
# Separator between icon and the name
# Default to 1 space
separator: " "
# == Ignore Globs ==
# A list of globs to ignore when listing.
ignore-globs:
- .git
- .gitkeep # .gitkeep is for keeping empty directories in git
- .DS_Store
# == Indicators ==
# Whether to add indicator characters to certain listed files.
# Possible values: false, true
indicators: false
# == Layout ==
# Which layout to use. "oneline" might be a bit confusing here and should be
# called "one-per-line". It might be changed in the future.
# Possible values: grid, tree, oneline
layout: grid
# == Recursion ==
recursion:
# Whether to enable recursion.
# Possible values: false, true
enabled: false
# How deep the recursion should go. This has to be a positive integer. Leave
# it unspecified for (virtually) infinite.
# depth: 3
# == Size ==
# Specifies the format of the size column.
# Possible values: default, short, bytes
size: default
# == Permission ==
# Specify the format of the permission column
# Possible value: rwx, octal, attributes (windows only), disable
# permission: rwx
# == Sorting ==
sorting:
# Specify what to sort by.
# Possible values: extension, name, time, size, version
column: name
# Whether to reverse the sorting.
# Possible values: false, true
reverse: false
# Whether to group directories together and where.
# When "classic" is set, this is set to "none".
# Possible values: first, last, none
dir-grouping: none
# == No Symlink ==
# Whether to omit showing symlink targets
# Possible values: false, true
no-symlink: false
# == Total size ==
# Whether to display the total size of directories.
# Possible values: false, true
total-size: false
# == Hyperlink ==
# Attach hyperlink to filenames
# Possible values: always, auto, never
hyperlink: never
# == Symlink arrow ==
# Specifies how the symlink arrow display, chars in both ascii and utf8
symlink-arrow:
# == Header ==
# Whether to display block headers.
# Possible values: false, true
header: false
# == Literal ==
# Whether to show quotes on filenames.
# Possible values: false, true
literal: false
# == Truncate owner ==
# How to truncate the username and group names for a file if they exceed a certain
# number of characters.
truncate-owner:
# Number of characters to keep. By default, no truncation is done (empty value).
after:
# String to be appended to a name if truncated.
marker: ""

View file

@ -0,0 +1,67 @@
# $DOTFILES/common/inputrc
# Date: 2024-12-22
# Author: js0ny
# GNU Readline config file, works for programs that use that library
# e.g. Python REPL, Lua REPL, Bash on Linux
# Location:
# $INPUTRC
# export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
# Linking:
# ln -sf $DOTFILES/common/inputrc $INPUTRC
# Use `man readline` to see all the options
# Reference: https://wiki.archlinux.org/title/Readline
# Colemak Key Remaps
set editing-mode vi
set mark-directories on
set completion-ignore-case on
# show all completions on a double tab without ringing the bell
set show-all-if-ambiguous on
# do not bell on tab-completion
set bell-style none
# 34 - blue, 32 - green
set show-mode-in-prompt on
set vi-cmd-mode-string \1\e[1;34m\2N\1\e[0m\2
set vi-ins-mode-string \1\e[1;32m\2I\1\e[0m\2
set emacs-mode-string \1\e[1;32m\2@\1\e[0m\2
$if mode=vi
set keymap vi-command
"n": next-history
"e": previous-history
"l": vi-insertion-mode
"L": vi-insert-beg
"i": forward-char
"H": vi-first-print
"I": end-of-line
set keymap vi-insert
# Hybrid (Emacs) binds in Vi-Insert
# C-a as ^ instead of 0
"\C-a": vi-first-print
"\C-e": end-of-line
"\C-n": next-history
"\C-p": previous-history
# Bash will parse <C-Backspace> to C-h
"\C-h": unix-word-rubout
$endif
# Color files by types
# Note that this may cause completion text blink in some terminals (e.g. xterm).
set colored-stats On
# Append char to indicate type
set visible-stats On
# Mark symlinked directories
set mark-symlinked-directories On
# Color the common prefix
set colored-completion-prefix On
# Color the common prefix in menu-complete
set menu-complete-display-prefix On
# This will disable `^C` shown in the prompt when pressing `Ctrl+C`
set echo-control-characters off

60
dot_config/vim/vimrc Normal file
View file

@ -0,0 +1,60 @@
" $XDG_CONFIG_HOME/vim/vimrc
" This is a minimal setup of vimrc
" ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc
" Colemak Keys
" Arrow remap
nnoremap J 5j
nnoremap K 5k
vnoremap H ^
xnoremap H ^
onoremap H ^
vnoremap L $
xnoremap L $
onoremap L $
" Normal minimal setup
noremap Y y$
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set wrap
set scrolloff=3
set hlsearch
set incsearch
set ignorecase
set smartcase
set number
set relativenumber
set laststatus=2
set showcmd
set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [󱑉\ %{strftime('%H:%M:%S')}]
"" XDG Directory Specifications
"" Reference to https://jorenar.com/blog/vim-xdg
"
"if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME."/.cache" | endif
"if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME."/.config" | endif
"if empty($XDG_DATA_HOME) | let $XDG_DATA_HOME = $HOME."/.local/share" | endif
"if empty($XDG_STATE_HOME) | let $XDG_STATE_HOME = $HOME."/.local/state" | endif
"
"set viminfo+=n$XDG_STATE_HOME/vim/viminfo
"set packpath^=$XDG_DATA_HOME/vim
"set packpath+=$XDG_DATA_HOME/vim/after
"set backupdir=$XDG_STATE_HOME/vim/backup
"set directory=$XDG_STATE_HOME/vim/swap
"set undodir=$XDG_STATE_HOME/vim/undo
"set viewdir=$XDG_STATE_HOME/vim/view
"" set shada+=n$XDG_STATE_HOME/vim/shada
" Leader
let mapleader = "\<Space>"
nnoremap <leader><leader> :FZF<CR>
" Misc
syntax on

View file

@ -0,0 +1,407 @@
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds {
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 "n" "Down" { Resize "Increase Down"; }
bind "e" "Up" { Resize "Increase Up"; }
bind "i" "Right" { Resize "Increase Right"; }
bind "H" { Resize "Decrease Left"; }
bind "N" { Resize "Decrease Down"; }
bind "E" { Resize "Decrease Up"; }
bind "I" { Resize "Decrease Right"; }
bind "=" "+" { Resize "Increase"; }
bind "-" { Resize "Decrease"; }
}
pane {
bind "Ctrl p" { SwitchToMode "Normal"; }
bind "h" "Left" { MoveFocus "Left"; }
bind "i" "Right" { MoveFocus "Right"; }
bind "n" "Down" { MoveFocus "Down"; }
bind "e" "Up" { MoveFocus "Up"; }
bind "p" { SwitchFocus; }
bind "c" { NewPane; SwitchToMode "Normal"; }
bind "N" { NewPane "Down"; SwitchToMode "Normal"; }
bind "I" { 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 "r" { SwitchToMode "RenamePane"; PaneNameInput 0;}
}
move {
bind "Ctrl h" { SwitchToMode "Normal"; }
bind "h" "Left" { MovePane "Left"; }
bind "n" "Down" { MovePane "Down"; }
bind "e" "Up" { MovePane "Up"; }
bind "i" "Right" { MovePane "Right"; }
}
tab {
bind "Ctrl t" { SwitchToMode "Normal"; }
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
bind "h" "Left" "Up" "e" { GoToPreviousTab; }
bind "i" "Right" "Down" "n" { GoToNextTab; }
bind "c" { 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 "Ctrl s" { SwitchToMode "Normal"; }
bind "r" { EditScrollback; SwitchToMode "Normal"; }
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "n" "Down" { ScrollDown; }
bind "e" "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 "n" "Down" { ScrollDown; }
bind "e" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "k" { Search "down"; }
bind "K" { 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; }
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"
}
}
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 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 "Ctrl 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 "Ctrl o" { SwitchToMode "Session"; }
}
shared_except "tab" "locked" {
bind "Ctrl t" { SwitchToMode "Tab"; }
}
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 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"
}
// 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 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 "default"
// 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