-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
executable file
·46 lines (33 loc) · 1.55 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
# variables
is_macos='uname | grep -q Darwin'
# setup mouse and proper terminal scrolling
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' 'copy-mode -e'"
# enabling vi mode
set-window-option -g mode-keys vi
# setup key bindings
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
# copy and paste using macOS clipboard
if-shell "$is_macos" "set -g default-command 'reattach-to-user-namespace -l zsh'"
if-shell "$is_macos" "bind-key -T copy-mode-vi y copy-pipe 'reattach-to-user-namespace pbcopy'"
if-shell "$is_macos" "bind-key -T copy-mode-vi MouseDragEnd1Pane copy-pipe 'reattach-to-user-namespace pbcopy'"
# setup statusbar design
set -g status-interval 2
set -g status-justify left
set -g status-fg white
set -g status-bg black
set -g status-left "#[fg=white,bg=black]"
set -g status-right-length 100
set -g status-right "#[fg=colour235]#[bg=colour235,fg=white] ↑ #{uptime} #[fg=colour236]#[bg=colour236,fg=white] ⧖ #(date '+%a, %b %d, %H:%M')"
# tmux plugins
# note: type prefix + I to install plugins (prefix = Ctrl+b)
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'pwittchen/tmux-plugin-uptime'
# plugins customization
set -g @sidebar-tree-command 'tree -C'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# see more at: https://github.com/tmux-plugins/tpm
run '~/.tmux/plugins/tpm/tpm'