-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
135 lines (102 loc) · 4.35 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
# -----------------------------------------------------------------------------
# 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'
set -g @plugin 'dracula/tmux'
# -----------------------------------------------------------------------------
# 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 "screen-256color"
# Integrate with OS X pasteboard.
set -g default-command "reattach-to-user-namespace -l zsh"
# Automatically rename window
set-window-option -g automatic-rename
setw -g automatic-rename
# Automatically set title
set-option -g set-titles 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=brightyellow,nobold,nounderscore,noitalics]#[fg=white,bg=brightyellow] #I #[fg=white,bg=brightyellow] #W #[fg=brightyellow,bg=black,nobold,nounderscore,noitalics]" \;\
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
# -----------------------------------------------------------------------------
# Theme
# -----------------------------------------------------------------------------
set -g @dracula-plugins "git"
# 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=brightcyan,bold] #S #[fg=brightcyan,bg=brightyellow,nobold,nounderscore,noitalics] #[fg=white]#I:#P #[fg=brightyellow,bg=black,nobold,nounderscore,noitalics]"
# Status right
set -g status-right-style "none"
set -g status-right-length "100"
set -g status-right "#[fg=brightyellow,bg=black,nobold,nounderscore,noitalics]#[fg=white,bg=brightyellow] #(uptime | sed 's/.*load average//' | awk '{print $2, $3, $4}') %Y-%m-%d %H:%M #[fg=brightcyan,bg=brightyellow,nobold,nounderscore,noitalics]#[fg=white,bg=brightcyan] #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,nounderscore,noitalics]#[fg=black,bg=white] #I #[fg=black,bg=white] #W #[fg=white,bg=black,nobold,nounderscore,noitalics]"
# 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
# Shift + arrows to resize pane
bind -n S-Left resize-pane -L 1
bind -n S-Right resize-pane -R 1
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
# -----------------------------------------------------------------------------
# Tmux Plugin Manager
# -----------------------------------------------------------------------------
# Initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'