-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
231 lines (189 loc) · 7.72 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# Powerline theme
#source "/usr/share/tmux/powerline.conf"
set -g status-position top
# Increase scrollback buffer size
set -g history-limit 10000
# Renumber windows when one is removed.
set -g renumber-windows on
# Mouse scrolling on terminal
setw -g mouse on
# Allow the mouse to resize windows and select tabs
set -g mouse on
# use vim keys to move around
setw -g mode-keys vi
#--------------------------------------------------------------------------
# Key Bindings
#--------------------------------------------------------------------------
# Set the prefix to Ctrl+Space
set -g prefix C-Space
# Send prefix to a nested tmux session by doubling the prefix
bind C-Space send-prefix
# Automatically copy tmux selection to X clipboard
#set-option -s set-clipboard off
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
bind y run -b "tmux show-buffer | xclip -selection clipboard"\; display-message "Copied tmux buffer to system clipboard"
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# split panes using | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Change the path for newly created windows
bind c new-window -c "#{pane_current_path}"
# Move around panes like in vim
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Resize panes using Vim-like keybindings
bind -r h resize-pane -L 10
bind -r l resize-pane -R 10
bind -r j resize-pane -D 10
bind -r k resize-pane -U 10
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# Reduce lag while exiting from vim insert mode
set -sg escape-time 0
# Switch between previous and next windows with repeatable
bind -r n next-window
bind -r p previous-window
# Switch between two most recently used windows
bind Space last-window
# Switch between two most recently used sessions
bind ^ switch-client -l
# don't rename windows automatically
set-option -g allow-rename off
# Set the default terminal mode to 256color mode
#set -g default-terminal "tmux-256color"
#set-option -sa terminal-features ',kitty:RGB'
#set-option -sa terminal-features ',xterm-kitty:RGB'
set -g default-terminal "${TERM}"
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
# pane border
set -g pane-border-style fg=colour235
set -ga pane-border-style bg=colour240
# message text
set -g message-style fg=colour166
set -ga message-style bg=colour235
# start windows numbering at 1
set -g base-index 1
# make pane numbering consistent with windows
setw -g pane-base-index 1
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
#--------------------------------------------------------------------------
# Plugins
#--------------------------------------------------------------------------
#set -g @plugin 'catppuccin/tmux'
set -g @plugin 'omerxx/catppuccin-tmux'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'jaclu/tmux-menus' # pop-up menus
# set -g @plugin 'omerxx/tmux-sessionx'
# set -g @plugin 'omerxx/tmux-floax'
#set -g @plugin 'dracula/tmux'
#set -g @plugin 'swaroopch/tmux-pomodoro'
#set -g @plugin 'olimorris/tmux-pomodoro-plus'
# -------------------
# continuum config
# -------------------
set -g @continuum-restore 'on'
set -g @continuum-save-interval '60'
#set -g status-right 'Continuum status: #{continuum_status}'
# -------------------
# SessionX configuration
# -------------------
set -g @sessionx-bind-zo-new-window 'ctrl-y'
set -g @sessionx-auto-accept 'off'
set -g @sessionx-custom-paths '/Users/cristian/.dotfiles/'
set -g @sessionx-bind 'f'
set -g @sessionx-x-path '~/.dotfiles'
set -g @sessionx-window-height '85%'
set -g @sessionx-window-width '75%'
set -g @sessionx-zoxide-mode 'on'
set -g @sessionx-custom-paths-subdirectories 'false'
set -g @sessionx-filter-current 'false'
# -------------------
# FloaX configuration
# -------------------
set -g @floax-width '80%'
set -g @floax-height '80%'
set -g @floax-border-color 'magenta'
set -g @floax-text-color 'blue'
unbind 't'
set -g @floax-bind 't'
set -g @floax-change-path 'true'
# -------------------
# Catppuccin config
# -------------------
set -g @catppuccin_flavour 'frappe' # latte, frappe, macchiato, mocha
set -g @catppuccin_window_status_enable "yes"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}"
set -g @catppuccin_status_modules_right "directory date_time" # meetings date_time
set -g @catppuccin_status_modules_left "session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{b:pane_current_path}"
#set -g @catppuccin_meetings_text "#($HOME/.config/tmux/scripts/cal.sh)"
#set -g @catppuccin_date_time_text "%H:%M"
# -------------------
# Dracula config
# -------------------
#set -g @dracula-show-powerline true
#set -g @dracula-show-flags true
#set -g @dracula-show-left-icon session
#set -g @dracula-show-fahrenheit false
#set -g @dracula-show-location false
#set -g @dracula-day-month true
#
## Git powerline customization
#set -g @dracula-git-no-untracked-files true
#set -g @dracula-git-no-repo-message "N/A"
## Avoid using non unicode characters that bash uses like $, * and !
#set -g @dracula-git-show-current-symbol ✓
# available plugins:
# battery, cpu-usage, git, gpu-usage, ram-usage, network,
# network-bandwidth, network-ping, weather, time
#set -g @dracula-plugins "git weather time"
# -------------------
# Pomodoro plus configuration
# -------------------
#set -g status-left "#{pomodoro_status}"
#set -g @pomodoro_start 'a' # Start a Pomodoro with tmux-prefix + p
#set -g @pomodoro_cancel 'A' # Cancel a Pomodoro with tmux-prefix key + P
#set -g @pomodoro_mins 25 # The duration of the pomodoro
#set -g @pomodoro_break_mins 5 # The duration of the break after the pomodoro
#set -g @pomodoro_on " 🍅" # The formatted output when the pomodoro is running
#set -g @pomodoro_complete " ✅" # The formatted output when the break is running
#set -g @pomodoro_notifications 'off' # Enable desktop notifications from your terminal
#set -g @pomodoro_sound 'on' # Sound for desktop notifications (Run `ls /System/Library/Sounds` for a list of sounds to use on Mac)
# (keep the following line at the very bottom of tmux.conf)
# Initialize TMUX plugin manager
run -b '~/.tmux/plugins/tpm/tpm'