-
Notifications
You must be signed in to change notification settings - Fork 3
/
.tmux.conf
187 lines (147 loc) · 4.88 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#
## utf8 is on
#set -g utf8 on
#set -g status-utf8 on
#
## address vim mode switching delay (http://superuser.com/a/252717/65504)
#set -s escape-time 0
#
## increase scrollback buffer size
#set -g history-limit 50000
#
## tmux messages are displayed for 4 seconds
#set -g display-time 4000
#
## refresh 'status-left' and 'status-right' more often
#set -g status-interval 5
#
#
## upgrade $TERM
#set -g default-terminal "screen-256color"
#
## emacs key bindings in tmux command prompt (prefix + :) are better than
## vi keys, even for vim users
#set -g status-keys emacs
#
#unbind C-b
set -g @almost-sensible 'on'
# List of plugins
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-pain-control \
Morantron/tmux-fingers \
tmux-plugins/tmux-urlview \
tmux-plugins/tmux-yank \
'
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
set -g prefix C-s
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
# move x clipboard into tmux paste buffer
bind C-p run "reattach-to-user-namespace pbpaste -o | tmux load-buffer - ; tmux paste-buffer"
# move tmux copy buffer into x clipboard
bind C-c run-shell -b "tmux save-buffer - | reattach-to-user-namespace pbcopy "
######################
### DESIGN CHANGES ###
######################
## Status bar design
# status line
#set -g status-utf8 on
set -g status-justify centre
set -g status-style bg=default,fg=colour12
set -g status-interval 30
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# The modes {
# This is the clock colour (meta+s t)
setw -g clock-mode-colour colour135
#setw -g mode-attr bold
# This is the visual selection color
setw -g mode-style fg=default,bg=colour238
# }
# The panes {
SPACEROOT="df -h / | tail -n 1 | awk '{ print \" \" $4 }'"
WIFI="networksetup -getairportnetwork en0 | awk '{print \" \" $4}'"
BG=default
SBG=colour240
# Variables
SEP=""
SEPL=""
set -g pane-border-style bg=$BG,fg=colour242
set -g pane-active-border-style bg=$BG,fg=white
# }
# The statusbar {
#
RIGTH=""
#RIGTH="$RIGTH#[fg=colour237,bg=colour239,bold]$SEP"
#RIGTH="$RIGTH#[fg=colour239,bg=colour237,bold]$SEP"
RIGTH="$RIGTH#[fg=colour243,bg=$BG,bold]$SEP"
RIGTH="$RIGTH#[fg=colour234,bg=colour243,bold]"
RIGTH="$RIGTH#[fg=colour245,bg=colour243,bold]$SEP"
RIGTH="$RIGTH#[fg=colour234,bg=colour245,bold] %d/%m %H:%M:%S "
UP_ARROW="↑"
DOWN_ARROW="↓"
LEFT=""
#LEFT="$LEFT#[fg=colour234,bg=colour245,bold] $UP_ARROW #{upload_speed} $DOWN_ARROW #{download_speed}."
#LEFT="$LEFT#[fg=colour265,bg=colour243,bold]$SEPL"
LEFT="$LEFT#[fg=colour236,bg=colour243,bold] #($SPACEROOT) "
LEFT="$LEFT#[fg=colour243,bg=colour240]$SEPL"
LEFT="$LEFT#[fg=colour245,bg=colour240,bold] #($WIFI) "
LEFT="$LEFT#[fg=colour240,bg=colour239,bold]$SEPL "
LEFT="$LEFT#[fg=colour239,bg=$BG,bold]$SEPL"
#LEFT="$LEFT#[fg=colour239,bg=$BG,bold]$SEPL"
set -g status-position bottom
set -g status-style fg=$BG,bg=$BG
set -g status-left "$LEFT"
set -g status-right "$RIGTH"
set -g status-right-length 62
set -g status-left-length 60
setw -g window-status-current-style fg=colour81,bg=colour238,bold
setw -g window-status-current-format ' #I: #[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-style fg=colour138,bg=$BG,bold
setw -g window-status-format ' #I: #[fg=colour246]#W#[fg=colour244]#F '
setw -g window-status-bell-style fg=colour255,bg=colour1,bold
# }
# The messages {
set -g message-style fg=colour232,bg=colour166,bold
set -g detach-on-destroy off
# }
# Copy-paste integration
#set-option -g default-command "reattach-to-user-namespace -l zsh"
#
# # Use vim keybindings in copy mode
# setw -g mode-keys vi
#
# # Setup 'v' to begin selection as in Vim
# bind-key -t vi-copy v begin-selection
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
#
# # Update default binding of `Enter` to also use copy-pipe
# unbind -t vi-copy Enter
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
#
# # Bind ']' to use pbpaste
# bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# T
set -g mouse off
#set-option -sa terminal-overrides ',XXX:RGB'
#set-option -g default-terminal "screen-256color"
#set-option -s default-terminal "screen-256color"
#set-option -sa terminal-overrides ",screen-256color:RGB"
#set-option -ga terminal-overrides ",screen-256color:Tc"
set-option -sa terminal-overrides ",xterm*:Tc"
#
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'