From a9bfc96ce01a8b71425f30ce13e7bf12b5080367 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 19 Feb 2026 22:45:43 +0800 Subject: Add tmux config to dev env setup Co-Authored-By: Claude Opus 4.6 --- setup/core/tmux.conf | 11 +++++++++++ setup/core/tmux.sh | 21 +-------------------- 2 files changed, 12 insertions(+), 20 deletions(-) create mode 100644 setup/core/tmux.conf diff --git a/setup/core/tmux.conf b/setup/core/tmux.conf new file mode 100644 index 0000000..f01bf59 --- /dev/null +++ b/setup/core/tmux.conf @@ -0,0 +1,11 @@ +# Vi mode for copy +setw -g mode-keys vi + +# Mouse selection +set -g mouse on + +# v to start selection, y to yank (like vim) +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1" +bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1" +bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 p.noml.ch 5023 >/dev/null 2>&1" diff --git a/setup/core/tmux.sh b/setup/core/tmux.sh index 1d3a9bd..1e5d3db 100755 --- a/setup/core/tmux.sh +++ b/setup/core/tmux.sh @@ -2,23 +2,4 @@ cd "$(dirname "${BASH_SOURCE[0]}")" || exit -TMUX_CONF="/etc/tmux.conf" -CLIP_HOST="p.noml.ch" -CLIP_PORT="5023" -CLIP_CMD="openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 ${CLIP_HOST} ${CLIP_PORT} >/dev/null 2>&1" - -cat << EOF > "$TMUX_CONF" -# Vi mode for copy -setw -g mode-keys vi - -# Mouse selection -set -g mouse on - -# v to start selection, y to yank (like vim) -bind-key -T copy-mode-vi v send-keys -X begin-selection -bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${CLIP_CMD}" -bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "${CLIP_CMD}" -bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "${CLIP_CMD}" -EOF - -echo "tmux config written to $TMUX_CONF" +cp tmux.conf /etc/tmux.conf -- cgit