-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
117 lines (97 loc) · 4.27 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
# For OS X
if-shell "uname | grep -q Darwin" "set-option -g default-command 'reattach-to-user-namespace -l $(brew --prefix)/bin/zsh'"
# Set prefix
set-option -g prefix C-a
unbind C-b
bind-key C-a send-prefix
bind-key a send-prefix
# Reload config
bind-key r source-file ~/.tmux.conf \; display "Reloaded!"
# Reduce keystroke delay
set-option -s escape-time 0
# Increase scrollback buffer size
set-option -g history-limit 50000
# Set time for message display
set-option -g display-time 3000
# Yank selection to clipboard
set -g @yank_selection_mouse 'clipboard'
#Set vi keys
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
bind-key -T copy-mode-vi Escape send -X cancel
if-shell "uname | grep -q Darwin" {
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
} {
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
}
# Turn on focus events
set-option -g focus-events on
# Make windows and panes start with 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Split windows
bind-key - split-window -v -c "#{pane_current_path}"
bind-key \\ split-window -h -c "#{pane_current_path}"
# Navigation
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Resizing
bind-key -r C-h resize-pane -L 5
bind-key -r C-j resize-pane -D 5
bind-key -r C-k resize-pane -U 5
bind-key -r C-l resize-pane -R 5
# Status Bar
set-option -g status-position bottom
set-option -g status-interval 5
set-option -g visual-activity on
set-window-option -g monitor-activity on
set-option -g status-style fg=colour250,bg=colour6
set-option -g status-interval 5
set-option -g status-left-length 30
set-option -g status-left '#[bg=colour0]#[fg=colour40] #[fg=colour250]#S #[default]#[fg=colour0] #[default] '
#set-option -g status-right '#[fg=colour0]#[bg=colour0]#{prefix_highlight}#[bg=colour0] #{cpu_icon}#[fg=colour202]#{cpu_percentage} #{battery_icon} #[fg=colour184] #{battery_percentage} #[fg=colour250]%H:%M 🍺 #[default]'
set-option -g status-right '#[fg=colour0] #[bg=colour0]#{prefix_highlight}#[bg=colour0] #{cpu_icon}#[fg=colour202]#{cpu_percentage} #[fg=colour250]%H:%M #[fg=colour40] #[default]'
set-window-option -g window-status-current-format "#[fg=colour6]#[bg=colour12] #[fg=colour255]#I:#W #[fg=colour12]#[bg=colour6] #[default]"
set-window-option -g window-status-format "#[fg=colour0] #I:#W #[default]"
set-window-option -g window-status-activity-style none
#set-window-option -g automatic-rename off
# Colors and fonts
#set-option -g default-terminal "screen-256color"
set-option -g default-terminal "tmux-256color"
#set-option -ga terminal-overrides ',xterm-256color:Tc'
set-option -gas terminal-overrides ',xterm*:Tc:sitm=\E[3m'
#set-window-option -g window-active-style bg=colour232
#set-window-option -g window-style bg=colour236
# Mouse mode
set-option -g mouse on
bind-key -T copy-mode-vi WheelUpPane send -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send -X scroll-down
# tmux battery
set-option -g @batt_charging_icon "🌶"
set-option -g @batt_charged_icon "🔋"
set-option -g @batt_attached_icon "☢"
set-option -g @batt_full_charge_icon "😎"
set-option -g @batt_high_charge_icon "✅"
set-option -g @batt_medium_charge_icon "⚠️"
set-option -g @batt_low_charge_icon "💀"
# prefix highlight
set-option -g @prefix_highlight_style fg=colour6,bg=colour0
set-option -g @prefix_highlight_show_copy_mode 'on'
set-option -g @prefix_highlight_copy_mode_style fg=colour6,bg=colour0
# sidebar
set-option -g @sidebar-tree-pager 'view -'
# tmux plugin manager
set-option -g @plugin 'christoomey/vim-tmux-navigator'
set-option -g @plugin 'tmux-plugins/tmux-battery'
set-option -g @plugin 'tmux-plugins/tmux-cpu'
set-option -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set-option -g @plugin 'tmux-plugins/tmux-sidebar'
set-option -g @plugin 'tmux-plugins/tmux-yank'
set-option -g @plugin 'tmux-plugins/tpm'
set-option -g @plugin 'tmux-plugins/vim-tmux-focus-events'
run '~/.tmux/plugins/tpm/tpm'