-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
112 lines (90 loc) · 3.19 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
#------------------------------------
# General
#------------------------------------
# 256 colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ',*256col*:Tc'
# Default shell
set -g default-shell /bin/zsh
# Autotically set windows title
set-window-option -g automatic-rename off
set-option -g set-titles on
set-option -g allow-rename off
set-option -sg escape-time 10
set -g status off
# History limit
set -g history-limit 10000
# Escape no delay
set -sg escape-time 0
# status bar
bind-key b set status
#------------------------------------
# Mouse
#------------------------------------
# Mouse
#set -g mouse-utf8 on
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe "pbcopy" \; send -X clear-selection
#------------------------------------
# Notification
#------------------------------------
set -g bell-action none
set-option -g visual-activity on
set-option -s set-clipboard off
#------------------------------------
# Styling
#------------------------------------
# Separator
set -g pane-border-status off
set -g pane-border-style fg=colour232,bg=colour232
set -g pane-active-border-style fg=colour232,bg=colour232
# Background
setw -g window-active-style bg=colour233
setw -g window-style bg=colour232
# vim events
set -g focus-events on
# Status bar
# hide status bar in tmux
set -g status off
set -g status-position bottom
set -g status-left ''
set -g status-right ''
set -g status-justify centre # center align window list
setw -g status-bg colour232
setw -g window-status-format '#[bg=colour234]#[fg=black,bold] #I #[bg=colour234#[fg=black,bold] #W '
setw -g window-status-current-format '#[fg=colour245,bold]#[bg=colour237] #I #[fg=colour245,bold]#[bg=colour238] #W '
# Panels
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Tmux session fzf
TMUX_FZF_PREVIEW=1
TMUX_FZF_OPTIONS="-d 40%"
FZF_DEFAULT_OPTS="-m --bind ctrl-y:preview-up,ctrl-e:preview-down --preview-window noborder:nofollow --no-separator"
#------------------------------------
# Plugins
#------------------------------------
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
#------------------------------------
# Other
#------------------------------------
run '~/.tmux/plugins/tpm/tpm'
set-option -g status-interval 5
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'