the kitty config for tmux users
the shortcuts (key bindings) is heavily inspired by Oh my tmux!
mainly used under Linux
kitty >= 0.43 finally support session save and allow you to switch between sessions.
we now support save current session to the session file via single keypress ctrl+a>s.
you 'll need to create a default session file for the first time.
touch ~/.config/kitty/default.kitty-sessionTODO: more session management features like:
- switch between sessions
- delete session
- rename session
- list sessions
# backup your config first
# mv ~/.config/kitty ~/.config/kitty.bak
git clone https://github.com/ttys3/oh-my-kitty.git ~/.config/kitty
touch ~/.config/kitty/default.kitty-session # create a default session fileYou can override any default settings by creating a local config file: ${USER}.local.conf (e.g., ttys3.local.conf if your username is ttys3).
This file is automatically included at the end of kitty.conf, so any settings in it will override the defaults. This allows you to customize your kitty configuration without modifying the main config file, making it easier to update the base config.
Example: Override font family and size
Create ~/.config/kitty/${USER}.local.conf (replace ${USER} with your actual username):
# Override font settings
font_family Lilex
font_size 13.0
You can override any kitty setting in this file. Common customizations include:
font_family- Change the fontfont_size- Adjust font sizebackground_opacity- Set transparencybackground_image- Set background image- And any other kitty configuration option
After creating or modifying ${USER}.local.conf, reload the config with ctrl+a>R or restart kitty.
alias icat="kitten icat"
alias s="kitten ssh"
alias d="kitten diff"key name see https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
or using kitty --debug-input to detect keysyms
keybindings explain:
ctrl+a>R means:
press ctrl + a in the same time, release and then, press R (shift+r)
| key | description |
|---|---|
| ctrl+a>R | reload config |
| ctrl+a>E | edit config |
| ctrl+a>D | debug config |
| key | description |
|---|---|
| ctrl+a>s | save current layout to session file |
| key | description |
|---|---|
| ctrl+shift+← | goto previous tab |
| ctrl+shift+→ | goto next tab |
| ctrl+shift+, | move tab backward |
| ctrl+shift+. | move tab forward |
| ctrl+a>, | change tab title |
| ctrl+a>c | create new tab |
| ctrl+a>x | close window / tab |
| key | description |
|---|---|
| ctrl+q | quit kitty |
| f11 | toggle fullscreen |
| key | description |
|---|---|
| ctrl+a>- | horizontal split with cwd |
| ctrl+a>shift+- | horizontal split |
| ctrl+a>\ | vertial split with cwd |
| ctrl+a>shift+\ | vertial split |
| ctrl+a>x | close window |
| ctrl+a>z | zoom (maxmize) window |
| ctrl+shift+r | resize window |
| ctrl+← | goto left window |
| ctrl+→ | goto right window |
| ctrl+↑ | goto up window |
| ctrl+↓ | goto down window |
| ctrl+a>h | goto left window |
| ctrl+a>l | goto right window |
| ctrl+a>k | goto up window |
| ctrl+a>j | goto down window |
| shift+← | move current window to left |
| shift+→ | move current window to right |
| shift+↑ | move current window to up |
| shift+↓ | move current window to down |
| alt+n | resize window narrower |
| alt+w | resize window wider |
| alt+u | resize window taller |
| alt+d | resize window shorter |
| ctrl+home | resize window reset |
| key | description |
|---|---|
| ctrl+= | font size + |
| ctrl+- | font size - |
| ctrl+0 | font size reset |
| key | description |
|---|---|
| ctrl+a>t | kitten themes |
| ctrl+a>space | copy pasting with hints like tmux-thumbs |
| ctrl+a>ctrl+a | send real ctrl+a (emacs shortcut Home) |
this config has been enabled by default in this config.
you can use ctrl+a>s to save the current session to the session file.
which will save the current session to the session file under ~/.config/kitty/session.conf
kitty has long had support for Sessions, aka simple text files where you can define what tabs, windows and programs you wish to run in kitty. Now in addition to that kitty has the ability to create and switch between sessions with a single keypress and also to manually setup some tabs/windows in kitty and save it as a session file, for seamless and intuitive session file creation.
Keyboard shortcuts https://sw.kovidgoyal.net/kitty/conf/#keyboard-shortcuts
The launch command syntax reference https://sw.kovidgoyal.net/kitty/launch/#syntax-reference
kitty ask me where to save the session file?
you can just create a empty file for the first time:
touch ~/.config/kitty/default.kitty-sessionand then you can use ctrl+a>s to save the current session to the session file, it will not ask you again.
macOS user fonts is under ~/Library/Fonts
Iosevka Term is a good font for terminal, you can install it via:
brew install --cask font-iosevka-term-nerd-fontIosevka is a good font for coding, you can install it via:
brew install --cask font-iosevkaLilex is a good font for coding, you can install it via:
brew install --cask font-lilexdonwload and put the fonts to ~/.local/share/fonts then run fc-cache -f -v to refresh the font cache.