Skip to content

ttys3/oh-my-kitty

Repository files navigation

Oh 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:

  1. switch between sessions
  2. delete session
  3. rename session
  4. 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

You 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 font
  • font_size - Adjust font size
  • background_opacity - Set transparency
  • background_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.

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.

About

Oh my kitty! (the kitty config for tmux users)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages