-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
99 lines (80 loc) · 3.22 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
# Change prefix
unbind-key C-b
set-option -g prefix C-Space
# Theme
set-option -g default-terminal "screen-256color"
set-option -g status-position top
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavor 'mocha'
set -g @catppuccin_custom_plugin_dir "~/.tmux/status-plugins"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_window_status "icon"
set -g @catppuccin_window_default_fill "all"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_window_middle_separator "|"
set -g @catppuccin_window_right_separator ""
set -g @catppuccin_window_left_separator " "
set -g @catppuccin_window_default_color "color223"
set -g @catppuccin_window_default_background "black"
set -g @catppuccin_window_current_color "color167"
set -g @catppuccin_window_current_background "black"
set -g @catppuccin_pane_active_border_style "fg=color167"
set -g @catppuccin_status_justify "absolute-centre"
set -g @catppuccin_status_modules_right "world_clock"
set -g @catppuccin_status_modules_left "custom_left"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_background "black"
set -g window-style 'fg=colour247,bg=colour233'
set -g window-active-style 'fg=colour250,bg=black'
# Minor hack
set -g @catppuccin_custom_left_icon " #{?client_prefix,,#{?pane_in_mode,,#{?pane_synchronized,,}}}"
set -g @catppuccin_custom_left_text "#[fg=color109,bg=#000000] #{monitor_scripts_output}"
# Indexing
set-option -g base-index 1
set-option -g renumber-windows on
# Manually handle naming
set-window-option -g automatic-rename off
set-window-option -g allow-rename off
bind-key . command-prompt -I "#W" -p "rename:" "rename-window -- '%%'"
bind-key , command-prompt -p "move to:" "move-window -r -t '%%'"
# Change tooltip display
set-option -g display-time 750
# Do not detach if session is destroyed
set-option -g detach-on-destroy off
# Modify delay for escape key
## Ref: https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
set-option -sg escape-time 1
# Synchronize panes
bind-key S set-window-option synchronize-panes
# Move pains
bind-key X command-prompt -p "window to join:" "join-pane -t '%%'"
bind-key B break-pane
# Clipboard
set-window-option -g mode-keys vi
# Alerting
set-option -g visual-bell off
setw -g monitor-activity off
# Mouse
set-option -g mouse on
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'belminf/tmux-monitor-scripts'
set -g @monitor_scripts_sep " "
set -g @monitor_scripts_format ' #{monitor_output} '
set -g @plugin 'belminf/tmux-pain-control'
set -g @pane_new_window_binding "no"
bind-key c command-prompt -p "window name:" "new-window; rename-window '%%'"
bind-key C command-prompt -p "window name:" "new-window; rename-window '%%'"
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_selection_mouse 'clipboard'
bind-key -T copy-mode-vi Escape send-keys -X cancel
bind-key -n MouseDown2Pane run "xclip -o -sel clipboard | tmux load-buffer -; tmux paste-buffer"
bind-key v copy-mode
bind-key p paste-buffer
# macOS specific
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux/macos.conf'
# Init TPM
run -b '~/.tmux/plugins/tpm/tpm'