/
.tmux.conf
108 lines (83 loc) · 4.13 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
# set shell
set -g default-shell /bin/zsh
# Ctrl-a as prefix instead of Ctrl-b
set -g prefix C-a
unbind C-b
# have `C-a C-a` send C-a keypress to the current window
bind C-a send-prefix
# iterm shape cursor fix
#set -g focus-events on
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
##########################
# MINE
bind -n "C-'" run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux split-window -h"
###########################
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
#set-option -g status-fg colour136 #yellow
set-option -g status-fg default #yellow
#set-option -g status-attr default
#set-option -g status-utf8 on
# set window split
bind-key v split-window -h
bind-key b split-window
# default window title colors
#set-window-option -g window-status-fg default
#set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
#set-window-option -g window-status-current-fg green #red #orange
#set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# message text
#set-option -g message-bg colour235 #base02
#set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour167 #orange
# clock
set-window-option -g clock-mode-colour green #green
#set -g status-fg white
#set -g status-bg white
#set status-bg default # transparent background
#set -g status-attr default
set -g status-interval 2
set -g status-justify centre # center align window list
set -g status-left-length 60
set -g status-right-length 140
#set -g status-left "#[fg=black,bg=default,bright]#(tmux-mem-cpu-load --interval 2)#[default]"
set -g status-left "#[fg=default,bg=default]#(tmux-mem-cpu-load --interval 2)#[default]"
set -g status-right '#[fg=default,bg=default] #{battery_icon} #{battery_percentage} | #[fg=green,dim,bg=default]%a %d %h %H:%M#[fg=default,bg=default] | Uptime: #(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=default,bg=default]'
#set -g status-right '#[fg=black,bg=default,bright] Batt: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M | Uptime: #[fg=red,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=black,bg=default,bright]'
bind-key "~" split-window "exec htop"
#
# limit
set-option -g history-limit 500000
# Vim mode
#setw -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
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'tmux-plugins/tmux-yank'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-battery'
# set -g @plugin 'tmux-plugins/vim-tmux-focus-events'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Shared iTerm clipboard
# Copy-paste integration
set-option -g default-command "reattach-to-user-namespace -l zsh"
# don't wait for an escape sequence after hitting
# Esc. fixes insert mode exit lag in vim
#set -sg escape-time -1