« get me outta code hell

dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.tmux.conf18
-rw-r--r--kitty.conf9
2 files changed, 27 insertions, 0 deletions
diff --git a/.tmux.conf b/.tmux.conf
index dda9b5b..b51fe44 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -10,5 +10,23 @@ set-window-option -g window-status-current-style fg=colour251,bright
 bind '"' split-window -c "#{pane_current_path}"
 bind % split-window -h -c "#{pane_current_path}"
 bind c new-window -c "#{pane_current_path}"
+
 bind -n C-S-Left swap-window -t -1
 bind -n C-S-Right swap-window -t +1
+
+# These are "fake" keybindings: we *want* to bind to key combinations
+# that tmux can't actually detect (for one reason or another, but
+# generally because it's not an ASCII-represented key chord). Instead
+# we bind the commands to arbitrary codes that we probably won't want
+# to actually press, and then configure the terminal editor (i.e. see
+# kitty.conf) to actually pass the relevant keys along.
+#
+# Technically this also means we can customize the effective bindings
+# per terminal emulator.
+
+bind -n M-S-a swap-window -t -1 \; previous-window   ## bind to C-S-, (ctrl <)
+bind -n M-S-b swap-window -t +1 \; next-window       ## bind to C-S-. (ctrl >)
+bind -n M-S-c previous-window   ## bind to C-, (ctrl ,)
+bind -n M-S-d next-window       ## bind to C-. (ctrl .)
+
+# End "fake" keybindings.
diff --git a/kitty.conf b/kitty.conf
index 8b1e3a4..a4eb9b6 100644
--- a/kitty.conf
+++ b/kitty.conf
@@ -1,3 +1,12 @@
 # jump to beginning and end of word
 map ctrl+left send_text all \x1b\x62
 map ctrl+right send_text all \x1b\x66
+
+# "Fake" keybindings, for sending input not representable by ASCII chords.
+
+map ctrl+shift+, send_key alt+shift+a   ## tmux: swap window with previous
+map ctrl+shift+. send_key alt+shift+b   ## tmux: swap window with next
+map ctrl+, send_key alt+shift+c   ## tmux: view previous window
+map ctrl+. send_key alt+shift+d   ## tmux: view next window
+
+# End "fake" keybindings.