blob: 73a533aa0c4916624adcc549d799c64454c6eda0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# Options
set -g mouse on # I know, I'm a monster
set -g default-shell $SHELL
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
setw -g mode-keys vi
set-option -s set-clipboard off
# Bindings
unbind-key C-b
set -g prefix M-w
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
bind-key C-v split-window -h -c "#{pane_current_path}"
bind-key C-h split-window -v -c "#{pane_current_path}"
bind-key C-n new-window -c "#{pane_current_path}"
# vim like pane swap
bind-key C-r swap-pane -D
unbind-key C
bind-key W command-prompt 'rename-window %%'
bind-key S command-prompt 'rename-session %%'
bind-key Q kill-server
bind-key K kill-session -a
bind-key C kill-window
# bind y run -b "tmux show-buffer | xclip -selection c > /dev/null"
# https://www.rockyourcode.com/copy-and-paste-in-tmux/
bind P paste-buffer
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 'xclip -se c -i'
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
|