-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
125 lines (93 loc) · 3.52 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
set -g mouse on
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
set-option -g history-limit 10000
set-option -sg escape-time 10
set-option -g default-shell /bin/zsh
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind -n C-n next-window
bind -n C-p previous-window
bind C-l send-keys 'C-l'
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'Morantron/tmux-fingers'
set -g @fingers-copy-command 'xclip -selection clipboard'
set -g @fingers-compact-hints 0
set -g @fingers-key "C-i"
run -b '~/.tmux/plugins/tpm/tpm'
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
bind -n C-h run "($is_vim && tmux send-keys C-h) || \
tmux select-pane -L"
bind -n C-j run "($is_vim && tmux send-keys C-j) || \
($is_fzf && tmux send-keys C-j) || \
tmux select-pane -D"
bind -n C-k run "($is_vim && tmux send-keys C-k) || \
($is_fzf && tmux send-keys C-k) || \
tmux select-pane -U"
bind -n C-l run "($is_vim && tmux send-keys C-l) || \
tmux select-pane -R"
bind-key -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Resize panes
bind -n M-k resize-pane -U 10
bind -n M-j resize-pane -D 10
bind -n M-h resize-pane -L 10
bind -n M-l resize-pane -R 10
# tmux line
set-option -g status-position bottom
set -g status-justify left
set -g status-style "fg=#4c4c4b bg=#272822 bold"
set-window-option -g mode-style "fg=#eeeeed bg=#0087af"
set -g status-left ""
set -g status-left-length 10
set -g status-right "#[bg=#005f87 fg=#e4e4e4] #S "
set -g status-right-length 40
set -g window-status-current-style "fg=#e4e4e4 bg=#005f87"
set -g window-status-style "fg=#444444 bg=#d0d0d0"
set -g window-status-format " #I #{window_name} #{?window_zoomed_flag,🔍,} "
set -g window-status-current-format " #I #{window_name} #{?window_zoomed_flag,🔍,} "
set -g window-status-separator " "
set -g message-style "fg=#4c4c4b bg=#eeeeed"
set -g pane-active-border-style "fg=#4c4c4b bg=#eeeeed"
set -g pane-border-style "fg=#4c4c4b bg=#eeeeed"
#############################
############# Tmux Vars
#############################
# $(echo $USER) - shows the current username
# %a --> Day of week (Mon)
# %A --> Day of week Expanded (Monday)
# %b --> Month (Jan)
# %d --> Day (31)
# %Y --> Year (2017)
# %D --> Month/Day/Year (12/31/2017)
# %v --> Day-Month-Year (31-Dec-2017)
# %r --> Hour:Min:Sec AM/PM (12:30:27 PM)
# %T --> 24 Hour:Min:Sec (16:30:27)
# %X --> Hour:Min:Sec (12:30:27)
# %R --> 24 Hour:Min (16:30)
# %H --> 24 Hour (16)
# %l --> Hour (12)
# %M --> Mins (30)
# %S --> Seconds (09)
# %p --> AM/PM (AM)
# For a more complete list view: https://linux.die.net/man/3/strftime
#colour0 (black)
#colour1 (red)
#colour2 (green)
#colour3 (yellow)
#colour4 (blue)
#colour7 (white)
#colour5 colour6 colour7 colour8 colour9 colour10 colour11 colour12 colour13 colour14 colour15 colour16 colour17
#D ()
#F ()
#H (hostname)
#I (window index)
#P ()
#S (session index)
#T (pane title)
#W (currnet task like vim if editing a file in vim or zsh if running zsh)