-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
134 lines (100 loc) · 4.7 KB
/
tmux.conf
File metadata and controls
134 lines (100 loc) · 4.7 KB
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
unbind r
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
set -g prefix C-s
set -g mouse on
# Address vim mode switching delay (http://superuser.com/a/252717/65504)
# Setting to 0 may cause issues, so we set a low value (https://superuser.com/a/1809494)
set -s escape-time 5
set -g history-limit 50000
# Increase tmux messages display duration from 750ms to 4s
set -g display-time 4000
# Refresh 'status-left' and 'status-right' more often, from every 15s to 5s
set -g status-interval 5
# Move status bar to the top
set -g status-position top
set -g default-command "$SHELL"
# Upgrade $TERM
set -g default-terminal "screen-256color"
# 24 bit true color. The 'alacritty' portion below must match the value of
# $TERM outside tmux.
# Alacritty now uses 'alacritty' for the $TERM variable, but will fall back
# to xterm-256color if alacritty isn't in the terminfo database.
set -ga terminal-overrides ',alacritty:Tc'
# Focus events enabled for terminals that support them
set -g focus-events on
# Super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
set -g set-titles on
set -g set-titles-string "#S #I:#W"
# Quick session switching back and forth.
bind-key Space switch-client -l
# Intuitive splits
bind | split-window -h -c '#{pane_current_path}'
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
bind _ split-window -v -c '#{pane_current_path}'
# Resizing Splits
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
# Vim-like pane navigation
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Fuzzy find for switching sessions
bind s run-shell "tmux list-sessions \
-F '##{session_activity}:##{session_name}' \
| sort -nr \
| cut -d ':' -f 2 \
| grep -v \"^$(tmux display-message -p '#S')\$\" \
| fzf-tmux -p --reverse \
| xargs tmux switch-client -t"
# Create a new session from an existing split
bind C-b send-keys 'tat && exit' 'C-m'
# Restore clear screen keybind mapped over by tmux-navigator
bind C-l send-keys C-l
# TokyoNight (Storm) 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=#1d202f,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=#1d202f,bg=#7aa2f7,bold] #h "
if-shell '[ "$(tmux show-option -gqv "clock-mode-style")" == "24" ]' {
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 %H:%M #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1d202f,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]"
# Tmux Plugin Manager
#
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
#
# # List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'catppuccin/tmux#latest'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
run '~/.tmux/plugins/tpm/tpm'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)