-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy path.tmux.conf
129 lines (99 loc) · 4.02 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
# -----------------------------------------------------------------------------
# Plugins
# -----------------------------------------------------------------------------
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-yank'
# -----------------------------------------------------------------------------
# General
# -----------------------------------------------------------------------------
# Change prefix to C-a
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# Support 256 colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
# Automatically rename window
set-window-option -g automatic-rename
setw -g automatic-rename
# Automatically set title
set-option -g set-titles on
# Enable focus events
set-option -g focus-events on
# Start window numbering at 1 so you don't need to reach for 0.
set -g base-index 1
# Don't wait for escape sequence.
set -sg escape-time 0
# Renumber windows if anything changes
set-option -g renumber-windows on
# Update every 5 seconds
set -g status-interval 5
# Monitor activity
set-window-option -g monitor-activity on
set -g visual-activity off
set -g visual-bell off
# Vim mode
setw -g mode-keys vi
# -----------------------------------------------------------------------------
# Nesting
# -----------------------------------------------------------------------------
bind -T root F12 \
set prefix None \;\
set key-table off \;\
set window-status-current-format "#[fg=black,bg=brightgreen,nobold]#[fg=white,bg=brightgreen] #I #[fg=white,bg=brightgreen] #W #[fg=brightgreen,bg=black,nobold]" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F12 \
set -u prefix \;\
set -u key-table \;\
set -u window-status-current-format \;\
refresh-client -S
# -----------------------------------------------------------------------------
# Solarized Theme
# base0 brightblue
# base01 brightgreen
# base02 black
# -----------------------------------------------------------------------------
# Status bar
set -g status "on"
set -g status-style "none"
set -g status-justify "left"
set -g status-bg "black"
# Status left
set -g status-left-style "none"
set -g status-left-length "100"
set -g status-left "#[fg=white,bg=brightblue,bold] #S #[fg=brightblue,bg=brightgreen,nobold] #[fg=white]#I:#P #[fg=brightgreen,bg=black,nobold]"
# Status right
set -g status-right-style "none"
set -g status-right-length "100"
set -g status-right "#[fg=brightgreen,bg=black,nobold]#[fg=white,bg=brightgreen] #(uptime | sed 's/.*load average//' | awk '{print $2, $3, $4}') %Y-%m-%d %H:%M #[fg=brightblue,bg=brightgreen,nobold]#[fg=white,bg=brightblue] #h "
# Window
setw -g window-status-style "none"
setw -g window-status-separator ""
setw -g window-status-format "#[fg=white,bg=black] #I #[fg=white,bg=black] #W "
# Active window
setw -g window-status-activity-style "bold"
setw -g window-status-current-format "#[fg=black,bg=white,nobold]#[fg=black,bg=white] #I #[fg=black,bg=white] #W #[fg=white,bg=black,nobold]"
# Panes
set -g pane-active-border-style "fg=white"
set -g pane-border-style "fg=brightgreen"
# -----------------------------------------------------------------------------
# Key Bindings
# -----------------------------------------------------------------------------
# Re-Load tmux config
bind R source-file ~/.tmux.conf \; display-message "Reloaded ~/.tmux.conf"
# Join pane
bind P choose-window 'join-pane -h -s "%%"'
# Move the current window left or right
bind S-left swap-window -t -1
bind S-right swap-window -t +1
# -----------------------------------------------------------------------------
# Tmux Plugin Manager
# -----------------------------------------------------------------------------
# Initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'