summaryrefslogtreecommitdiff
path: root/setup/core/tmux.sh
diff options
context:
space:
mode:
Diffstat (limited to 'setup/core/tmux.sh')
-rwxr-xr-xsetup/core/tmux.sh21
1 files changed, 1 insertions, 20 deletions
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 @@
2 2
3cd "$(dirname "${BASH_SOURCE[0]}")" || exit 3cd "$(dirname "${BASH_SOURCE[0]}")" || exit
4 4
5TMUX_CONF="/etc/tmux.conf" 5cp tmux.conf /etc/tmux.conf
6CLIP_HOST="p.noml.ch"
7CLIP_PORT="5023"
8CLIP_CMD="openssl enc -aes-256-cbc -pbkdf2 -pass pass:YourPassword | nc -w 1 ${CLIP_HOST} ${CLIP_PORT} >/dev/null 2>&1"
9
10cat << EOF > "$TMUX_CONF"
11# Vi mode for copy
12setw -g mode-keys vi
13
14# Mouse selection
15set -g mouse on
16
17# v to start selection, y to yank (like vim)
18bind-key -T copy-mode-vi v send-keys -X begin-selection
19bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "${CLIP_CMD}"
20bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "${CLIP_CMD}"
21bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "${CLIP_CMD}"
22EOF
23
24echo "tmux config written to $TMUX_CONF"