-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
145 lines (109 loc) · 3.37 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Marcin Kulik's (sickill) tmux conf
### General
# $TERM
set -g default-terminal screen-256color
# amount of time for display of status line messages
set -g display-time 2000
# window and pane indexing starts at 1
set -g base-index 1
setw -g pane-base-index 1
# better resizing
setw -g aggressive-resize on
# window notifications
setw -g monitor-activity on
# window renumbering
set -g renumber-windows on
# history size
set -g history-limit 10000
### Look
# status bar format and position
set -g status-justify left
set -g status-left '#[fg=black]#[bg=red] #S #[fg=black]#[bg=green] #I #[fg=black]#[bg=cyan] #P ' # ❐
set -g status-left-length 30
set -g status-right '#[fg=black,bg=white] #(date "+%H%M") '
setw -g window-status-format ' #I:#W#F'
setw -g window-status-current-format ' #I:#W#F '
# status bar colors
set -g status-fg default
set -g status-bg default
# regular window colors
# setw -g window-status-fg white
setw -g window-status-bg black
# setw -g window-status-attr none
# current window colors
setw -g window-status-current-fg black
setw -g window-status-current-bg white
setw -g window-status-current-attr none
# window with content activity
setw -g window-status-activity-bg black
setw -g window-status-activity-fg white
setw -g window-status-activity-attr bold
setw -g window-status-bell-bg black
setw -g window-status-bell-fg white
setw -g window-status-bell-attr bold
# borders
# set -g pane-border-fg colour240
# set -g pane-border-bg colour15
# set -g pane-active-border-fg colour15
# set -g pane-active-border-attr bold
### Window titles
# automatically set window title
set -g set-titles on
set -g set-titles-string '#T'
# don't rename windows automatically
# setw -g automatic-rename off
### Keybindings
# unbind old prefix
unbind C-b
# bind new prefix
set-option -g prefix `
bind-key ` send-prefix
bind-key -n F11 set -g prefix `
bind-key -n F12 set -g prefix C-a
# last pane switching
# bind-key C-a select-pane -t :.+
# Vi keys
setw -g mode-keys vi
# don't wait for esc/meta-key sequence
set -sg escape-time 0
# pane movement and resizing
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -r H resize-pane -L 4
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 4
# window splitting
bind v split-window -h
bind - split-window -v
# vi-like visual select + yank in copy mode
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-selection
bind-key -t vi-copy C-v rectangle-toggle
# window switching with page up/down
bind-key -n C-PPage previous-window
bind-key -n C-NPage next-window
bind-key -n M-P swap-window -t -1
bind-key -n M-N swap-window -t +1
# enter copy mode & scroll 1 page up with alt+pageup
bind-key -n M-PPage copy-mode -u
# move x clipboard into tmux paste buffer
bind C-v run "tmux set-buffer \"$(xsel -ob)\"; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind C-c run "tmux show-buffer | xsel -ib"
# ctrl-t opens new window
bind-key -n C-t new-window
# reload config
bind R source-file ~/.tmux.conf \; display "Configuration Reloaded!"
# open URLs
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; split-window -l 10 "urlview /tmp/tmux-buffer"
# xterm-style function key sequences
setw -g xterm-keys on
### Source local conf
source-file ~/.tmux.conf.local