-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
141 lines (111 loc) · 5.08 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# ░█▀▀░█▀▀░█▀█░█▀▀░█▀▄░█▀█░█░░
# ░█░█░█▀▀░█░█░█▀▀░█▀▄░█▀█░█░░
# ░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀
# Use zsh
set-option -g default-shell /bin/zsh
# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# mouse support
set -g mouse on
set -g set-clipboard external
set -g focus-events on
set-option -g renumber-windows on
# change prefix
unbind-key C-b
set -g prefix C-Space
unbind C-Space
bind C-Space send-prefix
# # increase scrollback buffer size
set -g history-limit 50000
# # refresh 'status-left' and 'status-right' more often
set -g status-interval 1
# so that escapes register immediately in vim
set -sg escape-time 0
# start index at 1
set -g base-index 1
# activate auto-saving of session (continuum)
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
bind -Tcopy-mode-vi C-j send -X copy-pipe-and-cancel 'xsel -i'
bind -Tcopy-mode-vi Enter send -X copy-pipe-and-cancel 'xsel -i'
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'xsel -i'
# split panes using | and - (and stay in the current directory)
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Create a new window in the current directory
bind c new-window -c "#{pane_current_path}"
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Easier pane resizing
bind-key J resize-pane -D 10
bind-key K resize-pane -U 10
bind-key H resize-pane -L 10
bind-key L resize-pane -R 10
# Moving between windows
bind i next-window
bind u previous-window
# Renumber all windows
bind R move-window -r
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# ░█▀▀░▀█▀░█░█░█░░░▀█▀░█▀█░█▀▀
# ░▀▀█░░█░░░█░░█░░░░█░░█░█░█░█
# ░▀▀▀░░▀░░░▀░░▀▀▀░▀▀▀░▀░▀░▀▀▀
set -g status-position bottom
set -g popup-border-lines rounded
set -g popup-border-style fg="#665c54"
BACKGROUND=colour234
set -g status-bg $BACKGROUND
set -g status-fg white
set -wg mode-style bg=blue,fg=colour232
set -wg message-style bg=blue,fg=colour232
set -wg message-command-style bg=blue,fg=colour232
set -g status-justify centre
# Settings for tmux-prefix-highlight
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=colour232,bg=blue' # default is 'fg=default,bg=yellow'
set -g @prefix_highlight_show_sync_mode 'on'
set -g @prefix_highlight_sync_mode_attr 'fg=colour232,bg=blue' # default is 'fg=default,bg=yellow'
# To align segments
set -g @prefix_highlight_empty_prompt ' ' # default is '' (empty char)
# one of black, red, green, yellow, blue, magenta, cyan, white, colour0 to
# colour255 from the 256-colour palette, or default, terminal.
# To get a full list of colors:
# for i in {0..255}; do
# printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n"
# done
THEME=blue
THEME_BG=colour240
THEME_TEXT=colour232
THEME_NUMBERS=colour232
THEME_HIGHLIGHTED_NUMBER=colour232
THEME_HIGHLIGHTED_TEXT=colour232
# Status bar: show nothing on the right, show session name on the left.
set -g status-right "continuum: #{continuum_status}m "
set -g status-left " #[fg=$THEME][#S] #{prefix_highlight} "
set -g status-right-length 120
set -g status-left-length 100
# set -g window-status-current-format "#[fg=$THEME]#[fg=$THEME_HIGHLIGHTED_NUMBER]#[bg=$THEME]#I #[bg=$THEME_BG]#[fg=$THEME_HIGHLIGHTED_TEXT] #W#[fg=$THEME_BG]#[bg=$BACKGROUND] "
set -g window-status-current-format "#[fg=$THEME]#[fg=$THEME_HIGHLIGHTED_NUMBER]#[bg=$THEME]#I #[bg=$THEME_BG]#[fg=$THEME_HIGHLIGHTED_TEXT] #{?window_zoomed_flag,#[fg=$THEME_TEXT][[,}#W#{?window_zoomed_flag,#[fg=$THEME_TEXT]]],}#[fg=$THEME_BG]#[bg=$BACKGROUND] "
set -g window-status-format "#[fg=$THEME_BG]#[fg=$THEME_NUMBERS]#[bg=$THEME_BG]#I #[bg=$THEME_BG]#[fg=$THEME_TEXT] #W#[fg=$THEME_BG]#[bg=$BACKGROUND] "
set -g pane-border-style fg=brightblack
# Thin border for active pane
set -g pane-active-border-style fg=magenta
# ░█▀█░█░░░█░█░█▀▀░▀█▀░█▀█░█▀▀
# ░█▀▀░█░░░█░█░█░█░░█░░█░█░▀▀█
# ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'