-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
127 lines (104 loc) · 4.69 KB
/
tmux.conf
File metadata and controls
127 lines (104 loc) · 4.69 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
120
121
122
123
124
125
126
127
# ==========================
# General Options
# ==========================
set -g history-limit 1000000
set-option -g mouse on
set -g base-index 1
set -g pane-base-index 1
set-option -g renumber-windows on
setw -g mode-keys vi
set-window-option -g xterm-keys on
set -g default-terminal "${TERM}"
# set-option -g default-command "reattach-to-user-namespace -l zsh" # For macOS
# ==========================
# Keybindings
# ==========================
# Remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Switch panes with Ctrl + Arrow Keys
bind-key -n C-Left select-pane -L
bind-key -n C-Right select-pane -R
bind-key -n C-Up select-pane -U
bind-key -n C-Down select-pane -D
# Create 4 split panes (2x2 grid)
bind-key g split-window -h -c "#{pane_current_path}" \; split-window -v -c "#{pane_current_path}" \; select-pane -t 0 \; split-window -v -c "#{pane_current_path}"
# Create 3 split panes (main top-left 70%, sidebar top-right 30%, bottom 25%)
bind-key G split-window -v -c "#{pane_current_path}" \; select-pane -U \; split-window -h -c "#{pane_current_path}" \; resize-pane -t 2 -x 30% \; resize-pane -t 3 -y 25% \; select-pane -t 1
# Copy mode vim-style bindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# ==========================
# Plugins
# ==========================
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin '2kabhishek/tmux-tilit'
# ==========================
# Plugin Configurations
# ==========================
set -g @tilish-prefix 'M-space'
# ==========================
# Theme - Catppuccin
# Config is from https://github.com/catppuccin/tmux/discussions/317#discussioncomment-11064512
# ==========================
set -g @catppuccin_flavor "macchiato"
set -g @catppuccin_status_background "none"
set -g @catppuccin_window_status_style "none"
set -g @catppuccin_pane_status_enabled "off"
set -g @catppuccin_pane_border_status "off"
# status left look and feel
# Session name highlights teal when prefix (Ctrl-a) is active
set -g status-left-length 100
set -g status-left ""
set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_teal},fg=#{@thm_bg},bold] 🍱 #S },#{#[bg=#{@thm_bg},fg=#{@thm_green}] 🍱 #S }}"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]│"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_blue}] #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} "
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_overlay_0},none]#{?window_zoomed_flag,│,}"
set -ga status-left "#[bg=#{@thm_bg},fg=#{@thm_yellow}]#{?window_zoomed_flag, zoom ,}"
# status right look and feel
# PREFIX badge appears when prefix (Ctrl-a) is active
set -g status-right-length 100
set -g status-right ""
set -ga status-right "#{?client_prefix,#{#[bg=#{@thm_teal},fg=#{@thm_bg},bold] PREFIX },}"
set -ga status-right " %Y-%m-%d %H:%M "
# Configure Tmux
set -g status-position top
set -g status-style "bg=#{@thm_bg}"
set -g status-justify "absolute-centre"
# pane border look and feel
setw -g pane-border-status top
setw -g pane-border-format ""
setw -g pane-active-border-style "fg=white"
setw -g pane-border-style "fg=#5b6078"
setw -g pane-border-lines single
# window look and feel
set -wg automatic-rename on
set -g automatic-rename-format "Window"
set -g window-status-format " #I#{?#{!=:#{window_name},Window},: #W,}#{?window_zoomed_flag, 📌,} "
set -g window-status-style "fg=#6e738d"
set -g window-status-last-style "fg=#8087a2"
set -g window-status-activity-style "bg=#{@thm_red},fg=#{@thm_bg}"
set -g window-status-bell-style "bg=#{@thm_red},fg=#{@thm_bg},bold"
set -gF window-status-separator "#[bg=#{@thm_bg},fg=#{@thm_overlay_0}]│"
set -g window-status-current-format " 🫶 #I#{?#{!=:#{window_name},Window},: #W,}#{?window_zoomed_flag, 📌 ,} "
set -g window-status-current-style "bg=#{@thm_green},fg=#{@thm_bg},bold"
set -g pane-border-lines double
# Indicate active pane by colouring only half of the border in windows with
# exactly two panes, by displaying arrow markers, by drawing both or neither.
# [off | colour | arrows | both]
set -g pane-border-indicators both
# Enables tracking of focus events, allows tmux to respond when the terminal
# window gains or looses focus
set-option -g focus-events on
# ==========================
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# ==========================
run '~/.tmux/plugins/tpm/tpm'
# Unbind M-Enter (Option+Enter) from splitting panes (set by tmux-tilit)
unbind -T root M-Enter