Code Monkey home page Code Monkey logo

my-kitty-config's Introduction

my-kitty-config

the kitty config for tmux users

the shortcuts (key bindings) is heavily inspired by Oh my tmux!

mainly used under Linux

usage

# backup your config first
# mv ~/.config/kitty  ~/.config/kitty.bak

git clone https://github.com/ttys3/my-kitty-config.git ~/.config/kitty

suggested shell alias

alias icat="kitty +kitten icat"
alias s="kitty +kitten icat"

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 previus 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

if you have used ctrl+a>s generate the session, you do not need this.

you can create your session file under ~/.config/kitty, let's say the filename is session.conf

change startup_session none to startup_session session.conf

create session.conf like this:

new_tab home
layout splits
cd ~
launch zsh
focus

new_tab work
cd ~/work
launch zsh

new_tab nvim
cd ~/.config/nvim
launch zsh

new_tab go
cd ~/repo/go
launch zsh

new_tab rust
cd ~/repo/rust
launch zsh

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

the behavior of listen_on differs from the behavior of --listen-on cli flag.

the cli one is exactly the same.

the config file one will append a random postfix to the socket name, this is strange logic.

start kitty:

kitty -o allow_remote_control=yes --listen-on unix:/run/user/1000/kitty.sock

on other terminal:

 kitty @ --to unix:/run/user/1000/kitty.sock launch --type=tab --cwd "/tmp" --tab-title "My Tab" --keep-focus bash

my-kitty-config's People

Contributors

ttys3 avatar ir35e7i avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.