Created
October 3, 2023 15:40
-
-
Save kolemannix/3d18d0f22b90edda9ce896626dd15f56 to your computer and use it in GitHub Desktop.
kitty_like_tmux_snippet.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Emulate tmux default bindings for tabs | |
# n and p for next/prev | |
map ctrl+a>n next_tab | |
map ctrl+a>p previous_tab | |
map ctrl+a>, set_tab_title | |
# 'c' for create | |
map ctrl+a>c new_tab | |
map ctrl+a>x close_tab | |
# 'zoom' in tmux | |
map ctrl+a>z toggle_layout stack | |
map ctrl+a>- launch --location=hsplit | |
map ctrl+a>| launch --location=vsplit | |
map ctrl+a>1 goto_tab 1 | |
map ctrl+a>2 goto_tab 2 | |
map ctrl+a>3 goto_tab 3 | |
map ctrl+a>4 goto_tab 4 | |
map ctrl+a>5 goto_tab 5 | |
map ctrl+a>6 goto_tab 6 | |
map ctrl+a>7 goto_tab 7 | |
map ctrl+a>8 goto_tab 8 | |
map ctrl+a>9 goto_tab 9 | |
# [d]etach new session from cwd | |
map ctrl+a>d launch --cwd=current | |
# Windows | |
map ctrl+a>w focus_visible_window | |
map ctrl+a>j neighboring_window down | |
map ctrl+a>k neighboring_window up | |
map ctrl+a>l neighboring_window right | |
map ctrl+a>h neighboring_window left | |
# This is a WIP attempt at cross-session tab search using fzf. Had to pipe through a tmpfile to get it to work... so its slow but it works | |
map ctrl+a>s launch --type=overlay zsh -ic "kitty @ ls | jq -r '.[0].tabs | map(.title) | .[]' > /tmp/kttitle; cat /tmp/kttitle | fzf | xargs -I _ kitty @ focus-tab --match title:_" | |
# I also use just these layouts; splits lets me actually manage my splits like in tmux; stack is 'zoomed' to one. | |
# stack must be at least enabled for the ctrl+a -> z binding to work | |
enabled_layouts splits, stack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment