-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.tmux.conf
89 lines (73 loc) · 3.72 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
# C-a instead of C-b for prefix. Use C-aC-a to goto start of line in prompt
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
set -g base-index 1
# split new pane to current path
bind c new-window -c "#{pane_current_path}"
bind '%' split-window -c "#{pane_current_path}"
bind '"' split-window -h -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind H resize-pane -L 10
bind J resize-pane -D 10
bind K resize-pane -U 10
bind L resize-pane -R 10
bind left resize-pane -L 10
bind down resize-pane -D 10
bind up resize-pane -U 10
bind right resize-pane -R 10
bind -n M-H previous-window
bind -n M-L next-window
bind -n M-S-left previous-window
bind -n M-S-right next-window
bind -n C-M-H swap-window -t - \; previous-window
bind -n C-M-L swap-window -t + \; next-window
bind -n C-M-S-left swap-window -t - \; previous-window
bind -n C-M-S-right swap-window -t + \; next-window
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-down select-pane -D
bind -n M-up select-pane -U
bind -n M-right select-pane -R
set -g mouse on
bind-key -T root MouseDown2Pane run-shell -b "xclip -o | tmux load-buffer - && tmux paste-buffer"
# set-window-option -g window-status-current-style bg=red
# set-window-option -g pane-active-border-style fg=yellow
# status bar config
set -g status 'on'
set -g status-position bottom
set -g status-bg 'colour235'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status-right-length '100'
set -g message-style fg='colour222',bg='colour238'
set -g message-command-style fg='colour222',bg='colour238'
set -g pane-border-style fg='colour238'
set -g pane-active-border-style fg='colour154'
setw -g window-status-activity-style fg='colour154',bg='colour235',none
setw -g window-status-separator ''
setw -g window-status-style fg='colour121',bg='colour235',none
set -g status-left '#[fg=colour232,bg=colour154] #S #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #W #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] #(whoami) #(uptime | cut -d " " -f 1,2,3) #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour121,bg=colour235] %r %a %Y #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #H #[fg=colour154,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour154] #(rainbarf --battery --remaining --no-rgb) '
setw -g window-status-format '#[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]#[default] #I #W #[fg=colour235,bg=colour235,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '#[fg=colour235,bg=colour238,nobold,nounderscore,noitalics]#[fg=colour222,bg=colour238] #I #W #F #[fg=colour238,bg=colour235,nobold,nounderscore,noitalics]'
set -g default-terminal "screen-256color"
# default shell
# set-option -g default-shell "/bin/bash"
set-option -g default-shell "/bin/zsh"
set -sg escape-time 0 # no delay when pressing escape key
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key e split-window -h "nvim ~/.tmux.conf"
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind-key -T copy-mode-vi '_' send -X start-of-line
bind-key -T copy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-toggle
# Copy with mouse to clipboard in Mac
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"