-
Notifications
You must be signed in to change notification settings - Fork 8
/
tmux.conf
75 lines (67 loc) · 2.77 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
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
unbind c-b
bind-key c-o send-prefix
set -g base-index 1
set -s default-terminal screen-256color
set -g display-time 1000
set -g focus-events on
set -g history-limit 50000
set -g message-style bg=default,fg=blue
set -g mode-keys vi
set -g mouse on
set -g pane-active-border-style fg=blue
set -g pane-base-index 1
set -g pane-border-style fg=colour242
set -g prefix c-o
set -g status-interval 1
set -g status-justify left
set -g status-keys emacs
set -g status-left "⎡#S⎤ "
set -g status-right "⎡#{?#{!=:#{battery_percentage},},⚛ #{battery_percentage} │ ,}☉ %a %-m.%d │ ♁ %l:%M %p⎤"
set -g status-style bg=default,fg=blue
set -g window-status-current-format "#I:#W#{?window_zoomed_flag,*,}"
set -g window-status-current-style bg=blue,fg=black
set -g window-status-format "#I:#W#{?window_zoomed_flag,*,}"
set -g window-status-separator " "
set -ga terminal-overrides ,alacritty:RGB
set -s escape-time 0
if-shell \
"sysctl -n machdep.cpu.brand_string | grep M1" \
"set -g default-command \"arch -arm64 zsh\""
bind-key e select-layout even-horizontal
bind-key E select-layout even-vertical
bind-key s source-file ~/.tmux.conf \; display "Sourced!"
bind-key '"' split-window -c '#{pane_current_path}' -h
bind-key = split-window -c '#{pane_current_path}'
bind-key % choose-buffer
bind-key -r c-h select-window -t :-
bind-key -r c-l select-window -t :+
bind-key -r c-k swap-pane -U
bind-key -r c-j swap-pane -D
bind-key -r L resize-pane -R 5
bind-key -r H resize-pane -L 5
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
unbind-key -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel cpy
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel cpy
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel cpy
# 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 M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
bind-key -n 'M-\' if-shell "$is_vim" "send-keys M-\\" "select-pane -l"
bind-key -T copy-mode-vi M-h select-pane -L
bind-key -T copy-mode-vi M-j select-pane -D
bind-key -T copy-mode-vi M-k select-pane -U
bind-key -T copy-mode-vi M-l select-pane -R
bind-key -T copy-mode-vi 'M-\' select-pane -l
bind-key -n M-H select-window -t :-
bind-key -n M-L select-window -t :+
run -b '~/.tmux/plugins/tpm/tpm'