-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
87 lines (68 loc) · 3.66 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
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# Initialize tmux plugin manager
run '~/.tmux/plugins/tpm/tpm'
set -g @colors-solarized 'dark'
set -g default-command "${SHELL}"
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Use vim key bindings.
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Select URL mode
bind u run tmux-url-select
bind z resize-pane -Z
# Renumber windows
set-option -g renumber-windows on
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
## COLORSCHEME: gruvbox dark
set-option -g status "on"
# default statusbar colors
set-option -g status-style "bg=colour255,fg=colour223,none"
set -wg mode-style "bg=colour31,fg=colour239,none"
# default window title colors
set-window-option -g window-status-style "fg=colour237,bg=colour214,none" #yellow
set-window-option -g window-status-activity-style "bg=colour237,fg=colour248,none"
set-window-option -g window-status-current-style "bg=default,fg=colour237"
set-option -g pane-active-border-style "fg=colour250"
set-option -g pane-border-style "fg=colour237"
set-option -g message-style "bg=colour239,fg=colour223"
set-option -g message-command-style "fg=colour223,bg=colour239"
# pane number display
set-option -g display-panes-active-colour colour250
set-option -g display-panes-colour colour237
# clock
set-window-option -g clock-mode-colour colour109 #blue
# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour167 #bg, red
# Bind ']' to use pbbaste
#bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
set-option -g status-justify "left"
set-option -g status-left-style "none"
set-option -g status-left-length "80"
set-option -g status-right-style "none"
set-option -g status-right-length "80"
set-window-option -g window-status-separator ""
set-option -g status-left "#[fg=colour246, bg=colour254] #S #[fg=colour241, bg=colour255, nobold, noitalics, nounderscore] CODESPACE "
set-option -g status-right "#[fg=colour246,bg=colour254] %b %e %l:%M %P #[fg=colour241, bg=colour255, nobold, noitalics, nounderscore] #[fg=colour246,bg=colour254] "
set-window-option -g window-status-current-format "#[fg=colour239, bg=colour31, :nobold, noitalics, nounderscore]#[fg=colour255, bg=colour31] #I#[fg=colour255, bg=colour31, bold] #W #[fg=colour109, bg=colour255, nobold, noitalics, nounderscore] "
set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour246,bg=colour254] #I#[fg=colour246, bg=colour254] #W #[fg=colour239, bg=colour255, noitalics] "