-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_tmux.conf
More file actions
119 lines (95 loc) · 4.39 KB
/
dot_tmux.conf
File metadata and controls
119 lines (95 loc) · 4.39 KB
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
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'aserowy/tmux.nvim'
set -g @plugin "tmux-plugins/tmux-yank"
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'roosta/tmux-fuzzback'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'omerxx/catppuccin-tmux'
set -g @plugin 'fcsonline/tmux-thumbs'
set -g @plugin 'omerxx/tmux-floax'
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
set -g pane-active-border-style 'fg=magenta,bg=default'
set -g pane-border-style 'fg=brightblack,bg=default'
set -g mouse on
# Address vim mode switching delay
set -s escape-time 0
# Increase scrollback buffer size
set -g history-limit 50000
# Increase tmux messages display duration to 4s
set -g display-time 4000
# Refresh status bar every 5s
set -g status-interval 5
# Emacs keys in tmux command prompt (prefix + :)
set -g status-keys emacs
# Focus events for terminals that support them
set -g focus-events on
# Better resize in grouped sessions / multi-monitor
setw -g aggressive-resize on
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set -g renumber-windows on
set -g status-position top
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*:Tc" # true color passthrough
set -ga terminal-overrides ",*:UTF-8" # Nerd Font / wide glyphs
set -g pane-active-border-style 'fg=magenta,bg=default'
set -g pane-border-style 'fg=brightblack,bg=default'
bind -n M-H previous-window
bind -n M-L next-window
set-window-option -g mode-keys vi
bind-key Space copy-mode # enter scroll/log-browsing mode (vi keys inside)
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# open pane in current directory
bind c new-window -c "#{pane_current_path}"
bind s split-window -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
# Use Ctrl-b + 1 to switch to window 1
# bind-key -n C-b 1 select-window -t 1
#
# # Use Ctrl-b + 2 to switch to window 2
# bind-key -n C-b 2 select-window -t 2
#
# # Use Ctrl-b + 3 to switch to window 3
# bind-key -n C-b 3 select-window -t 3
#
# # Use Ctrl-b + 4 to switch to window 4
# bind-key -n C-b 4 select-window -t 4
#
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' { if -F '#{pane_at_left}' '' 'select-pane -L' }
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' { if -F '#{pane_at_bottom}' '' 'select-pane -D' }
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' { if -F '#{pane_at_top}' '' 'select-pane -U' }
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' { if -F '#{pane_at_right}' '' 'select-pane -R' }
bind-key -T copy-mode-vi 'C-h' if -F '#{pane_at_left}' '' 'select-pane -L'
bind-key -T copy-mode-vi 'C-j' if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind-key -T copy-mode-vi 'C-k' if -F '#{pane_at_top}' '' 'select-pane -U'
bind-key -T copy-mode-vi 'C-l' if -F '#{pane_at_right}' '' 'select-pane -R'
# To update
set -g @floax-bind 't'
# ── Catppuccin theme ───────────────────────────────────────────────────────────
# Separators: U+E0B6 (left half-circle), U+E0B4 (right half-circle), U+E0BD (middle)
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"
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}"
#TMUX_FZF_LAUNCH_KEY="C-f"
run '~/.tmux/plugins/tpm/tpm'