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
|
# unbind default prefix
unbind C-b
# set prefix to ctrl-a
set -g prefix C-a
# dont mess up with other ctrl-a options by pressing ctrl-a twice
bind C-a send-prefix
# use mouse to scroll
set -g mouse on
# set clipboard on
set-option -g set-clipboard external
# vim mode and copy keybindings
# enable vi mode
setw -g mode-keys vi # list keybindings: tmux list-keys -T copy-mode-vi
# remap copy paste keys
unbind [
bind y copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
bind-key -T copy-mode-vi "Y" send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDown3Pane select-pane # right mouse button (to highlight sutff)
bind-key -T copy-mode-vi MouseDrag3Pane select-pane \; send-keys -X begin-selection
unbind-key -T copy-mode-vi MouseDragEnd3Pane
# set zsh as default shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
set -s default-terminal tmux-256color
set -s terminal-overrides ''
set -as terminal-overrides ',*:Tc'
set-option -g xterm-keys on
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
set -g history-limit 10000
# vim style spliting
bind-key v split-window -h
bind-key s split-window -v
# pane movement similar to vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize pane
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# styling
set -g mode-style "fg=#7aa2f7,bg=#3b4261"
set -g message-style "fg=#7aa2f7,bg=#3b4261"
set -g message-command-style "fg=#7aa2f7,bg=#3b4261"
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#7aa2f7"
set -g status "on"
set -g status-justify "left"
set -g status-style "fg=#7aa2f7,bg=#1f2335"
set -g status-left-length "100"
set -g status-right-length "100"
set -g status-left-style NONE
set -g status-right-style NONE
set -g status-left "#[fg=#15161E,bg=#7aa2f7,bold] #S #[fg=#7aa2f7,bg=#1f2335,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics] #[fg=#7aa2f7,bg=#1f2335] #{prefix_highlight} #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics] #[fg=#7aa2f7,bg=#3b4261] %Y-%m-%d %I:%M %p #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics] #[fg=#15161E,bg=#7aa2f7,bold] #h "
setw -g window-status-activity-style "underscore,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-format "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics] #[default] #I #W #F #[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics] "
setw -g window-status-current-format "#[fg=#1f2335,bg=#3b4261,nobold,nounderscore,noitalics] #[fg=#7aa2f7,bg=#3b4261,bold] #I #W #F #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics] "
|