-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtmux.conf
executable file
·164 lines (143 loc) · 5.2 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
# make every window a login shell
# set -g default-command "${SHELL}"
# set window and pane index to 1 (0 by default)
set -g base-index 1
setw -g pane-base-index 1
#Sane Scrolling
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -g default-shell $SHELL
set -g xterm-keys on
# set alternate-screen on
# set -g default-terminal screen-256color
#set -g default-terminal "xterm-256color"
#
# change prefix key
# set prefix key to ctrl+t
unbind C-b
set -g prefix C-Space
# nesting tmux
# TMUX= tmux new-session -d -s name
# tmux switch-client -t name
# to send commands to the inner tmux
bind Space send-prefix
# send the prefix to client inside window
# bind-key -n C-a send-prefix
# for fast session switch
unbind S
bind S command-prompt "switch -t %1"
# Changes for tmux 1.9 and above where c no longer creates a new window with the current directory
# of the current pane, and other similar features. Comment them if you use older versions
unbind c
bind c new-window -c "#{pane_current_path}"
#minimize and maximize
unbind +
bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
unbind -
bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
# Vi keys in copy mode
set -g mode-keys vi
#emacs key bindings
set-window-option -g mode-keys vi
set-option -g status-keys emacs
set -g status-keys emacs
#window status
# setw -g window-status-format '#[fg=colour223,bg=colour234,none] #I #[bg=colour24,fg=colour223,none] #W '
# setw -g window-status-current-format '#[bg=colour234,fg=colour214,none] #I #[fg=black,bg=colour214,none] #W '
# active window title colors
# If in zoomed pane, show window status in different color ('window_zommed_flag' works only from tmux 2.0)
setw -g window-status-current-format "#[fg=brightwhite,bg=red] #I #{?window_zoomed_flag,#[bg=yellow]#[fg=black],#[bg=brightred]#[fg=black]} #W "
set-window-option -g window-status-current-style bg=red,fg=white
# set-window-option -g window-status-current-attr 'bold'
# set-window-option -g window-status-current-attr bright
set-window-option -g window-status-style fg=black,bg=white,dim
bind -n End send-key C-e
bind -n Home send-key C-a
# auto window rename
set-window-option -g automatic-rename off
# use UTF8
# set -g utf8 on
# set-window-option -g utf8 on
# set -g status-utf8 on
# set -g default-terminal "screen-256color"
# set the pane border colors
set -g pane-border-style fg=colour223,bg=default
set -g pane-active-border-style fg=brightred,bg=default
# set-option -g status-bg blue
# set-option -g status-fg white
set -g status-justify left
set-option -g status-style fg=colour231,bg=colour234
set-option -g status on
# Update the status bar every sixty seconds
set -g status-interval 60
# use PREFIX | to split window horizontally and PREFIX - to split vertically
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# map Vi movement keys as pane movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
setw -g aggressive-resize on
# set-option -g mouse-select-pane on
# set-option -g mouse-select-window on
# explicitly disable mouse control
# setw -g mode-mouse off
# set-window-option -g mode-mouse off
# set -g mouse-select-pane off
# set -g mouse-resize-pane on
# set -g mouse-select-window off
# set-window -g mode-mouse on
# enable mouse mode
# bind m\
# set -g mode-mouse on\;\
# set -g mouse-resize-pane on\;\
# set -g mouse-select-pane on\;\
# set -g mouse-select-window on\;\
# display 'Mouse:on'
# # disable mouse mode
# bind M\
# set -g mode-mouse off\;\
# set -g mouse-resize-pane off\;\
# set -g mouse-select-pane off\;\
# set -g mouse-select-window off\;\
# display 'Mouse:off'
# for tmux 2.1 and above
set -g mouse on
bind-key -T root WheelUpPane select-pane -t =\; copy-mode -e\; send-keys -M
#titles
set -g set-titles on
set -g set-titles-string '#S:#I.#P #W'
set -g status-interval 1
set -g status-left ' #[fg=green,bold]#(/bin/hostname)#[default]'
set -g status-right ' #[fg=cyan,bold]%Y-%b(%m)-%d %l:%M%p#[default]'
# set scrollback history to 10000
set -g history-limit 5000000
# colorize messages in the command line
set -g message-style bg=colour214,fg=colour232,bright
set -g message-command-style fg=blue,bg=black
#window mode
setw -g mode-style bg=colour6,fg=colour0
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# focus events enabled for terminals that support them
set -g focus-events on
# activity notice
setw -g monitor-activity on
set -g visual-activity off
set-option -g visual-silence off
set-option -g bell-action none
set -g status-justify left # center window list for clarity
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
# set-option -g status-position top
# source '/home/rmondal/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf'
#
# run-shell ~/.tmux/plugins/tmux-copycat/copycat.tmux
# run-shell ~/.tmux/plugins/tmux-cpu/cpu.tmux
# run-shell ~/.tmux/plugins/tmux-sidebar/sidebar.tmux