mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(config): add CSI‑u shift+enter handling and new shortcut bindings
This commit is contained in:
1 parent
8cd148bafd
commit
964f8a83b6
3 files changed
+28
-7
No files matched your search
@@ -37,14 +37,23 @@ keybind = ctrl+plus=increase_font_size:1
|
|||||||
keybind = ctrl+minus=decrease_font_size:1
|
keybind = ctrl+minus=decrease_font_size:1
|
||||||
keybind = ctrl+zero=reset_font_size
|
keybind = ctrl+zero=reset_font_size
|
||||||
keybind = ctrl+shift+period=reload_config
|
keybind = ctrl+shift+period=reload_config
|
||||||
keybind = shift+enter=text:\n
|
# shift+enter as CSI-u (ESC[13;2u), the newline-in-prompt key coding agents
|
||||||
|
# (omp, claude) read. Never \n: that is ctrl+j, tmux's pane-down key.
|
||||||
|
keybind = shift+enter=text:\x1b[13;2u
|
||||||
|
|
||||||
# command palette: ctrl+space is tmux's root-table C-Space (tmux-palette);
|
# command palette: ctrl+space is tmux's root-table C-Space (tmux-palette);
|
||||||
# sent explicitly as NUL so no keyboard-protocol mode can turn it into a CSI
|
# sent explicitly as NUL so no keyboard-protocol mode can turn it into a CSI
|
||||||
keybind = ctrl+space=text:\x00
|
keybind = ctrl+space=text:\x00
|
||||||
# project tasks palette (pj): tmux prefix t
|
# project tasks palette (pj): tmux prefix t
|
||||||
|
keybind = ctrl+shift+p=text:\x02t
|
||||||
keybind = ctrl+shift+space=text:\x02t
|
keybind = ctrl+shift+space=text:\x02t
|
||||||
|
|
||||||
|
# launchers (kitty's ctrl+shift chords), tmux prefix y/e/g/a
|
||||||
|
keybind = ctrl+shift+f=text:\x02y
|
||||||
|
keybind = ctrl+shift+e=text:\x02e
|
||||||
|
keybind = ctrl+shift+g=text:\x02g
|
||||||
|
keybind = ctrl+shift+a=text:\x02a
|
||||||
|
|
||||||
# tabs → tmux windows
|
# tabs → tmux windows
|
||||||
keybind = ctrl+shift+t=text:\x02c
|
keybind = ctrl+shift+t=text:\x02c
|
||||||
keybind = ctrl+shift+w=text:\x02k
|
keybind = ctrl+shift+w=text:\x02k
|
||||||
@@ -60,7 +69,6 @@ keybind = ctrl+shift+h=text:\x02p
|
|||||||
|
|
||||||
# splits → tmux panes
|
# splits → tmux panes
|
||||||
keybind = ctrl+shift+l=text:\x02v
|
keybind = ctrl+shift+l=text:\x02v
|
||||||
keybind = ctrl+shift+e=text:\x02h
|
|
||||||
keybind = ctrl+shift+j=text:\x02h
|
keybind = ctrl+shift+j=text:\x02h
|
||||||
keybind = ctrl+shift+x=text:\x02x
|
keybind = ctrl+shift+x=text:\x02x
|
||||||
|
|
||||||
@@ -69,10 +77,8 @@ keybind = ctrl+shift+o=text:\x02o
|
|||||||
keybind = ctrl+shift+enter=text:\x02z
|
keybind = ctrl+shift+enter=text:\x02z
|
||||||
keybind = ctrl+shift+z=text:\x02z
|
keybind = ctrl+shift+z=text:\x02z
|
||||||
|
|
||||||
# scrollback, prompt, help
|
# scrollback, help (search scrollback: tmux prefix /)
|
||||||
keybind = ctrl+shift+f=text:\x02/
|
|
||||||
keybind = ctrl+shift+page_up=text:\x02[
|
keybind = ctrl+shift+page_up=text:\x02[
|
||||||
keybind = ctrl+shift+p=text:\x02:
|
|
||||||
keybind = ctrl+shift+slash=text:\x02?
|
keybind = ctrl+shift+slash=text:\x02?
|
||||||
keybind = ctrl+shift+alt+,=text:\x02q
|
keybind = ctrl+shift+alt+,=text:\x02q
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
"icon": "",
|
"icon": "",
|
||||||
"title": "Lazygit",
|
"title": "Lazygit",
|
||||||
|
"shortcut": "Ctrl+Shift+G",
|
||||||
"description": "popup in the pane's directory",
|
"description": "popup in the pane's directory",
|
||||||
"category": "Tools",
|
"category": "Tools",
|
||||||
"aliases": ["lg"],
|
"aliases": ["lg"],
|
||||||
@@ -10,6 +11,7 @@
|
|||||||
{
|
{
|
||||||
"icon": "",
|
"icon": "",
|
||||||
"title": "Yazi",
|
"title": "Yazi",
|
||||||
|
"shortcut": "Ctrl+Shift+F",
|
||||||
"description": "new window in the pane's directory",
|
"description": "new window in the pane's directory",
|
||||||
"category": "Tools",
|
"category": "Tools",
|
||||||
"aliases": ["fm"],
|
"aliases": ["fm"],
|
||||||
@@ -58,6 +60,7 @@
|
|||||||
{
|
{
|
||||||
"icon": "",
|
"icon": "",
|
||||||
"title": "omp",
|
"title": "omp",
|
||||||
|
"shortcut": "Ctrl+Shift+A",
|
||||||
"description": "omp agent in a full-height split on the right, 33%",
|
"description": "omp agent in a full-height split on the right, 33%",
|
||||||
"category": "Tools",
|
"category": "Tools",
|
||||||
"aliases": ["agent", "ai"],
|
"aliases": ["agent", "ai"],
|
||||||
@@ -76,7 +79,7 @@
|
|||||||
"title": "Project Tasks",
|
"title": "Project Tasks",
|
||||||
"description": "pj: install, dev, make, uv, scripts",
|
"description": "pj: install, dev, make, uv, scripts",
|
||||||
"category": "Tools",
|
"category": "Tools",
|
||||||
"shortcut": "Ctrl+Shift+Space",
|
"shortcut": "Ctrl+Shift+P",
|
||||||
"aliases": ["pj", "run"],
|
"aliases": ["pj", "run"],
|
||||||
"action": { "palette": "tasks" }
|
"action": { "palette": "tasks" }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -110,6 +110,11 @@ set -g detach-on-destroy no-detached
|
|||||||
set -g extended-keys on
|
set -g extended-keys on
|
||||||
set -g extended-keys-format csi-u
|
set -g extended-keys-format csi-u
|
||||||
set -ag terminal-features "xterm-kitty:extkeys"
|
set -ag terminal-features "xterm-kitty:extkeys"
|
||||||
|
# shift+enter (Ghostty sends ESC[13;2u): pass it through as ESC[13;2u for
|
||||||
|
# coding agents (omp, claude) to insert a newline. With extended-keys `on`,
|
||||||
|
# tmux would flatten it to a plain Enter for any app that never asked for
|
||||||
|
# extended keys.
|
||||||
|
bind -N "Shift+Enter as CSI-u" -n S-Enter send-keys -H 1b 5b 31 33 3b 32 75
|
||||||
set -as terminal-features ",*:clipboard"
|
set -as terminal-features ",*:clipboard"
|
||||||
set -sg escape-time 10
|
set -sg escape-time 10
|
||||||
|
|
||||||
@@ -192,9 +197,16 @@ set -g @plugin 'eduwass/tmux-palette'
|
|||||||
# shortcut labels) lives in ~/.config/tmux-palette/.
|
# shortcut labels) lives in ~/.config/tmux-palette/.
|
||||||
set -g @palette-key 'C-Space'
|
set -g @palette-key 'C-Space'
|
||||||
# pj's task runner as a palette (pj-palette): quick actions + project tasks,
|
# pj's task runner as a palette (pj-palette): quick actions + project tasks,
|
||||||
# each run in a new window. prefix + t (Ghostty ctrl+shift+space).
|
# each run in a bottom split. prefix + t (Ghostty ctrl+shift+p / +space).
|
||||||
bind -N "Project tasks (pj)" t run-shell "~/.config/tmux/plugins/tmux-palette/bin/tmux-palette.sh tasks"
|
bind -N "Project tasks (pj)" t run-shell "~/.config/tmux/plugins/tmux-palette/bin/tmux-palette.sh tasks"
|
||||||
|
|
||||||
|
# Direct launchers, the kitty ctrl+shift chords (Ghostty sends prefix + key).
|
||||||
|
# Programs are exec'd so the tab icon is the program's.
|
||||||
|
bind -N "Yazi in a new window" y new-window -c "#{pane_current_path}" "exec yazi"
|
||||||
|
bind -N "Neovim in a new window" e new-window -c "#{pane_current_path}" "exec nvim"
|
||||||
|
bind -N "Lazygit popup" g display-popup -E -w 90% -h 90% -d "#{pane_current_path}" lazygit
|
||||||
|
bind -N "omp in a right split (33%)" a split-window -h -f -l 33% -c "#{pane_current_path}" "exec omp"
|
||||||
|
|
||||||
# sessionx: fuzzy session switcher/creator on prefix + o (Ghostty
|
# sessionx: fuzzy session switcher/creator on prefix + o (Ghostty
|
||||||
# ctrl+shift+o). A query with no match goes to zoxide; uses fzf --tmux.
|
# ctrl+shift+o). A query with no match goes to zoxide; uses fzf --tmux.
|
||||||
set -g @sessionx-bind 'o'
|
set -g @sessionx-bind 'o'
|
||||||
|
|||||||
Reference in new issue
Block a user