oh-my-kitty
Oh my kitty! (the kitty config for tmux users)
git clone https://github.com/ttys3/oh-my-kitty.gitttys3/oh-my-kittyOh my kitty!
the kitty config for tmux users
the shortcuts (key bindings) is heavily inspired by Oh my tmux!
mainly used under Linux
new features
session support
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-session
TODO: more session management features like:
- switch between sessions
- delete session
- rename session
- list sessions
usage
# 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 file
customization
override default config
⚠️ Breaking change: the local override file was renamed from the per-user
${USER}.local.conf(e.g.alice.local.conf) to a fixed namemy.local.conf, and it is now pulled in withglobincludeinstead ofinclude. If you already had a${USER}.local.conf, rename it after pulling this update — otherwise your overrides silently stop loading (globincludeskips the missing old file without any warning):mv ~/.config/kitty/${USER}.local.conf ~/.config/kitty/my.local.conf
You can override any default setting in a git-ignored local config file: my.local.conf. It is pulled in at the end of kitty.conf via globinclude my.local.conf, so any settings in it override the defaults — letting you customize kitty without touching the tracked config, which keeps the base config easy to update. Because it uses globinclude, kitty silently skips the file when it does not exist, so creating it is optional.
A tracked template my.local.conf.example ships with the repo — copy it to get started:
cp ~/.config/kitty/my.local.conf.example ~/.config/kitty/my.local.conf
Example: Override font family and size
# ~/.config/kitty/my.local.conf 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 my.local.conf, reload the config with ctrl+a>R or restart kitty.
suggested shell alias
alias icat="kitten icat" alias s="kitten ssh" alias d="kitten diff"
Shortcuts
key name see https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
or using kitty --debug-input to detect keysyms
config
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 |
session
| key | description |
|---|---|
| ctrl+a>s | save current layout to session file |
tab
| 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 |
os window
| key | description |
|---|---|
| ctrl+q | quit kitty |
| f11 | toggle fullscreen |
window
| 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 |
font
| key | description |
|---|---|
| ctrl+= | font size + |
| ctrl+- | font size - |
| ctrl+0 | font size reset |
misc
| 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) |
session restore
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.
kitty docs
Keyboard shortcuts https://sw.kovidgoyal.net/kitty/conf/#keyboard-shortcuts
The launch command syntax reference https://sw.kovidgoyal.net/kitty/launch/#syntax-reference
troubleshooting
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-session
and then you can use ctrl+a>s to save the current session to the session file, it will not ask you again.
fonts
macOS
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-font
Iosevka is a good font for coding, you can install it via:
brew install --cask font-iosevka
Lilex is a good font for coding, you can install it via:
brew install --cask font-lilex
Linux
donwload and put the fonts to ~/.local/share/fonts then run fc-cache -f -v to refresh the font cache.
more like this