-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
96 lines (71 loc) · 2.12 KB
/
.tmux.conf
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
run-shell "tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-)"
# Fix copy-paste in OSX.
set -g default-command "command -v reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l bash || bash"
set -g prefix C-]
bind-key C-] last-window
set -g default-terminal "xterm-256color"
set -g history-limit 65535
set -g repeat-time 5000
set -s escape-time 0
set-window-option -g mode-keys vi
#########
# THEME #
#########
set -g status-bg colour18
set -g status-fg colour21
set -g status-interval 30
set -g status-left-length 30
set -g status-left '#[fg=green](#S) #(whoami)@#h #[default]'
set -g status-right '#[fg=yellow]#(uptime | awk -F":" "{print \\$NF}")#[default] #[fg=blue]%H:%M#[default]'
#########################
# Make tmux screen-like #
#########################
# split -h (vertical split)
unbind |
bind | split-window -h
# split (horizontal split)
unbind '"' # Need for windowlist.
unbind S
bind S split-window
# window list
bind '"' choose-window
# rename window
unbind A
bind A command-prompt "rename-window %%"
# detach
bind ^D detach
# kill
bind K confirm-before "kill-window"
# move pane
bind Tab select-pane -D
bind BTab select-pane -U
#########################
# Personal key-bindings #
#########################
bind -r ^h select-pane -L
bind -r ^j select-pane -D
bind -r ^k select-pane -U
bind -r ^l select-pane -R
bind -r M-h resize-pane -L 5
bind -r M-j resize-pane -D 5
bind -r M-k resize-pane -U 5
bind -r M-l resize-pane -R 5
bind -r M-z resize-pane -Z
bind-key -r M-1 select-layout even-horizontal
bind-key -r M-2 select-layout even-vertical
bind-key -r M-3 select-layout main-horizontal
bind-key -r M-4 select-layout main-vertical
bind-key -r M-5 select-layout tiled
bind ^[ copy-mode
bind-key -n S-PPage copy-mode -u
bind-key -n M-PPage copy-mode -u
bind -r ^n next-window
bind -r ^p previous-window
bind k send-keys -R \; clear-history
bind l send-keys -R \; clear-history
# vim-like copy mode
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key p paste-buffer
bind r source-file ~/.tmux.conf
run-shell ~/.tmux/plugins/tmux-yank/yank.tmux