From c9332fc3e99d10deacc128d96b7d95c5b71eb329 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Sat, 13 Apr 2024 12:27:51 +0200 Subject: [PATCH] kitty: add tab keybinds --- files/kitty/.config/kitty/kitty.conf | 37 ++++++++++++++++++++++++++-- files/shell/.shellrc.alias | 3 ++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/files/kitty/.config/kitty/kitty.conf b/files/kitty/.config/kitty/kitty.conf index 586839e..5637eaf 100644 --- a/files/kitty/.config/kitty/kitty.conf +++ b/files/kitty/.config/kitty/kitty.conf @@ -893,7 +893,7 @@ hide_window_decorations yes #: insensitive, from the set [0-9A-Z]. Specify your preference as a #: string of characters. -confirm_os_window_close 0 +confirm_os_window_close 1 #: Ask for confirmation when closing an OS window or a tab with at #: least this number of kitty windows in it by window manager (e.g. @@ -2390,7 +2390,40 @@ term xterm-256color #: }}} -map ctrl+shift+t launch --cwd=current --type=tab +# Tab management +map ctrl+t launch --cwd=current --type=tab +map ctrl+shift+t launch --type=tab + +map alt+1 goto_tab 1 +map alt+2 goto_tab 2 +map alt+3 goto_tab 3 +map alt+4 goto_tab 4 +map alt+5 goto_tab 5 +map alt+6 goto_tab 6 +map alt+7 goto_tab 7 +map alt+8 goto_tab 8 +map alt+9 goto_tab 8 +map alt+0 goto_tab 0 + +# Window management +map ctrl+enter new_window_with_cwd +enabled_layouts tall,stack +map alt+f toggle_layout stack + +map alt+shift+k move_window up +map alt+shift+h move_window left +map alt+shift+l move_window right +map alt+shift+j move_window down +map alt+k neighboring_window up +map alt+h neighboring_window left +map alt+l neighboring_window right +map alt+j neighboring_window down +map ctrl+left resize_window narrower +map ctrl+right resize_window wider +map ctrl+up resize_window taller +map ctrl+down resize_window shorter +map ctrl+backspace resize_window reset + # BEGIN_KITTY_THEME diff --git a/files/shell/.shellrc.alias b/files/shell/.shellrc.alias index 9cba795..24f906e 100644 --- a/files/shell/.shellrc.alias +++ b/files/shell/.shellrc.alias @@ -19,9 +19,10 @@ alias dh1='du . -h -d1' alias dhs='du . -hs' alias diff_dir='diff -qr' alias g='git' -alias l='eza --icons' +alias l='eza --icons --hyperlink' alias nd="nix develop ." alias nssh='SSH_AUTH_SOCK= ssh' +alias s='kitten ssh' alias o='xdg-open' # to change a mime use: `xdg-mime default APPLICATION HANDLE` t(){ tmux new-session -A -s ${1:-dev}