-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
79 lines (64 loc) · 3.81 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
# -- general -------------------------------------------------------------------------------------------------
set -g default-shell /bin/zsh
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ',xterm-256color:Tc'
set -g @plugin 'tmux-plugins/tpm' # List of plugins
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'junegunn/tmux-fzf-url'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'omerxx/tmux-sessionx'
source ~/.config/tmux/catppuccin_tmux.tmux.conf
set -g @sessionx-zoxide-mode 'on'
set -s escape-time 0
set -g history-limit 50000
set -g prefix C-a # remap prefix to Control + a
bind C-a send-prefix # bind 'C-a C-a' to type 'C-a'
unbind C-b
bind C-s set-window-option synchronize-panes # Sync panes
bind P pipe-pane -o "cat>>~/#W.log"\; display "Log on ~/#W.log" # Log to file
bind r source-file ~/.tmux.conf \; display "Reloaded!" # Reload
set -g focus-events on
set-option -g allow-passthrough on # To make zen mode work in wezterm
# -- display -------------------------------------------------------------------------------------------------
set -g base-index 1 # Base index for windows
set -g pane-base-index 1 # Base index for panes
set -g monitor-activity on
set -g visual-activity off
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g set-titles-string '#W (#I) [#S]'
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 4000 # slightly longer status messages display time
set -g status-interval 5 # redraw status line every 10 seconds
# -- navigation ----------------------------------------------------------------------------------------------
set-option -g mouse on # Mouse
setw -g mode-keys vi # vi keys
bind h select-pane -L # Move between panes h,j,k,l
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind V split-window -h -c "#{pane_current_path}" # Split panes with V and H
bind S split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind -r H resize-pane -L 20 # Pane resing H,J,K,L
bind -r J resize-pane -D 20
bind -r K resize-pane -U 20
bind -r L resize-pane -R 20
# bind -r C-h select-window -t :- # Quick windows selection
# bind -r C-l select-window -t :+
# -- copy mode -----------------------------------------------------------------------------------------------
bind Escape copy-mode
bind C-p run-shell "tmux set-buffer \"$(pbcopy -o)\"; tmux paste-buffer"
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy -in -selection clipboard'
bind C-y run-shell "tmux show-buffer | pbcopy -sel clip -i"
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind C-l send-keys 'C-l'
# Needed for upterm
set-option -ga update-environment " UPTERM_ADMIN_SOCKET"
run '~/.tmux/plugins/tpm/tpm' # Initialize TMUX plugin manager (keep bottom)