-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
180 lines (171 loc) · 6.84 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# applying this config by command tmux source-file .tmux.conf
# Options
# set zsh as default
set-option -g default-shell /bin/zsh
# activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# pane switching using mouse
setw -g mode-mouse on
set-option -g mouse-select-pane on
# configure titles
set-option -g set-titles on
set-option -g set-titles-string '[#S:#I #H] #W'
# set timeout to 50ms
set-option -sg escape-time 0
# set base pane index
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Colors
# set screen colors
set-option -g default-terminal xterm-256color
# Bad Wolf
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg red
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
# 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:
#set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #[fg=colour238,bg=colour234,nobold]⮀'
#set -g status-right '⮃#[fg=colou238,bg=colour234,nobold] #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=colour252]⮂#[fg=colour235,bg=colour252,bold] #(cut -d " " -f 1-4 /proc/loadavg)'
#set -g window-status-format "#[fg=white,bg=colour234] #I-#W "
#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=red,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 90
set-option -g status-right-length 60
set-option -g status-left "#(~/.tmux/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/.tmux/tmux-powerline/powerline.sh right)"
set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"
# Activity
setw -g monitor-activity on
# Better name management
bind c new-window \; command-prompt "rename-window '%%'"
bind C new-window
bind , command-prompt "rename-window '%%'"
# All kind of nice options
set-option -g bell-action any
set-option -g default-terminal screen
set-option -g display-panes-colour red
set-option -g history-limit 100000
set-option -g message-bg red
set-option -g message-fg white
set-option -g pane-active-border-bg default
set-option -g pane-active-border-fg red
set-option -g pane-border-bg default
set-option -g pane-border-fg cyan
set-option -g repeat-time 500
set-option -g visual-bell on
set-option -g set-titles on
set-option -g set-titles-string ' #I-#W '
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -g base-index 1
#set-option -g default-path ""
# Screen lock
bind-key C-x lock-server
bind-key x lock-server
bind-key -n M-x lock-server
set-option -g lock-after-time 0
set-option -g lock-server on
set-option -g lock-command "vlock"
# Window options
set-window-option -g utf8 on
set-window-option -g clock-mode-colour blue
set-window-option -g clock-mode-style 24
set-window-option -g xterm-keys on
set-window-option -g automatic-rename on
set-window-option -g aggressive-resize off
#Keyboard Shortcut
# changing the prefix
unbind C-b
set -g prefix M-a
# Remap keys to my settings
unbind-key M-d ; bind-key -n M-d detach-client
unbind-key M-c ; bind-key -n M-c command-prompt -p "tmux:"
unbind-key M-m ; bind-key -n M-m command-prompt -p "Man:" "split-window 'man %%'"
# Window switching
unbind-key M-w ; bind-key -n M-w choose-window
unbind-key M-e ; bind-key -n M-e choose-session
unbind-key M-t ; bind-key -n M-t new-window
unbind-key M-PgDn ; bind-key -n M-PgDn next-window
unbind-key M-PgUp ; bind-key -n M-PgUp previous-window
unbind-key M-n ; bind-key -n M-n next-window
unbind-key M-p ; bind-key -n M-p previous-window
# Window selection
unbind-key 1 ; bind-key 1 select-window -t 1
unbind-key 2 ; bind-key 2 select-window -t 2
unbind-key 3 ; bind-key 3 select-window -t 3
unbind-key 4 ; bind-key 4 select-window -t 4
unbind-key 5 ; bind-key 5 select-window -t 5
unbind-key 6 ; bind-key 6 select-window -t 6
unbind-key 7 ; bind-key 7 select-window -t 7
unbind-key 8 ; bind-key 8 select-window -t 8
unbind-key 9 ; bind-key 9 select-window -t 9
unbind-key 0 ; bind-key 0 select-window -t 10
unbind-key M-1 ; bind-key -n M-1 select-window -t 1
unbind-key M-2 ; bind-key -n M-2 select-window -t 2
unbind-key M-3 ; bind-key -n M-3 select-window -t 3
unbind-key M-4 ; bind-key -n M-4 select-window -t 4
unbind-key M-5 ; bind-key -n M-5 select-window -t 5
unbind-key M-6 ; bind-key -n M-6 select-window -t 6
unbind-key M-7 ; bind-key -n M-7 select-window -t 7
unbind-key M-8 ; bind-key -n M-8 select-window -t 8
unbind-key M-9 ; bind-key -n M-9 select-window -t 9
unbind-key M-0 ; bind-key -n M-0 select-window -t 10
# Pane switching with Alt+arrow
unbind-key M-Left ; bind-key -n M-Left select-pane -L
unbind-key M-Right ; bind-key -n M-Right select-pane -R
unbind-key M-Up ; bind-key -n M-Up select-pane -U
unbind-key M-Down ; bind-key -n M-Down select-pane -D
# Window splitting
unbind-key M-v ; bind-key -n M-v split-window -v
unbind-key M-h ; bind-key -n M-h split-window -h
# Pane resize
#bind j resize-pane -D 1
#bind k resize-pane -U 1
#bind h resize-pane -L 1
#bind l resize-pane -R 1
unbind-key S-M-Up ; bind-key -n S-M-Up resize-pane -U 1
unbind-key S-M-Down ; bind-key -n S-M-Down resize-pane -D 1
unbind-key S-M-Left ; bind-key -n S-M-Left resize-pane -L 1
unbind-key S-M-Right; bind-key -n S-M-Right resize-pane -R 1
# Window and pane close
unbind-key M-q ; bind-key -n M-q kill-window
unbind-key M-x ; bind-key -n M-x kill-pane
# Show all keyboard shortcuts
unbind-key M-k ; bind-key -n M-k list-keys
# Copy mode
setw -g mode-keys vi
bind [ copy-mode
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
# Development mode
bind d source-file ~/.tmux/devel
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-pain-control \
tmux-plugins/tmux-open \
tmux-plugins/tmux-yank \
tmux-plugins/tmux-copycat \
"
# Other examples:
# github_username/plugin_name \
# git@github.com/user/plugin \
# git@bitbucket.com/user/plugin \
# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm