-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf.tmpl
163 lines (126 loc) · 5.08 KB
/
dot_tmux.conf.tmpl
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Default terminal
set-option -g default-terminal "tmux-256color"
set-option -g default-shell {{ output "brew" "--prefix" | trim }}/bin/nu
# Use vim key bindings
set-option -g mode-keys vi
set-option -g status-keys vi
# Turn the mouse on
set-option -g mouse on
# Turn the clipboard on
set -g set-clipboard on
# Time in milliseconds for which tmux waits after an escape
set-option -g escape-time 0
# Enable supported focus events
set-option -g focus-events on
# History settings
set-option -g history-limit 10000
set-option -g history-file ~/.tmux/tmuxhistory
# Activity
set-option -g monitor-activity off
set-option -g visual-activity off
# Start window index at 1
set-option -g base-index 1
# Start pane index at 1
set-option -g pane-base-index 1
# Rename window to reflect current program
set-option -g -w automatic-rename on
# Renumber windows when one is closed
set-option -g renumber-windows on
# No bells at all
set-option -g bell-action none
# Enable RGB color if running in xterm
set-option -g -a terminal-overrides ",xterm-256color:Tc"
# Unbind default prefix key
unbind-key C-b
# Set default prefix key
set-option -g prefix C-a
# Bind "C-a C-a" to send "C-a"
bind-key C-a send-prefix
# Reload configuration
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Switch panes
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-l select-pane -R
# Switch windows
unbind-key n
bind-key -n M-p previous-window
bind-key -n M-n next-window
bind-key -n M-1 select-window -t:1
bind-key -n M-2 select-window -t:2
bind-key -n M-3 select-window -t:3
bind-key -n M-4 select-window -t:4
bind-key -n M-5 select-window -t:5
bind-key -n M-6 select-window -t:6
bind-key -n M-7 select-window -t:7
bind-key -n M-8 select-window -t:8
bind-key -n M-9 select-window -t:9
bind-key -n M-0 select-window -t:10
# Split pane with same directory
unbind-key '"'
unbind-key '%'
bind-key '-' split-window -v -c "#{pane_current_path}"
bind-key '\' split-window -h -c "#{pane_current_path}"
bind-key '_' split-window -fv -c "#{pane_current_path}"
bind-key '|' split-window -fh -c "#{pane_current_path}"
# Resize panes
bind-key -n M-H resize-pane -L 2
bind-key -n M-J resize-pane -D 1
bind-key -n M-K resize-pane -U 1
bind-key -n M-L resize-pane -R 2
# Toggle zoom
bind-key -n M-z resize-pane -Z
# Move panes
unbind-key '{'
unbind-key '}'
bind-key -r H swap-pane -U
bind-key -r L swap-pane -D
# Kill pane
bind-key x kill-pane
# Swap windows across themselves
bind-key -r '<' swap-window -t -1
bind-key -r '>' swap-window -t +1
# Kill window
unbind-key '&'
bind-key X kill-window
bind-key K kill-window -a
set -g detach-on-destroy off # don't exit from tmux when closing a session
# Rally
bind s display-popup -E -w 80% -h 70% rally.sh
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @catppuccin_flavor "frappe"
set -g @catppuccin_window_status_style "rounded"
# leave this unset to let applications set the window title
set -g @catppuccin_window_text " #W"
set -g @catppuccin_window_current_text " #W"
set -g @catppuccin_window_status "icon"
set -g @catppuccin_window_current_background "#{@thm_mauve}"
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
# Make the status line pretty and add some modules
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_user}"
set -ag status-right "#{E:@catppuccin_status_directory}"
# set -g @plugin "arcticicestudio/nord-tmux"
#set -g @plugin 'dracula/tmux'
# set -g @plugin 'rose-pine/tmux'
# set -g @rose_pine_variant 'main' # Options are 'main', 'moon' or 'dawn'
# set -g @rose_pine_date_time '%r' # It accepts the date UNIX command format (man date for info)
# set -g @rose_pine_bar_bg_disabled_color_option 'default'
# set -g @rose_pine_disable_active_window_menu 'on' # Disables the menu that shows the active window on the left
# set -g @rose_pine_left_separator ' > ' # The strings to use as separators are 1-space padded
# set -g @rose_pine_right_separator ' < ' # Accepts both normal chars & nerdfont icons
# set -g @rose_pine_field_separator ' | ' # Again, 1-space padding, it updates with prefix + I
# set -g @rose_pine_window_separator ' - ' # Replaces the default `:` between the window number and name
# set -g @rose_pine_session_icon '' # Changes the default icon to the left of the session name
# set -g @rose_pine_current_window_icon '' # Changes the default icon to the left of the active window name
# set -g @rose_pine_folder_icon '' # Changes the default icon to the left of the current directory folder
# set -g @rose_pine_username_icon '' # Changes the default icon to the right of the hostname
# set -g @rose_pine_hostname_icon '' # Changes the default icon to the right of the hostname
# set -g @rose_pine_date_time_icon '' # Changes the default icon to the right of the date module
# set -g @rose_pine_window_status_separator " " # Changes the default icon that appears between window names
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'