├── .gitignore ├── files ├── helix │ └── .config │ │ └── helix │ │ ├── languages.toml │ │ ├── config.toml │ │ └── themes │ │ └── everforest_light_modded.toml ├── environment │ └── .config │ │ └── environment.d │ │ └── envvars.conf ├── git │ └── .gitconfig ├── shell │ ├── .bashrc │ └── .shellrc.alias ├── kitty │ └── .config │ │ └── kitty │ │ ├── current-theme.conf │ │ └── kitty.conf ├── tmux │ └── .tmux.conf └── vim │ └── .vimrc ├── stow.sh └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | runtime/ 2 | files/helix/.config/helix/runtime 3 | kitty.conf.bak 4 | -------------------------------------------------------------------------------- /files/helix/.config/helix/languages.toml: -------------------------------------------------------------------------------- 1 | [[language]] 2 | name = "bibtex" 3 | auto-format = false 4 | 5 | [[language]] 6 | name = "c" 7 | indent = { tab-width = 8, unit = " " } 8 | 9 | [[language]] 10 | name = "cpp" 11 | indent = { tab-width = 8, unit = " " } 12 | -------------------------------------------------------------------------------- /files/environment/.config/environment.d/envvars.conf: -------------------------------------------------------------------------------- 1 | PATH=$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.local/bin:$HOME/.cabal/bin:$PATH 2 | EDITOR=hx 3 | VISUAL=hx 4 | _JAVA_AWT_WM_NONREPARENTING=1 5 | SSH_AUTH_SOCK=/run/user/1000/keyring/ssh 6 | 7 | # support jp input in gnome 8 | GTK_IM_MODULE=ibus 9 | QT_IM_MODULE=ibus 10 | XMODIFIERS=@im=ibus 11 | SDL_IM_MODULE=ibus 12 | GLFW_IM_MODULE=ibus 13 | -------------------------------------------------------------------------------- /stow.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Utility script to stow or un-stow configuration 4 | 5 | set -e 6 | 7 | for i in "$1" 8 | do 9 | case $i in 10 | -s|--stow) 11 | echo "Stowing configuration for $2" 12 | stow -v -d files -t $HOME $2 13 | ;; 14 | -u|--unstow) 15 | echo "Deleting configuration for $2" 16 | stow -D -v -d files -t $HOME $2 17 | ;; 18 | *) 19 | echo "Use $0 --stow to deploy configuration" 20 | echo "Use $0 --unstow to remove configuration" 21 | exit -1 22 | ;; 23 | esac 24 | done 25 | -------------------------------------------------------------------------------- /files/git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Marco Thomas 3 | email = git@marcothms.de 4 | [includeIf "gitdir:~/dev/lrz-gitlab/**"] 5 | path = "~/dev/lrz-gitlab/.gitconfig" 6 | [alias] 7 | a = add 8 | aa = add . 9 | bl = blame 10 | c = commit -v 11 | ca = commit -v --amend 12 | co = checkout 13 | cp = cherry-pick 14 | d = diff 15 | nuke = clean -df 16 | lg = log --oneline --decorate --graph 17 | pl = pull --rebase 18 | ps = push 19 | sh = show 20 | st = status -s 21 | wt = worktree 22 | [blame] 23 | date = relative 24 | [grep] 25 | lineNumber = true 26 | [init] 27 | defaultBranch = main 28 | -------------------------------------------------------------------------------- /files/helix/.config/helix/config.toml: -------------------------------------------------------------------------------- 1 | theme = "everforest_light_modded" 2 | 3 | [editor] 4 | line-number = "relative" 5 | cursor-shape.insert = "bar" 6 | insert-final-newline = false 7 | rulers = [80, 100] 8 | true-color = true 9 | 10 | # Minimum severity to show a diagnostic after the end of a line 11 | end-of-line-diagnostics = "hint" 12 | 13 | [editor.whitespace.render] 14 | tab = "all" 15 | space = "all" 16 | 17 | [editor.indent-guides] 18 | render = true 19 | 20 | [editor.lsp] 21 | display-inlay-hints = true 22 | 23 | [editor.inline-diagnostics] 24 | # Minimum severity to show a diagnostic on the primary cursor's line. 25 | cursor-line = "error" 26 | 27 | [keys.normal] 28 | "_" = ["extend_line_up", "extend_to_line_bounds"] 29 | "+" = ["extend_line_down", "extend_to_line_bounds"] 30 | 31 | [keys.normal.g] 32 | "b" = ":echo git show %sh{git blame -L %{cursor_line},+1 %{buffer_name} | awk '{print $1}'}" 33 | -------------------------------------------------------------------------------- /files/shell/.bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc 2 | # 3 | # M. Thomas 4 | 5 | # if not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return ;; 9 | esac 10 | 11 | # ============================== Prompt 12 | git_branch() { 13 | if $(git rev-parse --git-dir > /dev/null 2>&1); then 14 | local branch_name=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') 15 | echo "${branch_name} " 16 | fi 17 | } 18 | 19 | nix_env() { 20 | if $(echo $PATH | grep "/nix/store" > /dev/null 2>&1); then 21 | echo "(nix)" 22 | fi 23 | } 24 | 25 | HOST="\[\033[0;33m\]\h\[\033[m\]" 26 | GIT_NIX="\[\033[0;31m\]\$(git_branch)\$(nix_env)\[\033[m\]" 27 | DIR="\[\033[0;34m\]\w\[\033[m\]" 28 | NEWLINE=$'\n' 29 | 30 | PROMPT_COMMAND=__prompt_command 31 | __prompt_command() { 32 | local EXIT="$?" 33 | 34 | # Shorten $PWD, if it's too long 35 | if [ $COLUMNS -lt 80 ]; then 36 | export PROMPT_DIRTRIM=1 37 | else 38 | export PROMPT_DIRTRIM=0 39 | fi 40 | 41 | export PS1="${HOST} ${DIR} ${GIT_NIX}${NEWLINE}" 42 | 43 | if [ $EXIT != 0 ] 44 | then 45 | PS1+='\[\033[0;31m\]$\[\033[00m\] ' 46 | else 47 | PS1+='\[\033[0;32m\]$\[\033[00m\] ' 48 | fi 49 | } 50 | 51 | # ============================== Auto Complete 52 | 53 | # Press Tab to auto complete like zsh 54 | bind 'set show-all-if-ambiguous on' 55 | bind 'TAB:menu-complete' 56 | bind '"\e[Z":menu-complete-backward' 57 | 58 | # Auto complete ssh hosts 59 | _ssh() 60 | { 61 | local cur prev opts 62 | COMPREPLY=() 63 | cur="${COMP_WORDS[COMP_CWORD]}" 64 | prev="${COMP_WORDS[COMP_CWORD-1]}" 65 | opts=$(grep '^Host' ~/.ssh/config ~/.ssh/config.d/* 2>/dev/null | grep -v '[?*]' | cut -d ' ' -f 2-) 66 | 67 | COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) 68 | return 0 69 | } 70 | complete -F _ssh ssh 71 | complete -F _ssh s 72 | 73 | # ============================== Jump Words 74 | stty -ixon # enable forward search with C-s 75 | bind '"\en": forward-word' 76 | bind '"\ep": backward-word' 77 | 78 | # ============================== Source other definitions 79 | [ -f ~/.shellrc.alias ] && source ~/.shellrc.alias 80 | [ -f ~/.shellrc.local ] && source ~/.shellrc.local 81 | -------------------------------------------------------------------------------- /files/kitty/.config/kitty/current-theme.conf: -------------------------------------------------------------------------------- 1 | # vim:ft=kitty 2 | ## name: Everforest Light Medium 3 | ## author: Sainnhe Park 4 | ## license: MIT 5 | ## upstream: https://github.com/ewal/kitty-everforest/blob/master/themes/everforest_light_medium.conf 6 | ## blurb: A green based color scheme designed to be warm and soft 7 | 8 | foreground #5c6a72 9 | background #fdf6e3 10 | selection_foreground #829181 11 | selection_background #eaedc8 12 | 13 | cursor #5c6a72 14 | cursor_text_color #f4f0d9 15 | 16 | url_color #3a94c5 17 | 18 | active_border_color #8da101 19 | inactive_border_color #bdc3af 20 | bell_border_color #f57d26 21 | visual_bell_color none 22 | 23 | wayland_titlebar_color system 24 | macos_titlebar_color system 25 | 26 | active_tab_background #fdf6e3 27 | active_tab_foreground #5c6a72 28 | inactive_tab_background #fdf6e3 29 | inactive_tab_foreground #939f91 30 | tab_bar_background #fdf6e3 31 | tab_bar_margin_color none 32 | 33 | mark1_foreground #fdf6e3 34 | mark1_background #3a94c5 35 | mark2_foreground #fdf6e3 36 | mark2_background #d3c6aa 37 | mark3_foreground #fdf6e3 38 | mark3_background #df69ba 39 | 40 | #: black 41 | color0 #708089 42 | color8 #829181 43 | 44 | #: red 45 | color1 #f85552 46 | color9 #e66868 47 | 48 | #: green 49 | color2 #8da101 50 | color10 #93b259 51 | 52 | #: yellow 53 | color3 #dfa000 54 | color11 #dfa000 55 | 56 | #: blue 57 | color4 #3a94c5 58 | color12 #3a94c5 59 | 60 | #: magenta 61 | color5 #df69ba 62 | color13 #df69ba 63 | 64 | #: cyan 65 | color6 #35a77c 66 | color14 #35a77c 67 | 68 | #: white 69 | color7 #939f91 70 | color15 #a6b0a0 71 | -------------------------------------------------------------------------------- /files/tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # tmux.conf 2 | # ~ M. Thomas 3 | 4 | ######### Terminal Setup ########## 5 | # set default terminal 6 | set -g default-terminal "tmux-256color" 7 | # enable true color terminal 8 | set -ga terminal-overrides ",*256col*:Tc,alacritty:Tc" 9 | # enable hyperlinks 10 | set -as terminal-features ",*:hyperlinks" 11 | 12 | ######### Keybinds ########## 13 | # new panes (open with current path) 14 | bind-key -n M-v split-window -h -c "#{pane_current_path}" 15 | bind-key -n M-s split-window -v -c "#{pane_current_path}" 16 | 17 | # new windows 18 | bind-key -n M-c new-window -c "#{pane_current_path}" 19 | 20 | # vi-style pane selection 21 | bind-key -n M-h select-pane -L 22 | bind-key -n M-j select-pane -D 23 | bind-key -n M-k select-pane -U 24 | bind-key -n M-l select-pane -R 25 | 26 | # pane zoom 27 | bind-key -n M-f resize-pane -Z 28 | 29 | # window rename 30 | bind-key -n M-, command-prompt -p "Rename window:" "rename-window '%%'" 31 | bind-key -n M-< set automatic-rename on 32 | 33 | # navigate windows 34 | bind-key -n M-1 select-window -t 1 35 | bind-key -n M-2 select-window -t 2 36 | bind-key -n M-3 select-window -t 3 37 | bind-key -n M-4 select-window -t 4 38 | bind-key -n M-5 select-window -t 5 39 | bind-key -n M-6 select-window -t 6 40 | bind-key -n M-7 select-window -t 7 41 | bind-key -n M-8 select-window -t 8 42 | bind-key -n M-9 select-window -t 9 43 | 44 | # swap panes 45 | bind-key -n 'M-J' swap-pane -D 46 | bind-key -n 'M-K' swap-pane -U 47 | 48 | # move panes to and from windows 49 | bind-key -n 'M-t' command-prompt -p "Send pane to:" "join-pane -t :'%%'" 50 | bind-key -n 'M-!' select-layout even-horizontal 51 | bind-key -n 'M-@' select-layout even-vertical 52 | bind-key -n 'M-#' select-layout main-vertical 53 | 54 | set -g main-pane-width 40% 55 | 56 | # resize panes 57 | bind-key -n 'M-Left' resize-pane -L 5 58 | bind-key -n 'M-Right' resize-pane -R 5 59 | bind-key -n 'M-Up' resize-pane -U 5 60 | bind-key -n 'M-Down' resize-pane -D 5 61 | 62 | ########## General ########## 63 | # alias 64 | set -s command-alias[1] respawn='respawn-pane -k' 65 | 66 | # make escape bindings of programs work in tmux 67 | set -s escape-time 5 68 | 69 | # renumber windows, when one gets closed 70 | set-option -g renumber-windows on 71 | 72 | # enable mouse 73 | set-option -g mouse on 74 | 75 | # start pane index at 1 76 | set -g base-index 1 77 | setw -g pane-base-index 1 78 | 79 | # set terminal window title (update every second) 80 | set-option -g status-interval 1 81 | set-option -g set-titles on 82 | set-option -g set-titles-string "#H: #W" 83 | 84 | # Make inactive border a bit less noticeable 85 | set -g pane-border-style fg="#e3ddcc" 86 | 87 | # Status 88 | set -g status-style "bg=default" 89 | set -g status-right "#[fg=yellow]#H @#S #[fg=blue]#{=100:pane_current_path} #[fg=red](#(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)) #[fg=black]" 90 | set -g status-right-length 200 91 | set -g status-left "" 92 | setw -g window-status-format "#I:#W " 93 | setw -g window-status-current-format "#[fg=green]#I:#W*" 94 | 95 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # my dotfiles 2 | 3 | Everything is managed via `stow(1)`: 4 | 5 | ```bash 6 | $ ./stow.sh 7 | Use ./stow.sh --stow to deploy configuration 8 | Use ./stow.sh --unstow to remove configuration 9 | ``` 10 | 11 | ## Quirks 12 | - Install based on Ubuntu Desktop 13 | - Font: [JetBrains Mono](https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/JetBrainsMono.zip) 14 | - Keyboard Layout: EurKey (enable extended in gnome-tweaks) 15 | - Environment Vairables exported using systemd in [envvars.conf](files/environment/.config/environment.d/envvars.conf) 16 | - LibreWolf from flatpak needs devices=all to read yubikeys 17 | - Lenovo Conservation Mode without root 18 | ```bash 19 | %wheel ALL=(ALL) NOPASSWD: /usr/bin/tee /sys/bus/platform/drivers/ideapad_acpi/VPC????\:??/conservation_mode 20 | ``` 21 | - Switch workspaces: `for i in {1..9}; do gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-$i "['$i']";done` 22 | - Don't open pinned apps: `for i in {1..9}; do gsettings set org.gnome.shell.keybindings switch-to-application-$i "[]";done` 23 | - https://github.com/fzwoch/obs-vaapi 24 | - mkv, ffmpeg vaapi av1, ffmpeg aac 25 | - main, auto, vbr, 10.000 - 30.000, 0s 26 | - native res, no canvas scaling 27 | - kdenlive proxy: x264-vaapi-scale 28 | 29 | ## Software 30 | 31 | ### Basics 32 | ``` 33 | sudo apt install \ 34 | kitty tmux \ 35 | git ripgrep fd-find fzf stow 36 | ``` 37 | 38 | ### Extended 39 | 40 | ``` 41 | sudo apt install \ 42 | pympress \ 43 | gnome-tweaks \ 44 | gimp darktable obs-studio kdenlive 45 | ``` 46 | 47 | ``` 48 | flatpak install \ 49 | com.belmoussaoui.Authenticator \ 50 | com.github.tchx84.Flatseal \ 51 | com.mastermindzh.tidal-hifi \ 52 | dev.vencord.Vesktop \ 53 | io.github.ungoogled_software.ungoogled_chromium \ 54 | io.gitlab.librewolf-community \ 55 | org.prismlauncher.PrismLauncher 56 | ``` 57 | 58 | ``` 59 | sudo snap install \ 60 | zotero-snap \ 61 | proton-mail \ 62 | obsidian \ 63 | codium 64 | ``` 65 | 66 | ### Manual 67 | 68 | - [Helix](https://github.com/helix-editor/helix/releases) 69 | - [Signal](https://signal.org/download/linux/) 70 | - Rust: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` 71 | - Nix: 72 | ``` 73 | $ sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --no-daemon 74 | $ mkdir -p ~/.config/nix/ 75 | $ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf 76 | ``` 77 | 78 | ## Extensions 79 | 80 | ### Custom 81 | - blur-my-shell@aunetx (blur panel and background in overview, rest disabled) 82 | - caffeine@patapon.info 83 | - compiz-alike-magic-lamp-effect@hermes83.github.com 84 | - gnome-ui-tune@itstime.tech (desktop thumbnails scale 300%, show search) 85 | - gsconnect@andyholmes.github.io 86 | - ideapad@laurento.frittella 87 | - rounded-window-corners@fxgn (rounded corners of all windows) 88 | - rounded-corners (12px) 89 | - tilingshell@ferrarodomenico.com (4 inner, 0 outer, super+wasd, span all super+f, center super+c, cycle super+tab) 90 | - user-theme@gnome-shell-extensions.gcampax.github.com (legacy apps adw-gtk3, icons papirus) 91 | - quick-settings-audio-panel 92 | - quicksettings-audio-devices-hider (in the main panel) 93 | 94 | ### Pre-installed 95 | - disable desktop icons 96 | - disable tiling-assistant 97 | - dock (bottom, no panel, disable keyshortcuts) 98 | -------------------------------------------------------------------------------- /files/shell/.shellrc.alias: -------------------------------------------------------------------------------- 1 | ### System Utility 2 | alias cdt='mkdir /tmp/$(cat /proc/sys/kernel/random/uuid); cd $_' 3 | alias fixagent='eval $(tmux show-env -s | grep "^SSH_")' 4 | alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash' 5 | 6 | ### zfs (just saved commands) 7 | # zfs send pool/path/to/zvol@snapshot| gzip -c >/mnt/some/location/zvol@20230302.gz 8 | # gzip -dc /mnt/some/location/zvol@20230302.gz | zfs receive pool/path/to/zvol 9 | 10 | ### Always ask first when moving files 11 | alias cp='cp -i' 12 | alias mv='mv -i' 13 | alias rm='rm -i' 14 | 15 | ### fzf 16 | alias c='cd $(fd --type d | fzf --reverse)' 17 | alias blame='git show $(git ls-files | fzf -e --reverse --bind "enter:become(git blame {1} | fzf -e --ansi --reverse | cut -f 1 -d \" \")")' 18 | 19 | # nix 20 | alias nd="nix develop ." 21 | alias ns="nix-shell" 22 | alias nupdate="nix-channel --update" 23 | 24 | # https://github.com/loqusion/typix 25 | alias typix="nix flake init --refresh -t github:loqusion/typix" 26 | alias twatch="nix run .#watch" 27 | alias tbuild="nix run .#build" 28 | alias tlsp="nix-shell -p tinymist" 29 | 30 | alias nlatex="nix-shell -p texlive.combined.scheme-full" 31 | 32 | ### Abbreviations 33 | alias dcr='docker compose down && docker compose up -d && docker compose logs -f' 34 | alias dh1='du . -h -d1' 35 | alias dhs='du . -hs' 36 | alias g='git' 37 | alias ls='ls --color --hyperlink' 38 | alias nssh='SSH_AUTH_SOCK= ssh' 39 | alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE` 40 | t() { 41 | tmux new-session -A -s ${1:-dev} 42 | } 43 | 44 | # password hash (sed needed when using in docker-compose) 45 | pwhash() { 46 | name=$1 47 | if [ -z $name ]; then 48 | echo "Please enter a username." 49 | return 50 | fi 51 | echo $(htpasswd -nB ${name}) | sed -e s/\\$/\\$\\$/g 52 | } 53 | 54 | # ocr 55 | ocr() { 56 | file=$1 57 | if [ -z $file ]; then 58 | echo "Please input a file." 59 | return 60 | fi 61 | name=${file%%.*} 62 | ocrmypdf -l deu+eng --output-type pdf $file ${name}.ocr.pdf 63 | } 64 | 65 | # scale down images and remove exif 66 | downimage() { 67 | filename=$1 68 | convert -resize 720 $filename $filename 69 | exiftool -all= $filename 70 | } 71 | 72 | setgnomebuttons() { 73 | gsettings set org.gnome.desktop.wm.preferences button-layout 'icon:minimize,close' 74 | } 75 | 76 | removegnomebuttons() { 77 | gsettings set org.gnome.desktop.wm.preferences button-layout '' 78 | } 79 | 80 | ### laptop acpi magic 81 | 82 | conservation() { 83 | location='/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode' 84 | if [ -z $1 ]; then 85 | cat $location 86 | elif [ $1 = '0' ] || [ $1 = '1' ]; then 87 | echo $1 | sudo tee $location 88 | else 89 | echo 'Invalid option' 90 | fi 91 | } 92 | 93 | power() { 94 | location='/sys/firmware/acpi/platform_profile' 95 | if [ -z $1 ]; then 96 | echo "Current:" $(cat $location) 97 | echo "Can be one of:" $(cat /sys/firmware/acpi/platform_profile_choices) 98 | elif [ $1 = 'low-power' ] || [ $1 = 'balanced' ] || [ $1 = 'performance' ]; then 99 | echo $1 | sudo tee $location 100 | else 101 | echo 'Invalid option' 102 | fi 103 | } 104 | -------------------------------------------------------------------------------- /files/vim/.vimrc: -------------------------------------------------------------------------------- 1 | " ~/.vimrc 2 | " 3 | " caveats in config start with XXX 4 | " 5 | " ~ M. Thomas 6 | 7 | let mapleader = "\" 8 | 9 | " ============================== vim-plug 10 | let data_dir = '~/.vim' 11 | if empty(glob(data_dir . '/autoload/plug.vim')) 12 | silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 13 | autocmd VimEnter * PlugInstall --sync | source ~/.vimrc 14 | endif 15 | 16 | call plug#begin() 17 | 18 | " essentials 19 | Plug 'jiangmiao/auto-pairs' " pair completion 20 | Plug 'tpope/vim-commentary' " DWIM comments 21 | 22 | " file search 23 | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 24 | Plug 'junegunn/fzf.vim' 25 | 26 | " colors 27 | Plug 'sainnhe/everforest' " color scheme 28 | Plug 'vim-airline/vim-airline' " nicer status line 29 | Plug 'vim-airline/vim-airline-themes' " auto settings theme for airline 30 | 31 | call plug#end() 32 | 33 | " ============================== Colors 34 | syntax on 35 | set background=light 36 | let g:everforest_background = 'medium' 37 | let g:everforest_better_performance = 1 38 | colorscheme everforest 39 | let &t_8f = "\[38;2;%lu;%lu;%lum" 40 | let &t_8b = "\[48;2;%lu;%lu;%lum" 41 | set termguicolors 42 | 43 | " ============================== General 44 | filetype indent plugin on 45 | set number " show line number 46 | set relativenumber " show relative line number 47 | set cursorline " highlight current line 48 | set ruler " show line and row at bottom right 49 | set colorcolumn=80 50 | set nowrap " don't wrap lines 51 | 52 | set showmatch " highlights paranthesis 53 | set hidden " allow moving to a new buffer without saving 54 | set noswapfile " don't create a swap file 55 | set confirm " can't quit without saving 56 | set noshowmode " don't show mode in status 57 | set noshowcmd " don't show command in status 58 | set encoding=utf-8 59 | set mouse=a " a=on, c=off 60 | set undolevels=1337 61 | set backspace=indent,eol,start " always delete with backspace 62 | set wildmenu " autocomplete :e 63 | set scrolloff=5 " minimum lines above or below the cursor 64 | 65 | autocmd FileType c setlocal tabstop=4 shiftwidth=4 noexpandtab 66 | 67 | let g:ctrlp_show_hidden = 1 " show hidden files in ctrlp menus 68 | let g:fzf_preview_window = ['down,50%', 'ctrl-/'] 69 | 70 | let g:LanguageClient_useFloatingHover = 1 " prevent buggy split preview from opening 71 | 72 | " ============================== Statusline 73 | let g:airline_section_x = airline#section#create([]) 74 | let g:airline_section_y = airline#section#create_right(['%{&fileencoding}', '%{&fileformat}', '%{&filetype}']) 75 | let g:airline_section_z = airline#section#create(['%{line(".")}:%{col(".")}']) 76 | 77 | " ============================== Indents and Whitespaces 78 | set list 79 | set listchars=tab:──\ ,extends:›,precedes:‹,nbsp:·,trail:· " show chars for whitespaces 80 | set fillchars+=vert:\ " don't draw verticle split 81 | 82 | " openbsd style 83 | autocmd FileType c setlocal tabstop=8 shiftwidth=4 noexpandtab 84 | 85 | " show trailing whitespaces in red 86 | highlight ExtraWhitespace ctermbg=red guibg=red 87 | match ExtraWhitespace /\s\+\%#\@ unless capitol letters 93 | set hlsearch " highlight all results 94 | set mat=5 95 | 96 | " ============================== Cursor Thiccness 97 | let &t_SI = "\[6 q" 98 | let &t_SR = "\[4 q" 99 | let &t_EI = "\[2 q" 100 | 101 | " ============================== Macros and Mappings 102 | 103 | map f :GFiles 104 | map F :Files 105 | map b :Buffers 106 | 107 | command! -bang -nargs=* GGrep 108 | \ call fzf#vim#grep( 109 | \ 'git grep --line-number -- '.shellescape(), 0, 110 | \ fzf#vim#with_preview(), 0) 111 | if has("linux") 112 | map :GGrep 113 | else " openbsd 114 | map :GGrep 115 | endif 116 | 117 | " kill whitespaces fast and efficient 118 | fun! TrimWhitespace() 119 | let l:save = winsaveview() 120 | keeppatterns %s/\s\+$//e 121 | call winrestview(l:save) 122 | endfun 123 | noremap ws :call TrimWhitespace() 124 | 125 | " comment DWIM 126 | map :Commentary 127 | 128 | " clear search highlighting faster 129 | map :noh 130 | -------------------------------------------------------------------------------- /files/helix/.config/helix/themes/everforest_light_modded.toml: -------------------------------------------------------------------------------- 1 | # Everforest (Light Medium) 2 | # Authors: CptPotato, WindSoilder, basbebe 3 | 4 | # Original Author: 5 | # URL: https://github.com/sainnhe/everforest 6 | # Filename: colors/everforest.vim 7 | # Author: sainnhe 8 | # Email: sainnhe@gmail.com 9 | # License: MIT License 10 | 11 | "type" = "yellow" 12 | "constant" = "fg" 13 | "constant.builtin" = { fg = "purple", modifiers = ["italic"] } 14 | "constant.builtin.boolean" = "purple" 15 | "constant.numeric" = "purple" 16 | "constant.character.escape" = "green" 17 | "string" = "aqua" 18 | "string.regexp" = "green" 19 | "string.special" = "yellow" 20 | "comment" = { fg = "grey1", modifiers = ["italic"] } 21 | "variable" = "fg" 22 | "variable.builtin" = { fg = "purple", modifiers = ["italic"] } 23 | "variable.parameter" = "fg" 24 | "variable.other.member" = "blue" 25 | "label" = "orange" 26 | "punctuation" = "grey2" 27 | "punctuation.delimiter" = "grey1" 28 | "punctuation.bracket" = "fg" 29 | "punctuation.special" = "blue" 30 | "keyword" = "red" 31 | "keyword.operator" = "orange" 32 | "keyword.directive" = "purple" 33 | "keyword.storage" = "red" 34 | "operator" = "orange" 35 | "function" = "green" 36 | "function.macro" = "green" 37 | "tag" = "orange" 38 | "namespace" = { fg = "yellow", modifiers = ["italic"] } 39 | "attribute" = { fg = "purple", modifiers = ["italic"] } 40 | "constructor" = "green" 41 | "module" = "yellow" 42 | "special" = "blue" 43 | 44 | "markup.heading.marker" = "grey1" 45 | "markup.heading.1" = { fg = "red", modifiers = ["bold"] } 46 | "markup.heading.2" = { fg = "orange", modifiers = ["bold"] } 47 | "markup.heading.3" = { fg = "yellow", modifiers = ["bold"] } 48 | "markup.heading.4" = { fg = "green", modifiers = ["bold"] } 49 | "markup.heading.5" = { fg = "blue", modifiers = ["bold"] } 50 | "markup.heading.6" = { fg = "purple", modifiers = ["bold"] } 51 | "markup.list" = "red" 52 | "markup.bold" = { modifiers = ["bold"] } 53 | "markup.italic" = { modifiers = ["italic"] } 54 | "markup.strikethrough" = { modifiers = ["crossed_out"] } 55 | "markup.link.url" = { fg = "blue", underline = { style = "line" } } 56 | "markup.link.label" = "orange" 57 | "markup.link.text" = "purple" 58 | "markup.quote" = "grey1" 59 | "markup.raw.inline" = "green" 60 | "markup.raw.block" = "aqua" 61 | 62 | "diff.plus" = "green" 63 | "diff.delta" = "blue" 64 | "diff.minus" = "red" 65 | 66 | "ui.background" = { bg = "bg0" } 67 | "ui.background.separator" = "grey0" 68 | "ui.cursor" = { fg = "bg1", bg = "grey2" } 69 | "ui.cursor.insert" = { fg = "bg0", bg = "grey1" } 70 | "ui.cursor.select" = { fg = "bg0", bg = "blue" } 71 | "ui.cursor.match" = { bg = "bg4", modifiers = ["bold"] } 72 | "ui.cursor.primary" = { fg = "bg0", bg = "fg" } 73 | "ui.cursorline.primary" = { bg = "bg1" } 74 | "ui.cursorline.secondary" = { bg = "bg2" } 75 | "ui.selection" = { bg = "bg3" } 76 | "ui.linenr" = "grey0" 77 | "ui.linenr.selected" = "grey2" 78 | "ui.statusline" = { fg = "grey2", bg = "bg3" } 79 | "ui.statusline.inactive" = { fg = "grey0", bg = "bg1" } 80 | "ui.statusline.normal" = { fg = "bg0", bg = "statusline1", modifiers = [ 81 | "bold", 82 | ] } 83 | "ui.statusline.insert" = { fg = "bg0", bg = "statusline2", modifiers = [ 84 | "bold", 85 | ] } 86 | "ui.statusline.select" = { fg = "bg0", bg = "blue", modifiers = ["bold"] } 87 | "ui.bufferline" = { fg = "grey2", bg = "bg3" } 88 | "ui.bufferline.active" = { fg = "bg0", bg = "statusline1", modifiers = [ 89 | "bold", 90 | ] } 91 | "ui.popup" = { fg = "grey2", bg = "bg2" } 92 | "ui.picker.header" = { modifiers = ["bold", "underlined"] } 93 | "ui.window" = { fg = "bg4" } 94 | "ui.help" = { fg = "fg", bg = "bg2" } 95 | "ui.text" = "fg" 96 | "ui.text.directory" = { fg = "green" } 97 | "ui.text.focus" = "fg" 98 | "ui.menu" = { fg = "fg", bg = "bg3" } 99 | "ui.menu.selected" = { fg = "bg0", bg = "green" } 100 | "ui.virtual.ruler" = { bg = "bg1" } 101 | "ui.virtual.jump-label" = { modifiers = ["reversed"] } 102 | "ui.virtual.whitespace" = { fg = "bg4" } 103 | "ui.virtual.indent-guide" = { fg = "bg4" } 104 | "ui.virtual.inlay-hint" = { fg = "grey0" } 105 | "ui.virtual.wrap" = { fg = "grey0" } 106 | 107 | "hint" = "green" 108 | "info" = "blue" 109 | "warning" = "yellow" 110 | "error" = "red" 111 | 112 | "diagnostic.hint" = { underline = { color = "green", style = "curl" } } 113 | "diagnostic.info" = { underline = { color = "blue", style = "curl" } } 114 | "diagnostic.warning" = { underline = { color = "yellow", style = "curl" } } 115 | "diagnostic.error" = { underline = { color = "red", style = "curl" } } 116 | "diagnostic.unnecessary" = { modifiers = ["dim"] } 117 | "diagnostic.deprecated" = { modifiers = ["crossed_out"] } 118 | 119 | [palette] 120 | 121 | bg_dim = "#efebd4" 122 | bg0 = "#fdf6e3" 123 | bg1 = "#f4f0d9" 124 | bg2 = "#efebd4" 125 | bg3 = "#e6e2cc" 126 | bg4 = "#e0dcc7" 127 | bg5 = "#bdc3af" 128 | bg_red = "#fbe3da" 129 | bg_visual = "#eaedc8" 130 | bg_yellow = "#faedcd" 131 | bg_green = "#f0f1d2" 132 | bg_blue = "#e9f0e9" 133 | 134 | fg = "#5c6a72" 135 | red = "#f85552" 136 | orange = "#f57d26" 137 | yellow = "#dfa000" 138 | green = "#8da101" 139 | blue = "#3a94c5" 140 | aqua = "#35a77c" 141 | purple = "#df69ba" 142 | 143 | grey0 = "#a6b0a0" 144 | grey1 = "#939f91" 145 | grey2 = "#829181" 146 | statusline1 = "#93b259" 147 | statusline2 = "#708089" 148 | statusline3 = "#e66868" 149 | -------------------------------------------------------------------------------- /files/kitty/.config/kitty/kitty.conf: -------------------------------------------------------------------------------- 1 | # vim:fileencoding=utf-8:foldmethod=marker 2 | 3 | #: Fonts {{{ 4 | 5 | #: kitty has very powerful font management. You can configure 6 | #: individual font faces and even specify special fonts for particular 7 | #: characters. 8 | 9 | # kitty +list-fonts 10 | font_family JetBrainsMono NFM 11 | bold_font JetBrainsMono NFM Bold 12 | italic_font JetBrainsMono NFM Italic 13 | bold_italic_font JetBrainsMono NFM Bold Italic 14 | 15 | font_size 10 16 | 17 | #: Font size (in pts) 18 | 19 | # force_ltr no 20 | 21 | #: kitty does not support BIDI (bidirectional text), however, for RTL 22 | #: scripts, words are automatically displayed in RTL. That is to say, 23 | #: in an RTL script, the words "HELLO WORLD" display in kitty as 24 | #: "WORLD HELLO", and if you try to select a substring of an RTL- 25 | #: shaped string, you will get the character that would be there had 26 | #: the the string been LTR. For example, assuming the Hebrew word 27 | #: ירושלים, selecting the character that on the screen appears to be ם 28 | #: actually writes into the selection buffer the character י. kitty's 29 | #: default behavior is useful in conjunction with a filter to reverse 30 | #: the word order, however, if you wish to manipulate RTL glyphs, it 31 | #: can be very challenging to work with, so this option is provided to 32 | #: turn it off. Furthermore, this option can be used with the command 33 | #: line program GNU FriBidi 34 | #: to get BIDI 35 | #: support, because it will force kitty to always treat the text as 36 | #: LTR, which FriBidi expects for terminals. 37 | 38 | # symbol_map 39 | 40 | #: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols 41 | 42 | #: Map the specified Unicode codepoints to a particular font. Useful 43 | #: if you need special rendering for some symbols, such as for 44 | #: Powerline. Avoids the need for patched fonts. Each Unicode code 45 | #: point is specified in the form `U+`. You 46 | #: can specify multiple code points, separated by commas and ranges 47 | #: separated by hyphens. This option can be specified multiple times. 48 | #: The syntax is:: 49 | 50 | #: symbol_map codepoints Font Family Name 51 | 52 | # narrow_symbols 53 | 54 | #: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 55 | 56 | #: Usually, for Private Use Unicode characters and some symbol/dingbat 57 | #: characters, if the character is followed by one or more spaces, 58 | #: kitty will use those extra cells to render the character larger, if 59 | #: the character in the font has a wide aspect ratio. Using this 60 | #: option you can force kitty to restrict the specified code points to 61 | #: render in the specified number of cells (defaulting to one cell). 62 | #: This option can be specified multiple times. The syntax is:: 63 | 64 | #: narrow_symbols codepoints [optionally the number of cells] 65 | 66 | disable_ligatures cursor 67 | 68 | #: Choose how you want to handle multi-character ligatures. The 69 | #: default is to always render them. You can tell kitty to not render 70 | #: them when the cursor is over them by using cursor to make editing 71 | #: easier, or have kitty never render them at all by using always, if 72 | #: you don't like them. The ligature strategy can be set per-window 73 | #: either using the kitty remote control facility or by defining 74 | #: shortcuts for it in kitty.conf, for example:: 75 | 76 | #: map alt+1 disable_ligatures_in active always 77 | #: map alt+2 disable_ligatures_in all never 78 | #: map alt+3 disable_ligatures_in tab cursor 79 | 80 | #: Note that this refers to programming ligatures, typically 81 | #: implemented using the calt OpenType feature. For disabling general 82 | #: ligatures, use the font_features option. 83 | 84 | font_features +calt +liga 85 | 86 | #: E.g. font_features none 87 | 88 | #: Choose exactly which OpenType features to enable or disable. This 89 | #: is useful as some fonts might have features worthwhile in a 90 | #: terminal. For example, Fira Code includes a discretionary feature, 91 | #: zero, which in that font changes the appearance of the zero (0), to 92 | #: make it more easily distinguishable from Ø. Fira Code also includes 93 | #: other discretionary features known as Stylistic Sets which have the 94 | #: tags ss01 through ss20. 95 | 96 | #: For the exact syntax to use for individual features, see the 97 | #: HarfBuzz documentation . 99 | 100 | #: Note that this code is indexed by PostScript name, and not the font 101 | #: family. This allows you to define very precise feature settings; 102 | #: e.g. you can disable a feature in the italic font but not in the 103 | #: regular font. 104 | 105 | #: On Linux, font features are first read from the FontConfig database 106 | #: and then this option is applied, so they can be configured in a 107 | #: single, central place. 108 | 109 | #: To get the PostScript name for a font, use `kitty +list-fonts 110 | #: --psnames`: 111 | 112 | #: .. code-block:: sh 113 | 114 | #: $ kitty +list-fonts --psnames | grep Fira 115 | #: Fira Code 116 | #: Fira Code Bold (FiraCode-Bold) 117 | #: Fira Code Light (FiraCode-Light) 118 | #: Fira Code Medium (FiraCode-Medium) 119 | #: Fira Code Regular (FiraCode-Regular) 120 | #: Fira Code Retina (FiraCode-Retina) 121 | 122 | #: The part in brackets is the PostScript name. 123 | 124 | #: Enable alternate zero and oldstyle numerals:: 125 | 126 | #: font_features FiraCode-Retina +zero +onum 127 | 128 | #: Enable only alternate zero in the bold font:: 129 | 130 | #: font_features FiraCode-Bold +zero 131 | 132 | #: Disable the normal ligatures, but keep the calt feature which (in 133 | #: this font) breaks up monotony:: 134 | 135 | #: font_features TT2020StyleB-Regular -liga +calt 136 | 137 | #: In conjunction with force_ltr, you may want to disable Arabic 138 | #: shaping entirely, and only look at their isolated forms if they 139 | #: show up in a document. You can do this with e.g.:: 140 | 141 | #: font_features UnifontMedium +isol -medi -fina -init 142 | 143 | # modify_font 144 | 145 | #: Modify font characteristics such as the position or thickness of 146 | #: the underline and strikethrough. The modifications can have the 147 | #: suffix px for pixels or % for percentage of original value. No 148 | #: suffix means use pts. For example:: 149 | 150 | #: modify_font underline_position -2 151 | #: modify_font underline_thickness 150% 152 | #: modify_font strikethrough_position 2px 153 | 154 | #: Additionally, you can modify the size of the cell in which each 155 | #: font glyph is rendered and the baseline at which the glyph is 156 | #: placed in the cell. For example:: 157 | 158 | #: modify_font cell_width 80% 159 | #: modify_font cell_height -2px 160 | #: modify_font baseline 3 161 | 162 | #: Note that modifying the baseline will automatically adjust the 163 | #: underline and strikethrough positions by the same amount. 164 | #: Increasing the baseline raises glyphs inside the cell and 165 | #: decreasing it lowers them. Decreasing the cell size might cause 166 | #: rendering artifacts, so use with care. 167 | 168 | # box_drawing_scale 0.001, 1, 1.5, 2 169 | 170 | #: The sizes of the lines used for the box drawing Unicode characters. 171 | #: These values are in pts. They will be scaled by the monitor DPI to 172 | #: arrive at a pixel value. There must be four values corresponding to 173 | #: thin, normal, thick, and very thick lines. 174 | 175 | # undercurl_style thin-sparse 176 | 177 | #: The style with which undercurls are rendered. This option takes the 178 | #: form (thin|thick)-(sparse|dense). Thin and thick control the 179 | #: thickness of the undercurl. Sparse and dense control how often the 180 | #: curl oscillates. With sparse the curl will peak once per character, 181 | #: with dense twice. 182 | 183 | # text_composition_strategy 3 184 | 185 | #: Control how kitty composites text glyphs onto the background color. 186 | #: The default value of platform tries for text rendering as close to 187 | #: "native" for the platform kitty is running on as possible. 188 | 189 | #: A value of legacy uses the old (pre kitty 0.28) strategy for how 190 | #: glyphs are composited. This will make dark text on light 191 | #: backgrounds look thicker and light text on dark backgrounds 192 | #: thinner. It might also make some text appear like the strokes are 193 | #: uneven. 194 | 195 | #: You can fine tune the actual contrast curve used for glyph 196 | #: composition by specifying up to two space-separated numbers for 197 | #: this setting. 198 | 199 | #: The first number is the gamma adjustment, which controls the 200 | #: thickness of dark text on light backgrounds. Increasing the value 201 | #: will make text appear thicker. The default value for this is 1.0 on 202 | #: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result 203 | #: is scaled based on the luminance difference between the background 204 | #: and the foreground. Dark text on light backgrounds receives the 205 | #: full impact of the curve while light text on dark backgrounds is 206 | #: affected very little. 207 | 208 | #: The second number is an additional multiplicative contrast. It is 209 | #: percentage ranging from 0 to 100. The default value is 0 on Linux 210 | #: and 30 on macOS. 211 | 212 | #: If you wish to achieve similar looking thickness in light and dark 213 | #: themes, a good way to experiment is start by setting the value to 214 | #: 1.0 0 and use a dark theme. Then adjust the second parameter until 215 | #: it looks good. Then switch to a light theme and adjust the first 216 | #: parameter until the perceived thickness matches the dark theme. 217 | 218 | # text_fg_override_threshold 0 219 | 220 | #: The minimum accepted difference in luminance between the foreground 221 | #: and background color, below which kitty will override the 222 | #: foreground color. It is percentage ranging from 0 to 100. If the 223 | #: difference in luminance of the foreground and background is below 224 | #: this threshold, the foreground color will be set to white if the 225 | #: background is dark or black if the background is light. The default 226 | #: value is 0, which means no overriding is performed. Useful when 227 | #: working with applications that use colors that do not contrast well 228 | #: with your preferred color scheme. 229 | 230 | #: }}} 231 | 232 | #: Cursor customization {{{ 233 | 234 | # cursor #cccccc 235 | 236 | #: Default cursor color. If set to the special value none the cursor 237 | #: will be rendered with a "reverse video" effect. It's color will be 238 | #: the color of the text in the cell it is over and the text will be 239 | #: rendered with the background color of the cell. Note that if the 240 | #: program running in the terminal sets a cursor color, this takes 241 | #: precedence. Also, the cursor colors are modified if the cell 242 | #: background and foreground colors have very low contrast. 243 | 244 | # cursor_text_color #111111 245 | 246 | #: The color of text under the cursor. If you want it rendered with 247 | #: the background color of the cell underneath instead, use the 248 | #: special keyword: background. Note that if cursor is set to none 249 | #: then this option is ignored. 250 | 251 | # cursor_shape block 252 | 253 | #: The cursor shape can be one of block, beam, underline. Note that 254 | #: when reloading the config this will be changed only if the cursor 255 | #: shape has not been set by the program running in the terminal. This 256 | #: sets the default cursor shape, applications running in the terminal 257 | #: can override it. In particular, shell integration 258 | #: in kitty sets 259 | #: the cursor shape to beam at shell prompts. You can avoid this by 260 | #: setting shell_integration to no-cursor. 261 | 262 | # cursor_beam_thickness 1.5 263 | 264 | #: The thickness of the beam cursor (in pts). 265 | 266 | # cursor_underline_thickness 2.0 267 | 268 | #: The thickness of the underline cursor (in pts). 269 | 270 | cursor_blink_interval 0 271 | 272 | #: The interval to blink the cursor (in seconds). Set to zero to 273 | #: disable blinking. Negative values mean use system default. Note 274 | #: that the minimum interval will be limited to repaint_delay. 275 | 276 | # cursor_stop_blinking_after 15.0 277 | 278 | #: Stop blinking cursor after the specified number of seconds of 279 | #: keyboard inactivity. Set to zero to never stop blinking. 280 | 281 | #: }}} 282 | 283 | #: Scrollback {{{ 284 | 285 | # scrollback_lines 2000 286 | 287 | #: Number of lines of history to keep in memory for scrolling back. 288 | #: Memory is allocated on demand. Negative numbers are (effectively) 289 | #: infinite scrollback. Note that using very large scrollback is not 290 | #: recommended as it can slow down performance of the terminal and 291 | #: also use large amounts of RAM. Instead, consider using 292 | #: scrollback_pager_history_size. Note that on config reload if this 293 | #: is changed it will only affect newly created windows, not existing 294 | #: ones. 295 | 296 | # scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER 297 | 298 | #: Program with which to view scrollback in a new window. The 299 | #: scrollback buffer is passed as STDIN to this program. If you change 300 | #: it, make sure the program you use can handle ANSI escape sequences 301 | #: for colors and text formatting. INPUT_LINE_NUMBER in the command 302 | #: line above will be replaced by an integer representing which line 303 | #: should be at the top of the screen. Similarly CURSOR_LINE and 304 | #: CURSOR_COLUMN will be replaced by the current cursor position or 305 | #: set to 0 if there is no cursor, for example, when showing the last 306 | #: command output. 307 | 308 | # scrollback_pager_history_size 0 309 | 310 | #: Separate scrollback history size (in MB), used only for browsing 311 | #: the scrollback buffer with pager. This separate buffer is not 312 | #: available for interactive scrolling but will be piped to the pager 313 | #: program when viewing scrollback buffer in a separate window. The 314 | #: current implementation stores the data in UTF-8, so approximately 315 | #: 10000 lines per megabyte at 100 chars per line, for pure ASCII, 316 | #: unformatted text. A value of zero or less disables this feature. 317 | #: The maximum allowed size is 4GB. Note that on config reload if this 318 | #: is changed it will only affect newly created windows, not existing 319 | #: ones. 320 | 321 | # scrollback_fill_enlarged_window no 322 | 323 | #: Fill new space with lines from the scrollback buffer after 324 | #: enlarging a window. 325 | 326 | # wheel_scroll_multiplier 5.0 327 | 328 | #: Multiplier for the number of lines scrolled by the mouse wheel. 329 | #: Note that this is only used for low precision scrolling devices, 330 | #: not for high precision scrolling devices on platforms such as macOS 331 | #: and Wayland. Use negative numbers to change scroll direction. See 332 | #: also wheel_scroll_min_lines. 333 | 334 | # wheel_scroll_min_lines 1 335 | 336 | #: The minimum number of lines scrolled by the mouse wheel. The scroll 337 | #: multiplier wheel_scroll_multiplier only takes effect after it 338 | #: reaches this number. Note that this is only used for low precision 339 | #: scrolling devices like wheel mice that scroll by very small amounts 340 | #: when using the wheel. With a negative number, the minimum number of 341 | #: lines will always be added. 342 | 343 | # touch_scroll_multiplier 1.0 344 | 345 | #: Multiplier for the number of lines scrolled by a touchpad. Note 346 | #: that this is only used for high precision scrolling devices on 347 | #: platforms such as macOS and Wayland. Use negative numbers to change 348 | #: scroll direction. 349 | 350 | #: }}} 351 | 352 | #: Mouse {{{ 353 | 354 | # mouse_hide_wait 3.0 355 | 356 | #: Hide mouse cursor after the specified number of seconds of the 357 | #: mouse not being used. Set to zero to disable mouse cursor hiding. 358 | #: Set to a negative value to hide the mouse cursor immediately when 359 | #: typing text. Disabled by default on macOS as getting it to work 360 | #: robustly with the ever-changing sea of bugs that is Cocoa is too 361 | #: much effort. 362 | 363 | # url_color #0087bd 364 | # url_style curly 365 | 366 | #: The color and style for highlighting URLs on mouse-over. url_style 367 | #: can be one of: none, straight, double, curly, dotted, dashed. 368 | 369 | # open_url_with default 370 | 371 | #: The program to open clicked URLs. The special value default with 372 | #: first look for any URL handlers defined via the open_actions 373 | #: facility and if non 374 | #: are found, it will use the Operating System's default URL handler 375 | #: (open on macOS and xdg-open on Linux). 376 | 377 | # url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh 378 | 379 | #: The set of URL prefixes to look for when detecting a URL under the 380 | #: mouse cursor. 381 | 382 | # detect_urls yes 383 | 384 | #: Detect URLs under the mouse. Detected URLs are highlighted with an 385 | #: underline and the mouse cursor becomes a hand over them. Even if 386 | #: this option is disabled, URLs are still clickable. 387 | 388 | # url_excluded_characters 389 | 390 | #: Additional characters to be disallowed from URLs, when detecting 391 | #: URLs under the mouse cursor. By default, all characters that are 392 | #: legal in URLs are allowed. Additionally, newlines are allowed (but 393 | #: stripped). This is to accommodate programs such as mutt that add 394 | #: hard line breaks even for continued lines. \n can be added to this 395 | #: option to disable this behavior. Special characters can be 396 | #: specified using backslash escapes, to specify a backslash use a 397 | #: double backslash. 398 | 399 | # show_hyperlink_targets no 400 | 401 | #: When the mouse hovers over a terminal hyperlink, show the actual 402 | #: URL that will be activated when the hyperlink is clicked. 403 | 404 | # copy_on_select no 405 | 406 | #: Copy to clipboard or a private buffer on select. With this set to 407 | #: clipboard, selecting text with the mouse will cause the text to be 408 | #: copied to clipboard. Useful on platforms such as macOS that do not 409 | #: have the concept of primary selection. You can instead specify a 410 | #: name such as a1 to copy to a private kitty buffer. Map a shortcut 411 | #: with the paste_from_buffer action to paste from this private 412 | #: buffer. For example:: 413 | 414 | #: copy_on_select a1 415 | #: map shift+cmd+v paste_from_buffer a1 416 | 417 | #: Note that copying to the clipboard is a security risk, as all 418 | #: programs, including websites open in your browser can read the 419 | #: contents of the system clipboard. 420 | 421 | # paste_actions quote-urls-at-prompt 422 | 423 | #: A comma separated list of actions to take when pasting text into 424 | #: the terminal. The supported paste actions are: 425 | 426 | #: quote-urls-at-prompt: 427 | #: If the text being pasted is a URL and the cursor is at a shell prompt, 428 | #: automatically quote the URL (needs shell_integration). 429 | #: confirm: 430 | #: Confirm the paste if bracketed paste mode is not active or there is 431 | #: a large amount of text being pasted. 432 | #: filter: 433 | #: Run the filter_paste() function from the file paste-actions.py in 434 | #: the kitty config directory on the pasted text. The text returned by the 435 | #: function will be actually pasted. 436 | 437 | # strip_trailing_spaces never 438 | 439 | #: Remove spaces at the end of lines when copying to clipboard. A 440 | #: value of smart will do it when using normal selections, but not 441 | #: rectangle selections. A value of always will always do it. 442 | 443 | # select_by_word_characters @-./_~?&=%+# 444 | 445 | #: Characters considered part of a word when double clicking. In 446 | #: addition to these characters any character that is marked as an 447 | #: alphanumeric character in the Unicode database will be matched. 448 | 449 | # select_by_word_characters_forward 450 | 451 | #: Characters considered part of a word when extending the selection 452 | #: forward on double clicking. In addition to these characters any 453 | #: character that is marked as an alphanumeric character in the 454 | #: Unicode database will be matched. 455 | 456 | #: If empty (default) select_by_word_characters will be used for both 457 | #: directions. 458 | 459 | # click_interval -1.0 460 | 461 | #: The interval between successive clicks to detect double/triple 462 | #: clicks (in seconds). Negative numbers will use the system default 463 | #: instead, if available, or fallback to 0.5. 464 | 465 | # focus_follows_mouse no 466 | 467 | #: Set the active window to the window under the mouse when moving the 468 | #: mouse around. 469 | 470 | # pointer_shape_when_grabbed arrow 471 | 472 | #: The shape of the mouse pointer when the program running in the 473 | #: terminal grabs the mouse. Valid values are: arrow, beam and hand. 474 | 475 | # default_pointer_shape beam 476 | 477 | #: The default shape of the mouse pointer. Valid values are: arrow, 478 | #: beam and hand. 479 | 480 | # pointer_shape_when_dragging beam 481 | 482 | #: The default shape of the mouse pointer when dragging across text. 483 | #: Valid values are: arrow, beam and hand. 484 | 485 | #: Mouse actions {{{ 486 | 487 | #: Mouse buttons can be mapped to perform arbitrary actions. The 488 | #: syntax is: 489 | 490 | #: .. code-block:: none 491 | 492 | #: mouse_map button-name event-type modes action 493 | 494 | #: Where button-name is one of left, middle, right, b1 ... b8 with 495 | #: added keyboard modifiers. For example: ctrl+shift+left refers to 496 | #: holding the Ctrl+Shift keys while clicking with the left mouse 497 | #: button. The value b1 ... b8 can be used to refer to up to eight 498 | #: buttons on a mouse. 499 | 500 | #: event-type is one of press, release, doublepress, triplepress, 501 | #: click, doubleclick. modes indicates whether the action is performed 502 | #: when the mouse is grabbed by the program running in the terminal, 503 | #: or not. The values are grabbed or ungrabbed or a comma separated 504 | #: combination of them. grabbed refers to when the program running in 505 | #: the terminal has requested mouse events. Note that the click and 506 | #: double click events have a delay of click_interval to disambiguate 507 | #: from double and triple presses. 508 | 509 | #: You can run kitty with the kitty --debug-input command line option 510 | #: to see mouse events. See the builtin actions below to get a sense 511 | #: of what is possible. 512 | 513 | #: If you want to unmap an action, map it to no_op. For example, to 514 | #: disable opening of URLs with a plain click:: 515 | 516 | #: mouse_map left click ungrabbed no_op 517 | 518 | #: See all the mappable actions including mouse actions here 519 | #: . 520 | 521 | #: .. note:: 522 | #: Once a selection is started, releasing the button that started it will 523 | #: automatically end it and no release event will be dispatched. 524 | 525 | # clear_all_mouse_actions no 526 | 527 | #: Remove all mouse action definitions up to this point. Useful, for 528 | #: instance, to remove the default mouse actions. 529 | 530 | #: Click the link under the mouse or move the cursor 531 | 532 | # mouse_map left click ungrabbed mouse_handle_click selection link prompt 533 | 534 | #:: First check for a selection and if one exists do nothing. Then 535 | #:: check for a link under the mouse cursor and if one exists, click 536 | #:: it. Finally check if the click happened at the current shell 537 | #:: prompt and if so, move the cursor to the click location. Note 538 | #:: that this requires shell integration 539 | #:: to work. 540 | 541 | #: Click the link under the mouse or move the cursor even when grabbed 542 | 543 | # mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt 544 | 545 | #:: Same as above, except that the action is performed even when the 546 | #:: mouse is grabbed by the program running in the terminal. 547 | 548 | #: Click the link under the mouse cursor 549 | 550 | # mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link 551 | 552 | #:: Variant with Ctrl+Shift is present because the simple click based 553 | #:: version has an unavoidable delay of click_interval, to 554 | #:: disambiguate clicks from double clicks. 555 | 556 | #: Discard press event for link click 557 | 558 | # mouse_map ctrl+shift+left press grabbed discard_event 559 | 560 | #:: Prevent this press event from being sent to the program that has 561 | #:: grabbed the mouse, as the corresponding release event is used to 562 | #:: open a URL. 563 | 564 | #: Paste from the primary selection 565 | 566 | # mouse_map middle release ungrabbed paste_from_selection 567 | 568 | #: Start selecting text 569 | 570 | # mouse_map left press ungrabbed mouse_selection normal 571 | 572 | #: Start selecting text in a rectangle 573 | 574 | # mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle 575 | 576 | #: Select a word 577 | 578 | # mouse_map left doublepress ungrabbed mouse_selection word 579 | 580 | #: Select a line 581 | 582 | # mouse_map left triplepress ungrabbed mouse_selection line 583 | 584 | #: Select line from point 585 | 586 | # mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point 587 | 588 | #:: Select from the clicked point to the end of the line. 589 | 590 | #: Extend the current selection 591 | 592 | # mouse_map right press ungrabbed mouse_selection extend 593 | 594 | #:: If you want only the end of the selection to be moved instead of 595 | #:: the nearest boundary, use move-end instead of extend. 596 | 597 | #: Paste from the primary selection even when grabbed 598 | 599 | # mouse_map shift+middle release ungrabbed,grabbed paste_selection 600 | # mouse_map shift+middle press grabbed discard_event 601 | 602 | #: Start selecting text even when grabbed 603 | 604 | # mouse_map shift+left press ungrabbed,grabbed mouse_selection normal 605 | 606 | #: Start selecting text in a rectangle even when grabbed 607 | 608 | # mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle 609 | 610 | #: Select a word even when grabbed 611 | 612 | # mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word 613 | 614 | #: Select a line even when grabbed 615 | 616 | # mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line 617 | 618 | #: Select line from point even when grabbed 619 | 620 | # mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point 621 | 622 | #:: Select from the clicked point to the end of the line even when 623 | #:: grabbed. 624 | 625 | #: Extend the current selection even when grabbed 626 | 627 | # mouse_map shift+right press ungrabbed,grabbed mouse_selection extend 628 | 629 | #: Show clicked command output in pager 630 | 631 | # mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output 632 | 633 | #:: Requires shell integration 634 | #:: to work. 635 | 636 | #: }}} 637 | 638 | #: }}} 639 | 640 | #: Performance tuning {{{ 641 | 642 | # repaint_delay 10 643 | 644 | #: Delay between screen updates (in milliseconds). Decreasing it, 645 | #: increases frames-per-second (FPS) at the cost of more CPU usage. 646 | #: The default value yields ~100 FPS which is more than sufficient for 647 | #: most uses. Note that to actually achieve 100 FPS, you have to 648 | #: either set sync_to_monitor to no or use a monitor with a high 649 | #: refresh rate. Also, to minimize latency when there is pending input 650 | #: to be processed, this option is ignored. 651 | 652 | # input_delay 3 653 | 654 | #: Delay before input from the program running in the terminal is 655 | #: processed (in milliseconds). Note that decreasing it will increase 656 | #: responsiveness, but also increase CPU usage and might cause flicker 657 | #: in full screen programs that redraw the entire screen on each loop, 658 | #: because kitty is so fast that partial screen updates will be drawn. 659 | 660 | # sync_to_monitor yes 661 | 662 | #: Sync screen updates to the refresh rate of the monitor. This 663 | #: prevents screen tearing 664 | #: when scrolling. 665 | #: However, it limits the rendering speed to the refresh rate of your 666 | #: monitor. With a very high speed mouse/high keyboard repeat rate, 667 | #: you may notice some slight input latency. If so, set this to no. 668 | 669 | #: }}} 670 | 671 | #: Terminal bell {{{ 672 | 673 | enable_audio_bell no 674 | 675 | #: The audio bell. Useful to disable it in environments that require 676 | #: silence. 677 | 678 | # visual_bell_duration 0.0 679 | 680 | #: The visual bell duration (in seconds). Flash the screen when a bell 681 | #: occurs for the specified number of seconds. Set to zero to disable. 682 | 683 | # visual_bell_color none 684 | 685 | #: The color used by visual bell. Set to none will fall back to 686 | #: selection background color. If you feel that the visual bell is too 687 | #: bright, you can set it to a darker color. 688 | 689 | window_alert_on_bell no 690 | 691 | #: Request window attention on bell. Makes the dock icon bounce on 692 | #: macOS or the taskbar flash on linux. 693 | 694 | # bell_on_tab "🔔 " 695 | 696 | #: Some text or a Unicode symbol to show on the tab if a window in the 697 | #: tab that does not have focus has a bell. If you want to use leading 698 | #: or trailing spaces, surround the text with quotes. See 699 | #: tab_title_template for how this is rendered. 700 | 701 | #: For backwards compatibility, values of yes, y and true are 702 | #: converted to the default bell symbol and no, n, false and none are 703 | #: converted to the empty string. 704 | 705 | # command_on_bell none 706 | 707 | #: Program to run when a bell occurs. The environment variable 708 | #: KITTY_CHILD_CMDLINE can be used to get the program running in the 709 | #: window in which the bell occurred. 710 | 711 | # bell_path none 712 | 713 | #: Path to a sound file to play as the bell sound. If set to none, the 714 | #: system default bell sound is used. Must be in a format supported by 715 | #: the operating systems sound API, such as WAV or OGA on Linux 716 | #: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound) 717 | 718 | # linux_bell_theme __custom 719 | 720 | #: The XDG Sound Theme kitty will use to play the bell sound. Defaults 721 | #: to the custom theme name used by GNOME and Budgie, falling back to 722 | #: the default freedesktop theme if it does not exist. This option may 723 | #: be removed if Linux ever provides desktop-agnostic support for 724 | #: setting system sound themes. 725 | 726 | #: }}} 727 | 728 | #: Window layout {{{ 729 | 730 | remember_window_size no 731 | initial_window_width 100c 732 | initial_window_height 30c 733 | 734 | #: If enabled, the OS Window size will be remembered so that new 735 | #: instances of kitty will have the same size as the previous 736 | #: instance. If disabled, the OS Window will initially have size 737 | #: configured by initial_window_width/height, in pixels. You can use a 738 | #: suffix of "c" on the width/height values to have them interpreted 739 | #: as number of cells instead of pixels. 740 | 741 | # enabled_layouts * 742 | 743 | #: The enabled window layouts. A comma separated list of layout names. 744 | #: The special value all means all layouts. The first listed layout 745 | #: will be used as the startup layout. Default configuration is all 746 | #: layouts in alphabetical order. For a list of available layouts, see 747 | #: the layouts . 748 | 749 | # window_resize_step_cells 2 750 | # window_resize_step_lines 2 751 | 752 | #: The step size (in units of cell width/cell height) to use when 753 | #: resizing kitty windows in a layout with the shortcut 754 | #: start_resizing_window. The cells value is used for horizontal 755 | #: resizing, and the lines value is used for vertical resizing. 756 | 757 | # window_border_width 0.5pt 758 | 759 | #: The width of window borders. Can be either in pixels (px) or pts 760 | #: (pt). Values in pts will be rounded to the nearest number of pixels 761 | #: based on screen resolution. If not specified, the unit is assumed 762 | #: to be pts. Note that borders are displayed only when more than one 763 | #: window is visible. They are meant to separate multiple windows. 764 | 765 | # draw_minimal_borders yes 766 | 767 | #: Draw only the minimum borders needed. This means that only the 768 | #: borders that separate the window from a neighbor are drawn. Note 769 | #: that setting a non-zero window_margin_width overrides this and 770 | #: causes all borders to be drawn. 771 | 772 | # window_margin_width 0 773 | 774 | #: The window margin (in pts) (blank area outside the border). A 775 | #: single value sets all four sides. Two values set the vertical and 776 | #: horizontal sides. Three values set top, horizontal and bottom. Four 777 | #: values set top, right, bottom and left. 778 | 779 | # single_window_margin_width -1 780 | 781 | #: The window margin to use when only a single window is visible (in 782 | #: pts). Negative values will cause the value of window_margin_width 783 | #: to be used instead. A single value sets all four sides. Two values 784 | #: set the vertical and horizontal sides. Three values set top, 785 | #: horizontal and bottom. Four values set top, right, bottom and left. 786 | 787 | window_padding_width 10 788 | 789 | #: The window padding (in pts) (blank area between the text and the 790 | #: window border). A single value sets all four sides. Two values set 791 | #: the vertical and horizontal sides. Three values set top, horizontal 792 | #: and bottom. Four values set top, right, bottom and left. 793 | 794 | # placement_strategy center 795 | 796 | #: When the window size is not an exact multiple of the cell size, the 797 | #: cell area of the terminal window will have some extra padding on 798 | #: the sides. You can control how that padding is distributed with 799 | #: this option. Using a value of center means the cell area will be 800 | #: placed centrally. A value of top-left means the padding will be 801 | #: only at the bottom and right edges. 802 | 803 | # active_border_color #00ff00 804 | 805 | #: The color for the border of the active window. Set this to none to 806 | #: not draw borders around the active window. 807 | 808 | # inactive_border_color #cccccc 809 | 810 | #: The color for the border of inactive windows. 811 | 812 | # bell_border_color #ff5a00 813 | 814 | #: The color for the border of inactive windows in which a bell has 815 | #: occurred. 816 | 817 | # inactive_text_alpha 1.0 818 | 819 | #: Fade the text in inactive windows by the specified amount (a number 820 | #: between zero and one, with zero being fully faded). 821 | 822 | hide_window_decorations yes 823 | 824 | #: Hide the window decorations (title-bar and window borders) with 825 | #: yes. On macOS, titlebar-only and titlebar-and-corners can be used 826 | #: to only hide the titlebar and the rounded corners. Whether this 827 | #: works and exactly what effect it has depends on the window 828 | #: manager/operating system. Note that the effects of changing this 829 | #: option when reloading config are undefined. When using titlebar- 830 | #: only, it is useful to also set window_margin_width and 831 | #: placement_strategy to prevent the rounded corners from clipping 832 | #: text. Or use titlebar-and-corners. 833 | 834 | # window_logo_path none 835 | 836 | #: Path to a logo image. Must be in PNG format. Relative paths are 837 | #: interpreted relative to the kitty config directory. The logo is 838 | #: displayed in a corner of every kitty window. The position is 839 | #: controlled by window_logo_position. Individual windows can be 840 | #: configured to have different logos either using the launch action 841 | #: or the remote control facility. 843 | 844 | # window_logo_position bottom-right 845 | 846 | #: Where to position the window logo in the window. The value can be 847 | #: one of: top-left, top, top-right, left, center, right, bottom-left, 848 | #: bottom, bottom-right. 849 | 850 | # window_logo_alpha 0.5 851 | 852 | #: The amount the logo should be faded into the background. With zero 853 | #: being fully faded and one being fully opaque. 854 | 855 | # resize_debounce_time 0.1 0.5 856 | 857 | #: The time to wait before redrawing the screen during a live resize 858 | #: of the OS window, when no new resize events have been received, 859 | #: i.e. when resizing is either paused or finished. On platforms such 860 | #: as macOS, where the operating system sends events corresponding to 861 | #: the start and end of a live resize, the second number is used for 862 | #: redraw-after-pause since kitty can distinguish between a pause and 863 | #: end of resizing. On such systems the first number is ignored and 864 | #: redraw is immediate after end of resize. On other systems the 865 | #: first number is used so that kitty is "ready" quickly after the end 866 | #: of resizing, while not also continuously redrawing, to save energy. 867 | 868 | # resize_in_steps no 869 | 870 | #: Resize the OS window in steps as large as the cells, instead of 871 | #: with the usual pixel accuracy. Combined with initial_window_width 872 | #: and initial_window_height in number of cells, this option can be 873 | #: used to keep the margins as small as possible when resizing the OS 874 | #: window. Note that this does not currently work on Wayland. 875 | 876 | # visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ 877 | 878 | #: The list of characters for visual window selection. For example, 879 | #: for selecting a window to focus on with focus_visible_window. The 880 | #: value should be a series of unique numbers or alphabets, case 881 | #: insensitive, from the set [0-9A-Z]. Specify your preference as a 882 | #: string of characters. 883 | 884 | confirm_os_window_close 0 885 | 886 | #: Ask for confirmation when closing an OS window or a tab with at 887 | #: least this number of kitty windows in it by window manager (e.g. 888 | #: clicking the window close button or pressing the operating system 889 | #: shortcut to close windows) or by the close_tab action. A value of 890 | #: zero disables confirmation. This confirmation also applies to 891 | #: requests to quit the entire application (all OS windows, via the 892 | #: quit action). Negative values are converted to positive ones, 893 | #: however, with shell_integration enabled, using negative values 894 | #: means windows sitting at a shell prompt are not counted, only 895 | #: windows where some command is currently running. Note that if you 896 | #: want confirmation when closing individual windows, you can map the 897 | #: close_window_with_confirmation action. 898 | 899 | #: }}} 900 | 901 | #: Tab bar {{{ 902 | 903 | tab_bar_edge bottom 904 | 905 | #: The edge to show the tab bar on, top or bottom. 906 | 907 | # tab_bar_margin_width 5.0 908 | 909 | #: The margin to the left and right of the tab bar (in pts). 910 | 911 | tab_bar_margin_height 5.0 0.0 912 | 913 | #: The margin above and below the tab bar (in pts). The first number 914 | #: is the margin between the edge of the OS Window and the tab bar. 915 | #: The second number is the margin between the tab bar and the 916 | #: contents of the current tab. 917 | 918 | # tab_bar_style slant 919 | 920 | #: The tab bar style, can be one of: 921 | 922 | #: fade 923 | #: Each tab's edges fade into the background color. (See also tab_fade) 924 | #: slant 925 | #: Tabs look like the tabs in a physical file. 926 | #: separator 927 | #: Tabs are separated by a configurable separator. (See also 928 | #: tab_separator) 929 | #: powerline 930 | #: Tabs are shown as a continuous line with "fancy" separators. 931 | #: (See also tab_powerline_style) 932 | #: custom 933 | #: A user-supplied Python function called draw_tab is loaded from the file 934 | #: tab_bar.py in the kitty config directory. For examples of how to 935 | #: write such a function, see the functions named draw_tab_with_* in 936 | #: kitty's source code: kitty/tab_bar.py. See also 937 | #: this discussion 938 | #: for examples from kitty users. 939 | #: hidden 940 | #: The tab bar is hidden. If you use this, you might want to create 941 | #: a mapping for the select_tab action which presents you with a list of 942 | #: tabs and allows for easy switching to a tab. 943 | 944 | # tab_bar_align left 945 | 946 | #: The horizontal alignment of the tab bar, can be one of: left, 947 | #: center, right. 948 | 949 | # tab_bar_min_tabs 2 950 | 951 | #: The minimum number of tabs that must exist before the tab bar is 952 | #: shown. 953 | 954 | # tab_switch_strategy previous 955 | 956 | #: The algorithm to use when switching to a tab when the current tab 957 | #: is closed. The default of previous will switch to the last used 958 | #: tab. A value of left will switch to the tab to the left of the 959 | #: closed tab. A value of right will switch to the tab to the right of 960 | #: the closed tab. A value of last will switch to the right-most tab. 961 | 962 | # tab_fade 0.25 0.5 0.75 1 963 | 964 | #: Control how each tab fades into the background when using fade for 965 | #: the tab_bar_style. Each number is an alpha (between zero and one) 966 | #: that controls how much the corresponding cell fades into the 967 | #: background, with zero being no fade and one being full fade. You 968 | #: can change the number of cells used by adding/removing entries to 969 | #: this list. 970 | 971 | # tab_separator " ┇" 972 | 973 | #: The separator between tabs in the tab bar when using separator as 974 | #: the tab_bar_style. 975 | 976 | # tab_powerline_style angled 977 | 978 | #: The powerline separator style between tabs in the tab bar when 979 | #: using powerline as the tab_bar_style, can be one of: angled, 980 | #: slanted, round. 981 | 982 | # tab_activity_symbol none 983 | 984 | #: Some text or a Unicode symbol to show on the tab if a window in the 985 | #: tab that does not have focus has some activity. If you want to use 986 | #: leading or trailing spaces, surround the text with quotes. See 987 | #: tab_title_template for how this is rendered. 988 | 989 | # tab_title_max_length 0 990 | 991 | #: The maximum number of cells that can be used to render the text in 992 | #: a tab. A value of zero means that no limit is applied. 993 | 994 | # tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" 995 | 996 | #: A template to render the tab title. The default just renders the 997 | #: title with optional symbols for bell and activity. If you wish to 998 | #: include the tab-index as well, use something like: {index}:{title}. 999 | #: Useful if you have shortcuts mapped for goto_tab N. If you prefer 1000 | #: to see the index as a superscript, use {sup.index}. All data 1001 | #: available is: 1002 | 1003 | #: title 1004 | #: The current tab title. 1005 | #: index 1006 | #: The tab index usable with goto_tab N goto_tab shortcuts. 1007 | #: layout_name 1008 | #: The current layout name. 1009 | #: num_windows 1010 | #: The number of windows in the tab. 1011 | #: num_window_groups 1012 | #: The number of window groups (a window group is a window and all of its overlay windows) in the tab. 1013 | #: tab.active_wd 1014 | #: The working directory of the currently active window in the tab 1015 | #: (expensive, requires syscall). Use active_oldest_wd to get 1016 | #: the directory of the oldest foreground process rather than the newest. 1017 | #: tab.active_exe 1018 | #: The name of the executable running in the foreground of the currently 1019 | #: active window in the tab (expensive, requires syscall). Use 1020 | #: active_oldest_exe for the oldest foreground process. 1021 | #: max_title_length 1022 | #: The maximum title length available. 1023 | 1024 | #: Note that formatting is done by Python's string formatting 1025 | #: machinery, so you can use, for instance, {layout_name[:2].upper()} 1026 | #: to show only the first two letters of the layout name, upper-cased. 1027 | #: If you want to style the text, you can use styling directives, for 1028 | #: example: 1029 | #: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. 1030 | #: Similarly, for bold and italic: 1031 | #: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. 1032 | #: Note that for backward compatibility, if {bell_symbol} or 1033 | #: {activity_symbol} are not present in the template, they are 1034 | #: prepended to it. 1035 | 1036 | # active_tab_title_template none 1037 | 1038 | #: Template to use for active tabs. If not specified falls back to 1039 | #: tab_title_template. 1040 | 1041 | # active_tab_foreground #000 1042 | # active_tab_background #000 1043 | # active_tab_font_style bold-italic 1044 | # inactive_tab_foreground #444 1045 | # inactive_tab_background #999 1046 | # inactive_tab_font_style normal 1047 | 1048 | #: Tab bar colors and styles. 1049 | 1050 | # tab_bar_background none 1051 | 1052 | #: Background color for the tab bar. Defaults to using the terminal 1053 | #: background color. 1054 | 1055 | # tab_bar_margin_color none 1056 | 1057 | #: Color for the tab bar margin area. Defaults to using the terminal 1058 | #: background color for margins above and below the tab bar. For side 1059 | #: margins the default color is chosen to match the background color 1060 | #: of the neighboring tab. 1061 | 1062 | #: }}} 1063 | 1064 | #: Color scheme {{{ 1065 | 1066 | # foreground #dddddd 1067 | # background #000000 1068 | 1069 | #: The foreground and background colors. 1070 | 1071 | # background_opacity 1.0 1072 | 1073 | #: The opacity of the background. A number between zero and one, where 1074 | #: one is opaque and zero is fully transparent. This will only work if 1075 | #: supported by the OS (for instance, when using a compositor under 1076 | #: X11). Note that it only sets the background color's opacity in 1077 | #: cells that have the same background color as the default terminal 1078 | #: background, so that things like the status bar in vim, powerline 1079 | #: prompts, etc. still look good. But it means that if you use a color 1080 | #: theme with a background color in your editor, it will not be 1081 | #: rendered as transparent. Instead you should change the default 1082 | #: background color in your kitty config and not use a background 1083 | #: color in the editor color scheme. Or use the escape codes to set 1084 | #: the terminals default colors in a shell script to launch your 1085 | #: editor. Be aware that using a value less than 1.0 is a (possibly 1086 | #: significant) performance hit. When using a low value for this 1087 | #: setting, it is desirable that you set the background color to a 1088 | #: color the matches the general color of the desktop background, for 1089 | #: best text rendering. If you want to dynamically change 1090 | #: transparency of windows, set dynamic_background_opacity to yes 1091 | #: (this is off by default as it has a performance cost). Changing 1092 | #: this option when reloading the config will only work if 1093 | #: dynamic_background_opacity was enabled in the original config. 1094 | 1095 | # background_blur 0 1096 | 1097 | #: Set to a positive value to enable background blur (blurring of the 1098 | #: visuals behind a transparent window) on platforms that support it. 1099 | #: Only takes effect when background_opacity is less than one. On 1100 | #: macOS, this will also control the blur radius (amount of blurring). 1101 | #: Setting it to too high a value will cause severe performance issues 1102 | #: and/or rendering artifacts. Usually, values up to 64 work well. 1103 | #: Note that this might cause performance issues, depending on how the 1104 | #: platform implements it, so use with care. Currently supported on 1105 | #: macOS and KDE/X11. 1106 | 1107 | # background_image none 1108 | 1109 | #: Path to a background image. Must be in PNG format. 1110 | 1111 | # background_image_layout tiled 1112 | 1113 | #: Whether to tile, scale or clamp the background image. The value can 1114 | #: be one of tiled, mirror-tiled, scaled, clamped, centered or 1115 | #: cscaled. The scaled and cscaled values scale the image to the 1116 | #: window size, with cscaled preserving the image aspect ratio. 1117 | 1118 | # background_image_linear no 1119 | 1120 | #: When background image is scaled, whether linear interpolation 1121 | #: should be used. 1122 | 1123 | # dynamic_background_opacity no 1124 | 1125 | #: Allow changing of the background_opacity dynamically, using either 1126 | #: keyboard shortcuts (increase_background_opacity and 1127 | #: decrease_background_opacity) or the remote control facility. 1128 | #: Changing this option by reloading the config is not supported. 1129 | 1130 | # background_tint 0.0 1131 | 1132 | #: How much to tint the background image by the background color. This 1133 | #: option makes it easier to read the text. Tinting is done using the 1134 | #: current background color for each window. This option applies only 1135 | #: if background_opacity is set and transparent windows are supported 1136 | #: or background_image is set. 1137 | 1138 | # background_tint_gaps 1.0 1139 | 1140 | #: How much to tint the background image at the window gaps by the 1141 | #: background color, after applying background_tint. Since this is 1142 | #: multiplicative with background_tint, it can be used to lighten the 1143 | #: tint over the window gaps for a *separated* look. 1144 | 1145 | # dim_opacity 0.4 1146 | 1147 | #: How much to dim text that has the DIM/FAINT attribute set. One 1148 | #: means no dimming and zero means fully dimmed (i.e. invisible). 1149 | 1150 | # selection_foreground #000000 1151 | # selection_background #fffacd 1152 | 1153 | #: The foreground and background colors for text selected with the 1154 | #: mouse. Setting both of these to none will cause a "reverse video" 1155 | #: effect for selections, where the selection will be the cell text 1156 | #: color and the text will become the cell background color. Setting 1157 | #: only selection_foreground to none will cause the foreground color 1158 | #: to be used unchanged. Note that these colors can be overridden by 1159 | #: the program running in the terminal. 1160 | 1161 | #: The color table {{{ 1162 | 1163 | #: The 256 terminal colors. There are 8 basic colors, each color has a 1164 | #: dull and bright version, for the first 16 colors. You can set the 1165 | #: remaining 240 colors as color16 to color255. 1166 | 1167 | # color0 #000000 1168 | # color8 #767676 1169 | 1170 | #: black 1171 | 1172 | # color1 #cc0403 1173 | # color9 #f2201f 1174 | 1175 | #: red 1176 | 1177 | # color2 #19cb00 1178 | # color10 #23fd00 1179 | 1180 | #: green 1181 | 1182 | # color3 #cecb00 1183 | # color11 #fffd00 1184 | 1185 | #: yellow 1186 | 1187 | # color4 #0d73cc 1188 | # color12 #1a8fff 1189 | 1190 | #: blue 1191 | 1192 | # color5 #cb1ed1 1193 | # color13 #fd28ff 1194 | 1195 | #: magenta 1196 | 1197 | # color6 #0dcdcd 1198 | # color14 #14ffff 1199 | 1200 | #: cyan 1201 | 1202 | # color7 #dddddd 1203 | # color15 #ffffff 1204 | 1205 | #: white 1206 | 1207 | # mark1_foreground black 1208 | 1209 | #: Color for marks of type 1 1210 | 1211 | # mark1_background #98d3cb 1212 | 1213 | #: Color for marks of type 1 (light steel blue) 1214 | 1215 | # mark2_foreground black 1216 | 1217 | #: Color for marks of type 2 1218 | 1219 | # mark2_background #f2dcd3 1220 | 1221 | #: Color for marks of type 1 (beige) 1222 | 1223 | # mark3_foreground black 1224 | 1225 | #: Color for marks of type 3 1226 | 1227 | # mark3_background #f274bc 1228 | 1229 | #: Color for marks of type 3 (violet) 1230 | 1231 | #: }}} 1232 | 1233 | #: }}} 1234 | 1235 | #: Advanced {{{ 1236 | 1237 | # shell . 1238 | 1239 | #: The shell program to execute. The default value of . means to use 1240 | #: whatever shell is set as the default shell for the current user. 1241 | #: Note that on macOS if you change this, you might need to add 1242 | #: --login and --interactive to ensure that the shell starts in 1243 | #: interactive mode and reads its startup rc files. 1244 | 1245 | # editor . 1246 | 1247 | #: The terminal based text editor (such as vim or nano) to use when 1248 | #: editing the kitty config file or similar tasks. 1249 | 1250 | #: The default value of . means to use the environment variables 1251 | #: VISUAL and EDITOR in that order. If these variables aren't set, 1252 | #: kitty will run your shell ($SHELL -l -i -c env) to see if your 1253 | #: shell startup rc files set VISUAL or EDITOR. If that doesn't work, 1254 | #: kitty will cycle through various known editors (vim, emacs, etc.) 1255 | #: and take the first one that exists on your system. 1256 | 1257 | # close_on_child_death no 1258 | 1259 | #: Close the window when the child process (shell) exits. With the 1260 | #: default value no, the terminal will remain open when the child 1261 | #: exits as long as there are still processes outputting to the 1262 | #: terminal (for example disowned or backgrounded processes). When 1263 | #: enabled with yes, the window will close as soon as the child 1264 | #: process exits. Note that setting it to yes means that any 1265 | #: background processes still using the terminal can fail silently 1266 | #: because their stdout/stderr/stdin no longer work. 1267 | 1268 | # remote_control_password 1269 | 1270 | #: Allow other programs to control kitty using passwords. This option 1271 | #: can be specified multiple times to add multiple passwords. If no 1272 | #: passwords are present kitty will ask the user for permission if a 1273 | #: program tries to use remote control with a password. A password can 1274 | #: also *optionally* be associated with a set of allowed remote 1275 | #: control actions. For example:: 1276 | 1277 | #: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab 1278 | 1279 | #: Only the specified actions will be allowed when using this 1280 | #: password. Glob patterns can be used too, for example:: 1281 | 1282 | #: remote_control_password "my passphrase" set-tab-* resize-* 1283 | 1284 | #: To get a list of available actions, run:: 1285 | 1286 | #: kitty @ --help 1287 | 1288 | #: A set of actions to be allowed when no password is sent can be 1289 | #: specified by using an empty password. For example:: 1290 | 1291 | #: remote_control_password "" *-colors 1292 | 1293 | #: Finally, the path to a python module can be specified that provides 1294 | #: a function is_cmd_allowed that is used to check every remote 1295 | #: control command. For example:: 1296 | 1297 | #: remote_control_password "my passphrase" my_rc_command_checker.py 1298 | 1299 | #: Relative paths are resolved from the kitty configuration directory. 1300 | #: See rc_custom_auth for details. 1302 | 1303 | # allow_remote_control no 1304 | 1305 | #: Allow other programs to control kitty. If you turn this on, other 1306 | #: programs can control all aspects of kitty, including sending text 1307 | #: to kitty windows, opening new windows, closing windows, reading the 1308 | #: content of windows, etc. Note that this even works over SSH 1309 | #: connections. The default setting of no prevents any form of remote 1310 | #: control. The meaning of the various values are: 1311 | 1312 | #: password 1313 | #: Remote control requests received over both the TTY device and the socket 1314 | #: are confirmed based on passwords, see remote_control_password. 1315 | 1316 | #: socket-only 1317 | #: Remote control requests received over a socket are accepted 1318 | #: unconditionally. Requests received over the TTY are denied. 1319 | #: See listen_on. 1320 | 1321 | #: socket 1322 | #: Remote control requests received over a socket are accepted 1323 | #: unconditionally. Requests received over the TTY are confirmed based on 1324 | #: password. 1325 | 1326 | #: no 1327 | #: Remote control is completely disabled. 1328 | 1329 | #: yes 1330 | #: Remote control requests are always accepted. 1331 | 1332 | # listen_on none 1333 | 1334 | #: Listen to the specified UNIX socket for remote control connections. 1335 | #: Note that this will apply to all kitty instances. It can be 1336 | #: overridden by the kitty --listen-on command line option, which also 1337 | #: supports listening on a TCP socket. This option accepts only UNIX 1338 | #: sockets, such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). 1339 | #: Environment variables are expanded and relative paths are resolved 1340 | #: with respect to the temporary directory. If {kitty_pid} is present, 1341 | #: then it is replaced by the PID of the kitty process, otherwise the 1342 | #: PID of the kitty process is appended to the value, with a hyphen. 1343 | #: See the help for kitty --listen-on for more details. Note that this 1344 | #: will be ignored unless allow_remote_control is set to either: yes, 1345 | #: socket or socket-only. Changing this option by reloading the config 1346 | #: is not supported. 1347 | 1348 | # env 1349 | 1350 | #: Specify the environment variables to be set in all child processes. 1351 | #: Using the name with an equal sign (e.g. env VAR=) will set it to 1352 | #: the empty string. Specifying only the name (e.g. env VAR) will 1353 | #: remove the variable from the child process' environment. Note that 1354 | #: environment variables are expanded recursively, for example:: 1355 | 1356 | #: env VAR1=a 1357 | #: env VAR2=${HOME}/${VAR1}/b 1358 | 1359 | #: The value of VAR2 will be /a/b. 1360 | 1361 | # watcher 1362 | 1363 | #: Path to python file which will be loaded for watchers 1364 | #: . Can be 1365 | #: specified more than once to load multiple watchers. The watchers 1366 | #: will be added to every kitty window. Relative paths are resolved 1367 | #: relative to the kitty config directory. Note that reloading the 1368 | #: config will only affect windows created after the reload. 1369 | 1370 | # exe_search_path 1371 | 1372 | #: Control where kitty finds the programs to run. The default search 1373 | #: order is: First search the system wide PATH, then ~/.local/bin and 1374 | #: ~/bin. If still not found, the PATH defined in the login shell 1375 | #: after sourcing all its startup files is tried. Finally, if present, 1376 | #: the PATH specified by the env option is tried. 1377 | 1378 | #: This option allows you to prepend, append, or remove paths from 1379 | #: this search order. It can be specified multiple times for multiple 1380 | #: paths. A simple path will be prepended to the search order. A path 1381 | #: that starts with the + sign will be append to the search order, 1382 | #: after ~/bin above. A path that starts with the - sign will be 1383 | #: removed from the entire search order. For example:: 1384 | 1385 | #: exe_search_path /some/prepended/path 1386 | #: exe_search_path +/some/appended/path 1387 | #: exe_search_path -/some/excluded/path 1388 | 1389 | # update_check_interval 24 1390 | 1391 | #: The interval to periodically check if an update to kitty is 1392 | #: available (in hours). If an update is found, a system notification 1393 | #: is displayed informing you of the available update. The default is 1394 | #: to check every 24 hours, set to zero to disable. Update checking is 1395 | #: only done by the official binary builds. Distro packages or source 1396 | #: builds do not do update checking. Changing this option by reloading 1397 | #: the config is not supported. 1398 | 1399 | # startup_session none 1400 | 1401 | #: Path to a session file to use for all kitty instances. Can be 1402 | #: overridden by using the kitty --session =none command line option 1403 | #: for individual instances. See sessions 1404 | #: in the kitty 1405 | #: documentation for details. Note that relative paths are interpreted 1406 | #: with respect to the kitty config directory. Environment variables 1407 | #: in the path are expanded. Changing this option by reloading the 1408 | #: config is not supported. 1409 | 1410 | # clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask 1411 | 1412 | #: Allow programs running in kitty to read and write from the 1413 | #: clipboard. You can control exactly which actions are allowed. The 1414 | #: possible actions are: write-clipboard, read-clipboard, write- 1415 | #: primary, read-primary, read-clipboard-ask, read-primary-ask. The 1416 | #: default is to allow writing to the clipboard and primary selection 1417 | #: and to ask for permission when a program tries to read from the 1418 | #: clipboard. Note that disabling the read confirmation is a security 1419 | #: risk as it means that any program, even the ones running on a 1420 | #: remote server via SSH can read your clipboard. See also 1421 | #: clipboard_max_size. 1422 | 1423 | # clipboard_max_size 512 1424 | 1425 | #: The maximum size (in MB) of data from programs running in kitty 1426 | #: that will be stored for writing to the system clipboard. A value of 1427 | #: zero means no size limit is applied. See also clipboard_control. 1428 | 1429 | # file_transfer_confirmation_bypass 1430 | 1431 | #: The password that can be supplied to the file transfer kitten 1432 | #: to skip the 1433 | #: transfer confirmation prompt. This should only be used when 1434 | #: initiating transfers from trusted computers, over trusted networks 1435 | #: or encrypted transports, as it allows any programs running on the 1436 | #: remote machine to read/write to the local filesystem, without 1437 | #: permission. 1438 | 1439 | # allow_hyperlinks yes 1440 | 1441 | #: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 1442 | #: escape sequences are ignored. Otherwise they become clickable 1443 | #: links, that you can click with the mouse or by using the hints 1444 | #: kitten . The 1445 | #: special value of ask means that kitty will ask before opening the 1446 | #: link when clicked. 1447 | 1448 | shell_integration no-cursor 1449 | 1450 | #: Enable shell integration on supported shells. This enables features 1451 | #: such as jumping to previous prompts, browsing the output of the 1452 | #: previous command in a pager, etc. on supported shells. Set to 1453 | #: disabled to turn off shell integration, completely. It is also 1454 | #: possible to disable individual features, set to a space separated 1455 | #: list of these values: no-rc, no-cursor, no-title, no-cwd, no- 1456 | #: prompt-mark, no-complete. See Shell integration 1457 | #: for details. 1458 | 1459 | # allow_cloning ask 1460 | 1461 | #: Control whether programs running in the terminal can request new 1462 | #: windows to be created. The canonical example is clone-in-kitty 1463 | #: . 1464 | #: By default, kitty will ask for permission for each clone request. 1465 | #: Allowing cloning unconditionally gives programs running in the 1466 | #: terminal (including over SSH) permission to execute arbitrary code, 1467 | #: as the user who is running the terminal, on the computer that the 1468 | #: terminal is running on. 1469 | 1470 | # clone_source_strategies venv,conda,env_var,path 1471 | 1472 | #: Control what shell code is sourced when running clone-in-kitty in 1473 | #: the newly cloned window. The supported strategies are: 1474 | 1475 | #: venv 1476 | #: Source the file $VIRTUAL_ENV/bin/activate. This is used by the 1477 | #: Python stdlib venv module and allows cloning venvs automatically. 1478 | #: conda 1479 | #: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual 1480 | #: environments created by conda. 1481 | #: env_var 1482 | #: Execute the contents of the environment variable 1483 | #: KITTY_CLONE_SOURCE_CODE with eval. 1484 | #: path 1485 | #: Source the file pointed to by the environment variable 1486 | #: KITTY_CLONE_SOURCE_PATH. 1487 | 1488 | #: This option must be a comma separated list of the above values. 1489 | #: This only source the first valid one in the above order. 1490 | 1491 | term xterm-256color 1492 | 1493 | #: The value of the TERM environment variable to set. Changing this 1494 | #: can break many terminal programs, only change it if you know what 1495 | #: you are doing, not because you read some advice on "Stack Overflow" 1496 | #: to change it. The TERM variable is used by various programs to get 1497 | #: information about the capabilities and behavior of the terminal. If 1498 | #: you change it, depending on what programs you run, and how 1499 | #: different the terminal you are changing it to is, various things 1500 | #: from key-presses, to colors, to various advanced features may not 1501 | #: work. Changing this option by reloading the config will only affect 1502 | #: newly created windows. 1503 | 1504 | #: }}} 1505 | 1506 | #: OS specific tweaks {{{ 1507 | 1508 | # wayland_titlebar_color system 1509 | 1510 | #: The color of the kitty window's titlebar on Wayland systems with 1511 | #: client side window decorations such as GNOME. A value of system 1512 | #: means to use the default system color, a value of background means 1513 | #: to use the background color of the currently active window and 1514 | #: finally you can use an arbitrary color, such as #12af59 or red. 1515 | 1516 | # macos_titlebar_color system 1517 | 1518 | #: The color of the kitty window's titlebar on macOS. A value of 1519 | #: system means to use the default system color, light or dark can 1520 | #: also be used to set it explicitly. A value of background means to 1521 | #: use the background color of the currently active window and finally 1522 | #: you can use an arbitrary color, such as #12af59 or red. WARNING: 1523 | #: This option works by using a hack when arbitrary color (or 1524 | #: background) is configured, as there is no proper Cocoa API for it. 1525 | #: It sets the background color of the entire window and makes the 1526 | #: titlebar transparent. As such it is incompatible with 1527 | #: background_opacity. If you want to use both, you are probably 1528 | #: better off just hiding the titlebar with hide_window_decorations. 1529 | 1530 | # macos_option_as_alt no 1531 | 1532 | #: Use the Option key as an Alt key on macOS. With this set to no, 1533 | #: kitty will use the macOS native Option+Key to enter Unicode 1534 | #: character behavior. This will break any Alt+Key keyboard shortcuts 1535 | #: in your terminal programs, but you can use the macOS Unicode input 1536 | #: technique. You can use the values: left, right or both to use only 1537 | #: the left, right or both Option keys as Alt, instead. Note that 1538 | #: kitty itself always treats Option the same as Alt. This means you 1539 | #: cannot use this option to configure different kitty shortcuts for 1540 | #: Option+Key vs. Alt+Key. Also, any kitty shortcuts using 1541 | #: Option/Alt+Key will take priority, so that any such key presses 1542 | #: will not be passed to terminal programs running inside kitty. 1543 | #: Changing this option by reloading the config is not supported. 1544 | 1545 | # macos_hide_from_tasks no 1546 | 1547 | #: Hide the kitty window from running tasks on macOS (⌘+Tab and the 1548 | #: Dock). Changing this option by reloading the config is not 1549 | #: supported. 1550 | 1551 | # macos_quit_when_last_window_closed no 1552 | 1553 | #: Have kitty quit when all the top-level windows are closed on macOS. 1554 | #: By default, kitty will stay running, even with no open windows, as 1555 | #: is the expected behavior on macOS. 1556 | 1557 | # macos_window_resizable yes 1558 | 1559 | #: Disable this if you want kitty top-level OS windows to not be 1560 | #: resizable on macOS. 1561 | 1562 | # macos_thicken_font 0 1563 | 1564 | #: Draw an extra border around the font with the given width, to 1565 | #: increase legibility at small font sizes on macOS. For example, a 1566 | #: value of 0.75 will result in rendering that looks similar to sub- 1567 | #: pixel antialiasing at common font sizes. Note that in modern kitty, 1568 | #: this option is obsolete (although still supported). Consider using 1569 | #: text_composition_strategy instead. 1570 | 1571 | # macos_traditional_fullscreen no 1572 | 1573 | #: Use the macOS traditional full-screen transition, that is faster, 1574 | #: but less pretty. 1575 | 1576 | # macos_show_window_title_in all 1577 | 1578 | #: Control where the window title is displayed on macOS. A value of 1579 | #: window will show the title of the currently active window at the 1580 | #: top of the macOS window. A value of menubar will show the title of 1581 | #: the currently active window in the macOS global menu bar, making 1582 | #: use of otherwise wasted space. A value of all will show the title 1583 | #: in both places, and none hides the title. See 1584 | #: macos_menubar_title_max_length for how to control the length of the 1585 | #: title in the menu bar. 1586 | 1587 | # macos_menubar_title_max_length 0 1588 | 1589 | #: The maximum number of characters from the window title to show in 1590 | #: the macOS global menu bar. Values less than one means that there is 1591 | #: no maximum limit. 1592 | 1593 | # macos_custom_beam_cursor no 1594 | 1595 | #: Use a custom mouse cursor for macOS that is easier to see on both 1596 | #: light and dark backgrounds. Nowadays, the default macOS cursor 1597 | #: already comes with a white border. WARNING: this might make your 1598 | #: mouse cursor invisible on dual GPU machines. Changing this option 1599 | #: by reloading the config is not supported. 1600 | 1601 | # macos_colorspace srgb 1602 | 1603 | #: The colorspace in which to interpret terminal colors. The default 1604 | #: of srgb will cause colors to match those seen in web browsers. The 1605 | #: value of default will use whatever the native colorspace of the 1606 | #: display is. The value of displayp3 will use Apple's special 1607 | #: snowflake display P3 color space, which will result in over 1608 | #: saturated (brighter) colors with some color shift. Reloading 1609 | #: configuration will change this value only for newly created OS 1610 | #: windows. 1611 | 1612 | # linux_display_server auto 1613 | 1614 | #: Choose between Wayland and X11 backends. By default, an appropriate 1615 | #: backend based on the system state is chosen automatically. Set it 1616 | #: to x11 or wayland to force the choice. Changing this option by 1617 | #: reloading the config is not supported. 1618 | 1619 | #: }}} 1620 | 1621 | #: Keyboard shortcuts {{{ 1622 | 1623 | #: Keys are identified simply by their lowercase Unicode characters. 1624 | #: For example: a for the A key, [ for the left square bracket key, 1625 | #: etc. For functional keys, such as Enter or Escape, the names are 1626 | #: present at Functional key definitions 1627 | #: . 1628 | #: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt 1629 | #: (opt, option, ⌥), super (cmd, command, ⌘). See also: GLFW mods 1630 | #: 1631 | 1632 | #: On Linux you can also use XKB key names to bind keys that are not 1633 | #: supported by GLFW. See XKB keys 1634 | #: for a list of key names. The name to use is the part 1636 | #: after the XKB_KEY_ prefix. Note that you can only use an XKB key 1637 | #: name for keys that are not known as GLFW keys. 1638 | 1639 | #: Finally, you can use raw system key codes to map keys, again only 1640 | #: for keys that are not known as GLFW keys. To see the system key 1641 | #: code for a key, start kitty with the kitty --debug-input option, 1642 | #: kitty will output some debug text for every key event. In that text 1643 | #: look for native_code, the value of that becomes the key name in the 1644 | #: shortcut. For example: 1645 | 1646 | #: .. code-block:: none 1647 | 1648 | #: on_key_input: glfw key: 0x61 native_code: 0x61 action: PRESS mods: none text: 'a' 1649 | 1650 | #: Here, the key name for the A key is 0x61 and you can use it with:: 1651 | 1652 | #: map ctrl+0x61 something 1653 | 1654 | #: to map Ctrl+A to something. 1655 | 1656 | #: You can use the special action no_op to unmap a keyboard shortcut 1657 | #: that is assigned in the default configuration:: 1658 | 1659 | #: map kitty_mod+space no_op 1660 | 1661 | #: If you would like kitty to completely ignore a key event, not even 1662 | #: sending it to the program running in the terminal, map it to 1663 | #: discard_event:: 1664 | 1665 | #: map kitty_mod+f1 discard_event 1666 | 1667 | #: You can combine multiple actions to be triggered by a single 1668 | #: shortcut with combine action, using the syntax below:: 1669 | 1670 | #: map key combine action1 action2 action3 ... 1671 | 1672 | #: For example:: 1673 | 1674 | #: map kitty_mod+e combine : new_window : next_layout 1675 | 1676 | #: This will create a new window and switch to the next available 1677 | #: layout. 1678 | 1679 | #: You can use multi-key shortcuts with the syntax shown below:: 1680 | 1681 | #: map key1>key2>key3 action 1682 | 1683 | #: For example:: 1684 | 1685 | #: map ctrl+f>2 set_font_size 20 1686 | 1687 | #: The full list of actions that can be mapped to key presses is 1688 | #: available here . 1689 | 1690 | # kitty_mod ctrl+shift 1691 | 1692 | #: Special modifier key alias for default shortcuts. You can change 1693 | #: the value of this option to alter all default shortcuts that use 1694 | #: kitty_mod. 1695 | 1696 | # clear_all_shortcuts no 1697 | 1698 | #: Remove all shortcut definitions up to this point. Useful, for 1699 | #: instance, to remove the default shortcuts. 1700 | 1701 | # action_alias 1702 | 1703 | #: E.g. action_alias launch_tab launch --type=tab --cwd=current 1704 | 1705 | #: Define action aliases to avoid repeating the same options in 1706 | #: multiple mappings. Aliases can be defined for any action and will 1707 | #: be expanded recursively. For example, the above alias allows you to 1708 | #: create mappings to launch a new tab in the current working 1709 | #: directory without duplication:: 1710 | 1711 | #: map f1 launch_tab vim 1712 | #: map f2 launch_tab emacs 1713 | 1714 | #: Similarly, to alias kitten invocation:: 1715 | 1716 | #: action_alias hints kitten hints --hints-offset=0 1717 | 1718 | # kitten_alias 1719 | 1720 | #: E.g. kitten_alias hints hints --hints-offset=0 1721 | 1722 | #: Like action_alias above, but specifically for kittens. Generally, 1723 | #: prefer to use action_alias. This option is a legacy version, 1724 | #: present for backwards compatibility. It causes all invocations of 1725 | #: the aliased kitten to be substituted. So the example above will 1726 | #: cause all invocations of the hints kitten to have the --hints- 1727 | #: offset=0 option applied. 1728 | 1729 | #: Clipboard {{{ 1730 | 1731 | #: Copy to clipboard 1732 | 1733 | # map kitty_mod+c copy_to_clipboard 1734 | # map cmd+c copy_to_clipboard 1735 | 1736 | #:: There is also a copy_or_interrupt action that can be optionally 1737 | #:: mapped to Ctrl+C. It will copy only if there is a selection and 1738 | #:: send an interrupt otherwise. Similarly, 1739 | #:: copy_and_clear_or_interrupt will copy and clear the selection or 1740 | #:: send an interrupt if there is no selection. 1741 | 1742 | #: Paste from clipboard 1743 | 1744 | # map kitty_mod+v paste_from_clipboard 1745 | # map cmd+v paste_from_clipboard 1746 | 1747 | #: Paste from selection 1748 | 1749 | # map kitty_mod+s paste_from_selection 1750 | # map shift+insert paste_from_selection 1751 | 1752 | #: Pass selection to program 1753 | 1754 | # map kitty_mod+o pass_selection_to_program 1755 | 1756 | #:: You can also pass the contents of the current selection to any 1757 | #:: program with pass_selection_to_program. By default, the system's 1758 | #:: open program is used, but you can specify your own, the selection 1759 | #:: will be passed as a command line argument to the program. For 1760 | #:: example:: 1761 | 1762 | #:: map kitty_mod+o pass_selection_to_program firefox 1763 | 1764 | #:: You can pass the current selection to a terminal program running 1765 | #:: in a new kitty window, by using the @selection placeholder:: 1766 | 1767 | #:: map kitty_mod+y new_window less @selection 1768 | 1769 | #: }}} 1770 | 1771 | #: Scrolling {{{ 1772 | 1773 | #: Scroll line up 1774 | 1775 | # map kitty_mod+up scroll_line_up 1776 | # map kitty_mod+k scroll_line_up 1777 | # map opt+cmd+page_up scroll_line_up 1778 | # map cmd+up scroll_line_up 1779 | 1780 | #: Scroll line down 1781 | 1782 | # map kitty_mod+down scroll_line_down 1783 | # map kitty_mod+j scroll_line_down 1784 | # map opt+cmd+page_down scroll_line_down 1785 | # map cmd+down scroll_line_down 1786 | 1787 | #: Scroll page up 1788 | 1789 | # map kitty_mod+page_up scroll_page_up 1790 | # map cmd+page_up scroll_page_up 1791 | 1792 | #: Scroll page down 1793 | 1794 | # map kitty_mod+page_down scroll_page_down 1795 | # map cmd+page_down scroll_page_down 1796 | 1797 | #: Scroll to top 1798 | 1799 | # map kitty_mod+home scroll_home 1800 | # map cmd+home scroll_home 1801 | 1802 | #: Scroll to bottom 1803 | 1804 | # map kitty_mod+end scroll_end 1805 | # map cmd+end scroll_end 1806 | 1807 | #: Scroll to previous shell prompt 1808 | 1809 | # map kitty_mod+z scroll_to_prompt -1 1810 | 1811 | #:: Use a parameter of 0 for scroll_to_prompt to scroll to the last 1812 | #:: jumped to or the last clicked position. Requires shell 1813 | #:: integration 1814 | #:: to work. 1815 | 1816 | #: Scroll to next shell prompt 1817 | 1818 | # map kitty_mod+x scroll_to_prompt 1 1819 | 1820 | #: Browse scrollback buffer in pager 1821 | 1822 | # map kitty_mod+h show_scrollback 1823 | 1824 | #:: You can pipe the contents of the current screen and history 1825 | #:: buffer as STDIN to an arbitrary program using launch --stdin- 1826 | #:: source. For example, the following opens the scrollback buffer in 1827 | #:: less in an overlay window:: 1828 | 1829 | #:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R 1830 | 1831 | #:: For more details on piping screen and buffer contents to external 1832 | #:: programs, see launch . 1833 | 1834 | #: Browse output of the last shell command in pager 1835 | 1836 | # map kitty_mod+g show_last_command_output 1837 | 1838 | #:: You can also define additional shortcuts to get the command 1839 | #:: output. For example, to get the first command output on screen:: 1840 | 1841 | #:: map f1 show_first_command_output_on_screen 1842 | 1843 | #:: To get the command output that was last accessed by a keyboard 1844 | #:: action or mouse action:: 1845 | 1846 | #:: map f1 show_last_visited_command_output 1847 | 1848 | #:: You can pipe the output of the last command run in the shell 1849 | #:: using the launch action. For example, the following opens the 1850 | #:: output in less in an overlay window:: 1851 | 1852 | #:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R 1853 | 1854 | #:: To get the output of the first command on the screen, use 1855 | #:: @first_cmd_output_on_screen. To get the output of the last jumped 1856 | #:: to command, use @last_visited_cmd_output. 1857 | 1858 | #:: Requires shell integration 1859 | #:: to work. 1860 | 1861 | #: }}} 1862 | 1863 | #: Window management {{{ 1864 | 1865 | #: New window 1866 | 1867 | # map kitty_mod+enter new_window 1868 | # map cmd+enter new_window 1869 | 1870 | #:: You can open a new kitty window running an arbitrary program, for 1871 | #:: example:: 1872 | 1873 | #:: map kitty_mod+y launch mutt 1874 | 1875 | #:: You can open a new window with the current working directory set 1876 | #:: to the working directory of the current window using:: 1877 | 1878 | #:: map ctrl+alt+enter launch --cwd=current 1879 | 1880 | #:: You can open a new window that is allowed to control kitty via 1881 | #:: the kitty remote control facility with launch --allow-remote- 1882 | #:: control. Any programs running in that window will be allowed to 1883 | #:: control kitty. For example:: 1884 | 1885 | #:: map ctrl+enter launch --allow-remote-control some_program 1886 | 1887 | #:: You can open a new window next to the currently active window or 1888 | #:: as the first window, with:: 1889 | 1890 | #:: map ctrl+n launch --location=neighbor 1891 | #:: map ctrl+f launch --location=first 1892 | 1893 | #:: For more details, see launch 1894 | #:: . 1895 | 1896 | #: New OS window 1897 | 1898 | # map kitty_mod+n new_os_window 1899 | # map cmd+n new_os_window 1900 | 1901 | #:: Works like new_window above, except that it opens a top-level OS 1902 | #:: window. In particular you can use new_os_window_with_cwd to open 1903 | #:: a window with the current working directory. 1904 | 1905 | #: Close window 1906 | 1907 | # map kitty_mod+w close_window 1908 | # map shift+cmd+d close_window 1909 | 1910 | #: Next window 1911 | 1912 | # map kitty_mod+] next_window 1913 | 1914 | #: Previous window 1915 | 1916 | # map kitty_mod+[ previous_window 1917 | 1918 | #: Move window forward 1919 | 1920 | # map kitty_mod+f move_window_forward 1921 | 1922 | #: Move window backward 1923 | 1924 | # map kitty_mod+b move_window_backward 1925 | 1926 | #: Move window to top 1927 | 1928 | # map kitty_mod+` move_window_to_top 1929 | 1930 | #: Start resizing window 1931 | 1932 | # map kitty_mod+r start_resizing_window 1933 | # map cmd+r start_resizing_window 1934 | 1935 | #: First window 1936 | 1937 | # map kitty_mod+1 first_window 1938 | # map cmd+1 first_window 1939 | 1940 | #: Second window 1941 | 1942 | # map kitty_mod+2 second_window 1943 | # map cmd+2 second_window 1944 | 1945 | #: Third window 1946 | 1947 | # map kitty_mod+3 third_window 1948 | # map cmd+3 third_window 1949 | 1950 | #: Fourth window 1951 | 1952 | # map kitty_mod+4 fourth_window 1953 | # map cmd+4 fourth_window 1954 | 1955 | #: Fifth window 1956 | 1957 | # map kitty_mod+5 fifth_window 1958 | # map cmd+5 fifth_window 1959 | 1960 | #: Sixth window 1961 | 1962 | # map kitty_mod+6 sixth_window 1963 | # map cmd+6 sixth_window 1964 | 1965 | #: Seventh window 1966 | 1967 | # map kitty_mod+7 seventh_window 1968 | # map cmd+7 seventh_window 1969 | 1970 | #: Eighth window 1971 | 1972 | # map kitty_mod+8 eighth_window 1973 | # map cmd+8 eighth_window 1974 | 1975 | #: Ninth window 1976 | 1977 | # map kitty_mod+9 ninth_window 1978 | # map cmd+9 ninth_window 1979 | 1980 | #: Tenth window 1981 | 1982 | # map kitty_mod+0 tenth_window 1983 | 1984 | #: Visually select and focus window 1985 | 1986 | # map kitty_mod+f7 focus_visible_window 1987 | 1988 | #:: Display overlay numbers and alphabets on the window, and switch 1989 | #:: the focus to the window when you press the key. When there are 1990 | #:: only two windows, the focus will be switched directly without 1991 | #:: displaying the overlay. You can change the overlay characters and 1992 | #:: their order with option visual_window_select_characters. 1993 | 1994 | #: Visually swap window with another 1995 | 1996 | # map kitty_mod+f8 swap_with_window 1997 | 1998 | #:: Works like focus_visible_window above, but swaps the window. 1999 | 2000 | #: }}} 2001 | 2002 | #: Tab management {{{ 2003 | 2004 | #: Next tab 2005 | 2006 | # map kitty_mod+right next_tab 2007 | # map shift+cmd+] next_tab 2008 | # map ctrl+tab next_tab 2009 | 2010 | #: Previous tab 2011 | 2012 | # map kitty_mod+left previous_tab 2013 | # map shift+cmd+[ previous_tab 2014 | # map ctrl+shift+tab previous_tab 2015 | 2016 | #: New tab 2017 | 2018 | # map kitty_mod+t new_tab 2019 | # map cmd+t new_tab 2020 | 2021 | #: Close tab 2022 | 2023 | # map kitty_mod+q close_tab 2024 | # map cmd+w close_tab 2025 | 2026 | #: Close OS window 2027 | 2028 | # map shift+cmd+w close_os_window 2029 | 2030 | #: Move tab forward 2031 | 2032 | # map kitty_mod+. move_tab_forward 2033 | 2034 | #: Move tab backward 2035 | 2036 | # map kitty_mod+, move_tab_backward 2037 | 2038 | #: Set tab title 2039 | 2040 | # map kitty_mod+alt+t set_tab_title 2041 | # map shift+cmd+i set_tab_title 2042 | 2043 | 2044 | #: You can also create shortcuts to go to specific tabs, with 1 being 2045 | #: the first tab, 2 the second tab and -1 being the previously active 2046 | #: tab, and any number larger than the last tab being the last tab:: 2047 | 2048 | #: map ctrl+alt+1 goto_tab 1 2049 | #: map ctrl+alt+2 goto_tab 2 2050 | 2051 | #: Just as with new_window above, you can also pass the name of 2052 | #: arbitrary commands to run when using new_tab and new_tab_with_cwd. 2053 | #: Finally, if you want the new tab to open next to the current tab 2054 | #: rather than at the end of the tabs list, use:: 2055 | 2056 | #: map ctrl+t new_tab !neighbor [optional cmd to run] 2057 | #: }}} 2058 | 2059 | #: Layout management {{{ 2060 | 2061 | #: Next layout 2062 | 2063 | # map kitty_mod+l next_layout 2064 | 2065 | 2066 | #: You can also create shortcuts to switch to specific layouts:: 2067 | 2068 | #: map ctrl+alt+t goto_layout tall 2069 | #: map ctrl+alt+s goto_layout stack 2070 | 2071 | #: Similarly, to switch back to the previous layout:: 2072 | 2073 | #: map ctrl+alt+p last_used_layout 2074 | 2075 | #: There is also a toggle_layout action that switches to the named 2076 | #: layout or back to the previous layout if in the named layout. 2077 | #: Useful to temporarily "zoom" the active window by switching to the 2078 | #: stack layout:: 2079 | 2080 | #: map ctrl+alt+z toggle_layout stack 2081 | #: }}} 2082 | 2083 | #: Font sizes {{{ 2084 | 2085 | #: You can change the font size for all top-level kitty OS windows at 2086 | #: a time or only the current one. 2087 | 2088 | #: Increase font size 2089 | 2090 | # map kitty_mod+equal change_font_size all +2.0 2091 | # map kitty_mod+plus change_font_size all +2.0 2092 | # map kitty_mod+kp_add change_font_size all +2.0 2093 | # map cmd+plus change_font_size all +2.0 2094 | # map cmd+equal change_font_size all +2.0 2095 | # map shift+cmd+equal change_font_size all +2.0 2096 | 2097 | #: Decrease font size 2098 | 2099 | # map kitty_mod+minus change_font_size all -2.0 2100 | # map kitty_mod+kp_subtract change_font_size all -2.0 2101 | # map cmd+minus change_font_size all -2.0 2102 | # map shift+cmd+minus change_font_size all -2.0 2103 | 2104 | #: Reset font size 2105 | 2106 | # map kitty_mod+backspace change_font_size all 0 2107 | # map cmd+0 change_font_size all 0 2108 | 2109 | 2110 | #: To setup shortcuts for specific font sizes:: 2111 | 2112 | #: map kitty_mod+f6 change_font_size all 10.0 2113 | 2114 | #: To setup shortcuts to change only the current OS window's font 2115 | #: size:: 2116 | 2117 | #: map kitty_mod+f6 change_font_size current 10.0 2118 | #: }}} 2119 | 2120 | #: Select and act on visible text {{{ 2121 | 2122 | #: Use the hints kitten to select text and either pass it to an 2123 | #: external program or insert it into the terminal or copy it to the 2124 | #: clipboard. 2125 | 2126 | #: Open URL 2127 | 2128 | # map kitty_mod+e open_url_with_hints 2129 | 2130 | #:: Open a currently visible URL using the keyboard. The program used 2131 | #:: to open the URL is specified in open_url_with. 2132 | 2133 | #: Insert selected path 2134 | 2135 | # map kitty_mod+p>f kitten hints --type path --program - 2136 | 2137 | #:: Select a path/filename and insert it into the terminal. Useful, 2138 | #:: for instance to run git commands on a filename output from a 2139 | #:: previous git command. 2140 | 2141 | #: Open selected path 2142 | 2143 | # map kitty_mod+p>shift+f kitten hints --type path 2144 | 2145 | #:: Select a path/filename and open it with the default open program. 2146 | 2147 | #: Insert selected line 2148 | 2149 | # map kitty_mod+p>l kitten hints --type line --program - 2150 | 2151 | #:: Select a line of text and insert it into the terminal. Useful for 2152 | #:: the output of things like: `ls -1`. 2153 | 2154 | #: Insert selected word 2155 | 2156 | # map kitty_mod+p>w kitten hints --type word --program - 2157 | 2158 | #:: Select words and insert into terminal. 2159 | 2160 | #: Insert selected hash 2161 | 2162 | # map kitty_mod+p>h kitten hints --type hash --program - 2163 | 2164 | #:: Select something that looks like a hash and insert it into the 2165 | #:: terminal. Useful with git, which uses SHA1 hashes to identify 2166 | #:: commits. 2167 | 2168 | #: Open the selected file at the selected line 2169 | 2170 | # map kitty_mod+p>n kitten hints --type linenum 2171 | 2172 | #:: Select something that looks like filename:linenum and open it in 2173 | #:: vim at the specified line number. 2174 | 2175 | #: Open the selected hyperlink 2176 | 2177 | # map kitty_mod+p>y kitten hints --type hyperlink 2178 | 2179 | #:: Select a hyperlink (i.e. a URL that has been marked as such by 2180 | #:: the terminal program, for example, by `ls --hyperlink=auto`). 2181 | 2182 | 2183 | #: The hints kitten has many more modes of operation that you can map 2184 | #: to different shortcuts. For a full description see hints kitten 2185 | #: . 2186 | #: }}} 2187 | 2188 | #: Miscellaneous {{{ 2189 | 2190 | #: Show documentation 2191 | 2192 | # map kitty_mod+f1 show_kitty_doc overview 2193 | 2194 | #: Toggle fullscreen 2195 | 2196 | # map kitty_mod+f11 toggle_fullscreen 2197 | # map ctrl+cmd+f toggle_fullscreen 2198 | 2199 | #: Toggle maximized 2200 | 2201 | # map kitty_mod+f10 toggle_maximized 2202 | 2203 | #: Toggle macOS secure keyboard entry 2204 | 2205 | # map opt+cmd+s toggle_macos_secure_keyboard_entry 2206 | 2207 | #: Unicode input 2208 | 2209 | # map kitty_mod+u kitten unicode_input 2210 | # map ctrl+cmd+space kitten unicode_input 2211 | 2212 | #: Edit config file 2213 | 2214 | # map kitty_mod+f2 edit_config_file 2215 | # map cmd+, edit_config_file 2216 | 2217 | #: Open the kitty command shell 2218 | 2219 | # map kitty_mod+escape kitty_shell window 2220 | 2221 | #:: Open the kitty shell in a new window / tab / overlay / os_window 2222 | #:: to control kitty using commands. 2223 | 2224 | #: Increase background opacity 2225 | 2226 | # map kitty_mod+a>m set_background_opacity +0.1 2227 | 2228 | #: Decrease background opacity 2229 | 2230 | # map kitty_mod+a>l set_background_opacity -0.1 2231 | 2232 | #: Make background fully opaque 2233 | 2234 | # map kitty_mod+a>1 set_background_opacity 1 2235 | 2236 | #: Reset background opacity 2237 | 2238 | # map kitty_mod+a>d set_background_opacity default 2239 | 2240 | #: Reset the terminal 2241 | 2242 | # map kitty_mod+delete clear_terminal reset active 2243 | # map opt+cmd+r clear_terminal reset active 2244 | 2245 | #:: You can create shortcuts to clear/reset the terminal. For 2246 | #:: example:: 2247 | 2248 | #:: # Reset the terminal 2249 | #:: map f1 clear_terminal reset active 2250 | #:: # Clear the terminal screen by erasing all contents 2251 | #:: map f1 clear_terminal clear active 2252 | #:: # Clear the terminal scrollback by erasing it 2253 | #:: map f1 clear_terminal scrollback active 2254 | #:: # Scroll the contents of the screen into the scrollback 2255 | #:: map f1 clear_terminal scroll active 2256 | #:: # Clear everything up to the line with the cursor 2257 | #:: map f1 clear_terminal to_cursor active 2258 | 2259 | #:: If you want to operate on all kitty windows instead of just the 2260 | #:: current one, use all instead of active. 2261 | 2262 | #:: Some useful functions that can be defined in the shell rc files 2263 | #:: to perform various kinds of clearing of the current window: 2264 | 2265 | #:: .. code-block:: sh 2266 | 2267 | #:: clear-only-screen() { 2268 | #:: printf "\e[H\e[2J" 2269 | #:: } 2270 | 2271 | #:: clear-screen-and-scrollback() { 2272 | #:: printf "\e[H\e[3J" 2273 | #:: } 2274 | 2275 | #:: clear-screen-saving-contents-in-scrollback() { 2276 | #:: printf "\e[H\e[22J" 2277 | #:: } 2278 | 2279 | #:: For instance, using these escape codes, it is possible to remap 2280 | #:: Ctrl+L to both scroll the current screen contents into the 2281 | #:: scrollback buffer and clear the screen, instead of just clearing 2282 | #:: the screen. For ZSH, in ~/.zshrc, add: 2283 | 2284 | #:: .. code-block:: zsh 2285 | 2286 | #:: ctrl_l() { 2287 | #:: builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY" 2288 | #:: builtin zle .reset-prompt 2289 | #:: builtin zle -R 2290 | #:: } 2291 | #:: zle -N ctrl_l 2292 | #:: bindkey '^l' ctrl_l 2293 | 2294 | #: Clear up to cursor line 2295 | 2296 | # map cmd+k clear_terminal to_cursor active 2297 | 2298 | #: Reload kitty.conf 2299 | 2300 | # map kitty_mod+f5 load_config_file 2301 | # map ctrl+cmd+, load_config_file 2302 | 2303 | #:: Reload kitty.conf, applying any changes since the last time it 2304 | #:: was loaded. Note that a handful of options cannot be dynamically 2305 | #:: changed and require a full restart of kitty. Particularly, when 2306 | #:: changing shortcuts for actions located on the macOS global menu 2307 | #:: bar, a full restart is needed. You can also map a keybinding to 2308 | #:: load a different config file, for example:: 2309 | 2310 | #:: map f5 load_config /path/to/alternative/kitty.conf 2311 | 2312 | #:: Note that all options from the original kitty.conf are discarded, 2313 | #:: in other words the new configuration *replace* the old ones. 2314 | 2315 | #: Debug kitty configuration 2316 | 2317 | # map kitty_mod+f6 debug_config 2318 | # map opt+cmd+, debug_config 2319 | 2320 | #:: Show details about exactly what configuration kitty is running 2321 | #:: with and its host environment. Useful for debugging issues. 2322 | 2323 | #: Send arbitrary text on key presses 2324 | 2325 | #:: E.g. map ctrl+shift+alt+h send_text all Hello World 2326 | 2327 | #:: You can tell kitty to send arbitrary (UTF-8) encoded text to the 2328 | #:: client program when pressing specified shortcut keys. For 2329 | #:: example:: 2330 | 2331 | #:: map ctrl+alt+a send_text all Special text 2332 | 2333 | #:: This will send "Special text" when you press the Ctrl+Alt+A key 2334 | #:: combination. The text to be sent decodes ANSI C escapes 2335 | #:: so you can use escapes like \e to send control 2337 | #:: codes or \u21fb to send Unicode characters (or you can just input 2338 | #:: the Unicode characters directly as UTF-8 text). You can use 2339 | #:: `kitty +kitten show_key` to get the key escape codes you want to 2340 | #:: emulate. 2341 | 2342 | #:: The first argument to send_text is the keyboard modes in which to 2343 | #:: activate the shortcut. The possible values are normal, 2344 | #:: application, kitty or a comma separated combination of them. The 2345 | #:: modes normal and application refer to the DECCKM cursor key mode 2346 | #:: for terminals, and kitty refers to the kitty extended keyboard 2347 | #:: protocol. The special value all means all of them. 2348 | 2349 | #:: Some more examples:: 2350 | 2351 | #:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) 2352 | #:: map ctrl+alt+a send_text normal Word\e[H 2353 | #:: map ctrl+alt+a send_text application Word\eOH 2354 | #:: # Run a command at a shell prompt (like typing the command and pressing Enter) 2355 | #:: map ctrl+alt+a send_text normal,application some command with arguments\r 2356 | 2357 | #: Open kitty Website 2358 | 2359 | # map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ 2360 | 2361 | #: Hide macOS kitty application 2362 | 2363 | # map cmd+h hide_macos_app 2364 | 2365 | #: Hide macOS other applications 2366 | 2367 | # map opt+cmd+h hide_macos_other_apps 2368 | 2369 | #: Minimize macOS window 2370 | 2371 | # map cmd+m minimize_macos_window 2372 | 2373 | #: Quit kitty 2374 | 2375 | # map cmd+q quit 2376 | 2377 | #: }}} 2378 | 2379 | #: }}} 2380 | 2381 | 2382 | 2383 | # BEGIN_KITTY_THEME 2384 | # Everforest Light Medium 2385 | include current-theme.conf 2386 | # END_KITTY_THEME 2387 | 2388 | # Tab management 2389 | 2390 | map ctrl+t launch --cwd=current --type=tab 2391 | --------------------------------------------------------------------------------