-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
139 lines (100 loc) · 4.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
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
# Set directories
tmux_dir="~/.tmux"
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
unbind-key C-b
# Allows using Alt Arrowkeys in tmux and zsh
# set-window-option -g xterm-keys on
# Allows for faster key repetition
set -s escape-time 0
# Renumber windows if a window is closed
set-option -g renumber-windows on
# Do not rename windows
set-window-option -g allow-rename off
set-window-option -g automatic-rename off
set-option -g set-titles on
# Pass through focus events
set -g focus-events on
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key C-a send-prefix
bind-key a send-prefix
bind-key c new-window -c "#{pane_current_path}"
bind-key C new-window
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
#vi key binding for edit/copy mode
set-window-option -g mode-keys vi
# set default to 256 color terminal and a decent amount of history
# set -g default-terminal "tmux-256color"
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
set -as terminal-features ",wezterm:RGB:clipboard"
set -as terminal-features ",alacritty:RGB:clipboard"
set -g history-limit 100000
# easier window splitting into panes
unbind %
bind-key | split-window -h
bind-key - split-window -v
# easier window and pane handling
set -g base-index 1
set-option -g display-panes-time 2000
bind-key -n S-left previous-window
bind-key -n S-right next-window
# Copy to system clipboard
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
# TokyoNight colors for Tmux
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=#7aa2f7,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#15161E,bg=#7aa2f7,bold] #h #{tmux_mode_indicator}"
setw -g window-status-activity-style "italics,fg=color3"
setw -g window-status-bell-style "italics,fg=#f7768e"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-format " #I: #W "
setw -g window-status-current-format "#[fg=#1f2335,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] #I:#[fg=#7aa2f7,bg=#3b4261,bold] #W #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]"
# style values for prefix prompt
set -g @mode_indicator_prefix_prompt '#[default]#[bg=blue]#[fg=black] WAIT '
set -g @mode_indicator_prefix_mode_style 'bg=black,fg=blue'
# style values for copy prompt
set -g @mode_indicator_copy_prompt '#[default]#[bg=yellow]#[fg=black] COPY '
set -g @mode_indicator_copy_mode_style 'bg=black,fg=yellow'
# style values for sync prompt
set -g @mode_indicator_sync_prompt '#[default]#[bg=red]#[fg=black] SYNC '
set -g @mode_indicator_sync_mode_style 'bg=black,fg=red'
# prompt to display when tmux is in normal mode
set -g @mode_indicator_empty_prompt '#[default]#[bg=cyan]#[fg=black] TMUX '
set -g @mode_indicator_empty_mode_style 'bg=black,fg=cyan'
set -g @resurrect-dir "$tmux_dir/resurrect"
set -g @resurrect-save "S" # Save the session
set -g @resurrect-restore "R" # Reload the session
#set -g @continuum-restore "on" # Last saved session is always restored
# Include local configs
#source .tmux.conf.local
# Plugins
set -g @plugin 'tmux-plugins/tpm'
# Mode Indicator
set -g @plugin "MunifTanjim/tmux-mode-indicator"
# Restore tmux sessions
set -g @plugin "tmux-plugins/tmux-resurrect"
# Continuous saving of tmux environment - MUST BE LAST
set -g @plugin "tmux-plugins/tmux-continuum"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'