-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
162 lines (133 loc) · 4.43 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Set the default terminal mode to 256color mode
# START:termcolor
set -g default-terminal "screen-256color"
# END:termcolor
# Setting the prefix from C-b to C-a
# START:prefix
set -g prefix C-a
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
#setting the delay between prefix and command
## START:delay
set -sg escape-time 1
## END:delay
# Ensure that we can send Ctrl-A to other apps
# START:bind_prefix
bind C-a send-prefix
# END:bind_prefix
# Set the base index for windows to 1 instead of 0
# START:index
set -g base-index 1
# END:index
# Set the base index for panes to 1 instead of 0
# START:panes_index
setw -g pane-base-index 1
# END:panes_index
# Reload the file with Prefix r
# START:reload
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# END:reload
#splitting panes
# START:panesplit
bind | split-window -h
bind - split-window -v
# END:panesplit
# moving between panes
# START:paneselect
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# END:paneselect
# Quick pane selection
# START:panetoggle
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# END:panetoggle
# Pane resizing
# START:paneresize
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# END:paneresize
# mouse support - set to on if you want to use the mouse
# START:mouse
setw -g mode-mouse on
# END:mouse
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# enable activity alerts
#START:activity
setw -g monitor-activity on
set -g visual-activity on
#END:activity
# Maximize and restore a pane
# START:max
#unbind Up
bind C-Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
# END:max
# START:restore
unbind C-Down
bind C-Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# END:restore
set-option -g default-command "reattach-to-user-namespace -l zsh"
# scrollback buffer n lines
set -g history-limit 100000
# Copy mode
setw -g mode-keys vi
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-copy 'V' rectangle-toggle
bind-key C-c run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# Custom status bar
# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
# Inconsolata-dz-Powerline Theme:
#[fg=white,bg=colour39,noreverse,bold]
#green hostname: fg=colour22,bg=colour148
set -g status-left '#[fg=colour10,bg=colour7,bold] ❐ #S #[fg=white,bg=colour10,nobold]⮀#[fg=colour7,bg=colour10,bold] #(whoami) #[fg=colour10,bg=colour0,nobold]⮀'
set -g status-right '#[fg=colour7,bg=colour0,nobold]⮂#[fg=colour10,bg=colour7] #h #[fg=colour252]⮂#[fg=colour235,bg=colour252,bold] #(wemux status_users) '
set -g window-status-format "#[fg=colour7,bg=colour0] #I #W "
set -g window-status-current-format "#[fg=colour0,bg=colour4]⮀#[fg=colour0,bg=colour4,noreverse,bold] #I ⮁ #W #[fg=colour4,bg=colour0,nobold]⮀"
bind t run-shell 'wemux display_users'
# Alternate Theme for shells without Inconsolata-dz-Powerline:
# set -g status-left ' #[bold]❐ #S#[default] ⣿'
#
# set -g status-right '#[bold]#(whoami) ● #H#[default] ⡇ #[fg=blue]%H:%M#[default] '
#set-window-option -g automatic-rename off
set-window-option -g allow-rename off
### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-bg colour0 #black #base02
set-option -g status-fg colour3 #yellow #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour12 #brightblue #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour9 # brightred #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour0 # black #base02
set-option -g pane-active-border-fg colour04 # brightgreen #base01
# message text
set-option -g message-bg colour0 # black #base02
set-option -g message-fg colour10 # brightred #orange
# pane number display
set-option -g display-panes-active-colour colour4 #blue #blue
set-option -g display-panes-colour colour9 #brightred #orange
# clock
set-window-option -g clock-mode-colour colour2 #green #green)