-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
99 lines (75 loc) · 2.77 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
# Set true colors
set-option -sa terminal-overrides ",xterm*:Tc"
# Enable mouse support
set -g mouse on
# Set prefix
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# set-option -g default-shell /usr/bin/fish
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# tmux adds a very small delay when sending commands,
# and this delay can interfere with other programs such as the Vim text editor
# issue keystrokes without delay
set -sg escape-time 0
# shotcut to reload config file
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"
bind q detach
bind z resize-pane -Z
bind e list-windows
set-option -g automatic-rename on
# Shortcut to split panes
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# new window with name prompt, opens window in current pane directory
bind c command-prompt -p "window name:" "new-window -c '#{pane_current_path}'; rename-window '%%'"
bind % command-prompt -p "window name:" "rename-window '%%'"
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
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
# To be notified when something happens in one of the other windows
# in our session so we can react to it
setw -g monitor-activity on
set -g visual-activity on
# Use vi mode to work with buffers
setw -g mode-keys vi
# Set the tmux window option xterm-keys so that tmux will pass these keys through to its terminals
set-window-option -g xterm-keys on
# Set terminal titles by session name
set -g set-titles on
set -g set-titles-string '#S'
# If you have gaps in windows numbers, this command will reorder them
bind R \
move-window -r\; \
display-message "Windows reordered..."
# or it can be done automatically
set -g renumber-windows on
set -g @catppuccin_window_current_text "#{window_name}"
set -g @catppuccin_window_default_text "#{window_name}"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
# set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'catppuccin/tmux#latest'
# set-option -g automatic-rename off
# set-option -g allow-rename off
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'