-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
165 lines (128 loc) · 4.03 KB
/
.tmux.conf
File metadata and controls
165 lines (128 loc) · 4.03 KB
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
# change prefix to Window-a key
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# run powerline daemon
#run-shell "powerline-daemon -q"
# reload config file
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
set -g pane-base-index 1
# screen mode
set -g default-terminal "screen-256color"
# update the TERM variable of terminal emulator when creating a new session or attaching a existing session
set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM'
# determine if we should enable 256-colour support
if "[[ ${TERM} =~ 256color || ${TERM} == fbterm ]]" 'set -g default-terminal screen-256color'
# history
set -g history-limit 4096
# allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
# use vi mode
setw -g mode-keys vi
set -g status-keys vi
# splitting
unbind %
bind h split-window -h
unbind '"'
bind v split-window -v
# new windows
bind Enter new-window
# window switching
unbind n
bind -n C-Down next
bind -n C-Up prev
bind -n S-Right next-window
bind -n S-Left previous-window
bind -n S-up swap-window -t -1
bind -n S-down swap-window -t +1
# colon :
bind : command-prompt
# panes
set -g pane-border-fg colour8
set -g pane-active-border-fg colour2
# resize panes using PREFIX H, J, K, L
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# toggle statusbar
bind-key b set-option status
# status line
set -g status-justify left
set -g status-bg default
set -g status-fg cyan
set -g status-interval 2
# messaging
set -g message-fg colour6
set -g message-bg black
set -g message-command-fg colour6
set -g message-command-bg black
set -g automatic-rename on
#window mode
setw -g mode-bg black
setw -g mode-fg colour2
# colors
setw -g window-status-format "#[bg=default]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=default]#[fg=colour2] #W "
setw -g window-status-current-attr dim
#set -g status-position bottom
set -g status-justify centre
set -g status-left ''
set -g status-right ''
# chimes
set-option -g visual-bell off
set-option -g visual-silence off
set-option -g bell-action none
# tmux clock
set -g clock-mode-colour colour10
# some key-binding changes
bind x kill-pane
bind X next-layout
bind Z previous-layout
# Highlight active window
set-window-option -g window-status-current-bg black
# Fix Ctrl arrow left and right
set-window-option -g xterm-keys on
# Terminal emulator window titles
set -g set-titles on
set -g set-titles-string "#T"
# Browsing URLs urlview
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; run-shell "$TERMINAL -e urlview /tmp/tmux-buffer"
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# X clipboard integration
# Vim style
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -sel clip > /dev/null"
bind-key p run "xclip -o -sel clip | tmux load-buffer - ; tmux paste-buffer"
# enable powerline status bar
#source "/usr/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf"
# use mouse in copy mode
#set-option -ga terminal-override ',rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007'
#setw -g mode-mouse on
#set-option -g mouse-select-pane on
# vim like bindings for copy mode
#bind V send-keys "0v\$"
#bind -t vi-copy V rectangle-toggle
#bind Escape copy-mode
#unbind p
#bind p paste-buffer
#bind -t vi-copy 'v' begin-selection
#bind -t vi-copy 'y' copy-selection
#bind -t vi-copy 'Space' halfpage-down
#bind -t vi-copy 'Bspace' halfpage-up
# Powerline
#run-shell "powerline-daemon -q"
#source "/home/curiousx/.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
# TPM
# List of plugins
#set -g @plugin 'tmux-plugins/tpm'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
#run '~/.tmux/plugins/tpm/tpm'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'