-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
171 lines (150 loc) · 4.86 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
####################
##########
## Tmux
##########
####################
set -g default-terminal "screen-256color"
set -g history-limit 50000
# Like vim
# Disable windows navigation
unbind n
unbind p
bind ` copy-mode
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v"
# bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y"
bind b list-buffers # list paste buffers
bind p paste-buffer -p # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from
##########
# Set Contrl + space as the prefix
##########
unbind C-Space
set -g prefix C-Space
bind C-Space send-prefix
##########
# Reload configuration with r
##########
unbind r
bind r source-file ~/.tmux.conf
##########
## MOUSE
##########
# Tmux mouse mode
set-option -g mouse on
set -sg escape-time 1000
# Start windows and panes index at 1, not 0.
set-option -g base-index 1
set -g base-index 1
setw -g aggressive-resize on
set -g pane-active-border-style fg=colour209,bg=default
####################
##########
# Status bar
##########
####################
##########
# set -g status-bg colour235
# set -g status-fg yellow
# set -g status-interval 60
set-option -g status on
set-option -g status-interval 1
set-option -g status-justify centre
set-option -g status-keys vi
set-option -g status-position bottom
set-option -g status-style fg=colour136,bg=colour235
##########
set-option -g status-left-length 100
set-option -g status-left-style default
set-option -g status-left "#[fg=green]#(whoami)"
set-option -ag status-left "#[fg=yellow]@#[fg=blue]#H#[default] :: #[fg=green][S:W:P][#S:#I:#P]"
##########
set-option -g status-right-length 100
set-option -g status-right-style default
set-option -g status-right "#[bg=default,bright]#{prefix_highlight}"
# set-option -ag status-right "#[fg=yellow,bg=default]#(tmux-mem-cpu-load)"
# set-option -ag status-right " :: "
set-option -ag status-right "#[fg=blue,bg=default]#{keyboard_layout}"
set-option -ag status-right " :: "
set-option -ag status-right "#[fg=blue,bg=default,bright]#{battery_status_bg}#{battery_icon} - #[fg=blue,bg=default,bright]#{battery_percentage}"
set-option -ag status-right " :: "
set-option -ag status-right "#[fg=yellow,bg=default]%H:%M"
set-option -ag status-right " :: "
set-option -ag status-right "#[fg=green]%d-%b-%Y"
# set-option -ag status-right "#[fg=yellow,bg=default]%H:%M #[fg=green] %Y-%m-%d"
##########
set-window-option -g window-status-style fg=colour244
set-window-option -g window-status-style bg=default
set-window-option -g window-status-separator " | "
set-window-option -g window-status-current-style fg=colour166
set-window-option -g window-status-current-style bg=colour19
##########
# Windows
##########
setw -g pane-base-index 1 # make pane numbering consistent with windows
# use PREFIX | to split window horizontally and PREFIX - to split vertically
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v
# Resize window with alt arrow keys
bind-key -n C-S-Up resize-pane -U 10
bind-key -n C-S-Down resize-pane -D 10
bind-key -n C-S-Left resize-pane -L 10
bind-key -n C-S-Right resize-pane -R 10
# Make the current window the first window
bind T swap-window -t 0
# Move windows (Control+Shift+ Left/Right)
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
# Reorder windows
# bind R \
# move-window -r\; \
# display-message "Windows reordered..."
####################
##########
####
## tmux plugin manager
####
##########
####################
## https://github.com/tmux-plugins/tpm
## git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
##########
####
# List of plugins
####
##########
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'imomaliev/tmux-keyboard-layout'
##########
####
# Plugin configurations
####
##########
# tmux-resurrect extra settings
set -g @resurrect-capture-pane-contents 'on' # allow tmux-ressurect to capture pane contents
# keep vim sessions after reboot
set -g @resurrect-strategy-vim 'session'
# keep pane contents
set -g @resurrect-capture-pane-contents 'on'
# restore bash history
set -g @resurrect-save-bash-history 'on'
##########
# tmux-continum
# enable tmux-continuum functionality
set -g @continuum-restore 'on'
# Restore last saved enviroment
set -g @continuum-restore 'on'
# Set autosave interval
set -g @continuum-save-interval '5'
##########
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'