From 9061b8565008bd70b27a62a0bc5555723c228f49 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Sun, 25 Dec 2022 10:14:30 +0100 Subject: [PATCH] feat(kitty): add maps to easily access tmux maps --- kitty/kitty.conf | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ tmux.conf | 7 ++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/kitty/kitty.conf b/kitty/kitty.conf index d259c59..fd9377f 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -40,6 +40,54 @@ map ctrl+alt+i send_text all \x02\x69 map ctrl+alt+d send_text all \x02\x64 # (z)oom map ctrl+alt+z send_text all \x02\x7a +# t (new tab) +map ctrl+alt+t send_text all \x02\x63 +# O (LF Terminal File Manager) +map ctrl+alt+f send_text all \x02\x4f +# v (Rename) +map ctrl+alt+, send_text all \x02\x76 +# G (Lazygit) +map ctrl+alt+g send_text all \x02\x47 +# F (Telescope Find) +map ctrl+alt+s send_text all \x02\x46 +# s (Switch to Session) +map ctrl+alt+k send_text all \x02\x73 +# 1 (Jump to Window 1) +map ctrl+alt+1 send_text all \x02\x31 +# 2 (Jump to Window 2) +map ctrl+alt+2 send_text all \x02\x32 +# 3 (Jump to Window 3) +map ctrl+alt+3 send_text all \x02\x33 +# 4 (Jump to Window 4) +map ctrl+alt+4 send_text all \x02\x34 +# 5 (Jump to Window 5) +map ctrl+alt+5 send_text all \x02\x35 +# 6 (Jump to Window 6) +map ctrl+alt+6 send_text all \x02\x36 +# 7 (Jump to Window 7) +map ctrl+alt+7 send_text all \x02\x37 +# 8 (Jump to Window 8) +map ctrl+alt+8 send_text all \x02\x38 +# 9 (Jump to Window 9) +map ctrl+alt+9 send_text all \x02\x39 +# R (Jump to Last tmux Session) +map ctrl+alt+l send_text all \x02\x52 +# b (Previous Window) +map ctrl+alt+[ send_text all \x02\x62 +# n (Next Window) +map ctrl+alt+] send_text all \x02\x6e +# " (New Horizontal Pane) +map ctrl+alt+n send_text all \x02\x22 +# % (New Vertical Pane) +map ctrl+alt+shift+n send_text all \x02\x25 +# d (Detach tmux) +map ctrl+alt+q send_text all \x02\x64 +# : (Command Mode) +map ctrl+alt+; send_text all \x02\x3a +# ! (Move Pane to New Window) +map ctrl+alt+t send_text all \x02\x21 +# x (Close Pane) +map ctrl+alt+w send_text all \x02\x78 # BEGIN_KITTY_THEME # Tokyo Night diff --git a/tmux.conf b/tmux.conf index 2c88f06..2aa12bf 100644 --- a/tmux.conf +++ b/tmux.conf @@ -12,6 +12,9 @@ setw -g pane-base-index 1 set -g automatic-rename on set-option -g automatic-rename-format "#(tmux-icon-name #{pane_current_command})" +# Rename the current window +bind-key v command-prompt "rename-window '%%'" + # Base index for panes set-window-option -g pane-base-index 1 @@ -62,7 +65,6 @@ set -g window-status-current-format "#[fg=magenta,bold,bg=default] #I #W #{?wind set -g window-status-separator "" set -g window-status-format "#[fg=white,bg=default] #I #W #{?window_bell_flag,,} " - # Change the default delay set -sg escape-time 0 @@ -90,6 +92,9 @@ bind-key x kill-pane # Lazygit bind G new-window -c "#{pane_current_path}" -n "" lazygit +# LF Terminal File Manager +bind O new-window -c "#{pane_current_path}" -n "" lf + # Run Neovim Telescope find files bind F run-shell "nvr-tmux --remote-send ':Telescope find_files'"