-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
99 lines (71 loc) · 2.23 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
97
98
99
### Term
set -g default-terminal "screen-256color"
set -g status-utf8 on
set -g history-limit 10000
### Misc
# Start counting from 1
set -g base-index 1
# More time to select a pane
set -g display-panes-time 5000
# More time to repeat a key stroke
set -g repeat-time 800
# No delay after ESC
set -g escape-time 0
### Theme
set -g status-bg black
set -g status-fg white
set -g status-interval 2
set -g status-left-length 30
set -g status-right-length 60
set -g status-left '(#[fg=colour12]#S#[default]) '
set -g status-right '#[fg=colour4,bg=black,bright]#(tmux-status) #[fg=colour5]%H:%M#[default]'
setw -g window-status-format '#[fg=colour240]#I #[fg=white]#W#[default] '
setw -g window-status-current-format '#[bg=white,fg=black]⮀ #I #W #[bg=black,fg=white]⮀'
# Set the pane border colour for the currently active pane.
set-option -g pane-active-border-fg colour4
### Bindings
# Set the prefix to C-o.
unbind C-b
set -g prefix C-o
bind C-o send-prefix
# create a new window with c
bind c new-window
# go to the last active window with o
bind o last-window
# go to the last active pane with C-SPC
bind -r C-" " last-pane
# rename window with A
bind A command-prompt "rename-window %%"
# rename session with C-a
bind C-a command-prompt "rename-session %%"
# kill the current window with k
bind k confirm-before "kill-window"
# redisplay with C-l
bind C-l refresh-client
# Swap panes with x and C-x
bind x swap-pane -D
bind C-x swap-pane -U
# Select the prev/next pane with BTab/Tab
bind -r Tab select-pane -t :.+
bind -r BTab select-pane -t :.-
# Split horizontally with |
bind | split-window -h
# Split vertically with -
bind - split-window -v
# Kill the current pane with 0
bind 0 kill-pane
# Resize left/down/up/right with h/j/k/l
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
# Also display pane numbers with C-q (in addition to q)
bind C-q display-panes
# Reload .tmux.conf with R
bind R source-file ~/.tmux.conf
# Copy to clipboard with M-w
bind M-w run "tmux save-buffer - | xclip -i -selection clipboard"
# Paste from clipboard with C-y
bind C-y run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
# Synchronize panes with S
bind S setw synchronize-panes