From 4971f085602ceaafd90bd9b0d6d2bc2c4fc087fc Mon Sep 17 00:00:00 2001 From: Ty Smith Date: Tue, 14 Jul 2026 19:33:09 -0700 Subject: [PATCH] terminals: adopt omarchy CSI-u Shift+Enter keybinds and tmux pane controls Omarchy 3.8.3 migration 1783833508 edited the live configs: Alt+Enter / Alt+Shift+Enter pane splits, M-Escape kill-pane, terminal titles, and kitty extkeys in tmux.conf, plus CSI-u Shift+Enter / Alt+Shift+Enter encodings in ghostty and kitty. Sync them into the chezmoi source so 'chezmoi apply' doesn't revert them. Co-Authored-By: Claude Fable 5 --- dot_config/ghostty/config.tmpl | 4 ++++ dot_config/kitty/kitty.conf | 4 ++++ dot_config/tmux/tmux.conf | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/dot_config/ghostty/config.tmpl b/dot_config/ghostty/config.tmpl index 5fec8bd..39be2bd 100644 --- a/dot_config/ghostty/config.tmpl +++ b/dot_config/ghostty/config.tmpl @@ -31,6 +31,10 @@ shell-integration-features = no-cursor,ssh-env # Keyboard bindings keybind = shift+insert=paste_from_clipboard keybind = control+insert=copy_to_clipboard +# Send Shift+Enter as CSI-u so TUIs can distinguish it from Enter. +keybind = shift+enter=csi:13;2u +# Legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter. +keybind = alt+shift+enter=csi:13;4u keybind = super+control+shift+alt+arrow_down=resize_split:down,100 keybind = super+control+shift+alt+arrow_up=resize_split:up,100 keybind = super+control+shift+alt+arrow_left=resize_split:left,100 diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf index ba4d075..9a8daea 100644 --- a/dot_config/kitty/kitty.conf +++ b/dot_config/kitty/kitty.conf @@ -17,6 +17,10 @@ confirm_os_window_close 0 # Keybindings map ctrl+insert copy_to_clipboard map shift+insert paste_from_clipboard +# Send Shift+Enter as CSI-u so TUIs can distinguish it from Enter. +map shift+enter send_text all \e[13;2u +# Kitty legacy encoding sends Alt+Shift+Enter the same as Alt+Enter; send CSI-u so tmux can match M-S-Enter. +map alt+shift+enter send_text all \e[13;4u # Allow remote access allow_remote_control yes diff --git a/dot_config/tmux/tmux.conf b/dot_config/tmux/tmux.conf index d1b7968..aee7847 100644 --- a/dot_config/tmux/tmux.conf +++ b/dot_config/tmux/tmux.conf @@ -12,6 +12,9 @@ bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send -X copy-selection-and-cancel # Pane Controls +bind -n M-Enter split-window -v -c "#{pane_current_path}" +bind -n M-S-Enter split-window -h -c "#{pane_current_path}" +bind -n M-Escape kill-pane bind h split-window -v -c "#{pane_current_path}" bind v split-window -h -c "#{pane_current_path}" bind x kill-pane @@ -72,6 +75,7 @@ setw -g aggressive-resize on set -g detach-on-destroy off set -g extended-keys on set -g extended-keys-format csi-u +set -ag terminal-features "xterm-kitty:extkeys" set -sg escape-time 10 # Status bar @@ -82,6 +86,8 @@ set -g status-right-length 50 set -g window-status-separator "" set -gw automatic-rename on set -gw automatic-rename-format '#{b:pane_current_path}' +set -g set-titles on +set -g set-titles-string '#h:#W' # Theme set -g status-style "bg=default,fg=default"