-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.tmux.conf
More file actions
96 lines (74 loc) · 3.32 KB
/
.tmux.conf
File metadata and controls
96 lines (74 loc) · 3.32 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
set -g default-terminal "xterm-256color"
# Pass through extended keys (e.g. Shift+Enter) to applications
set -s extended-keys always
set -as terminal-features 'xterm*:extkeys'
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind-key a send-prefix
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Increase history limit for better scrollback
set -g history-limit 50000
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key T new-window -c "#{pane_current_path}" \; split-window -h -c "#{pane_current_path}" \; split-window -v -c "#{pane_current_path}" \; select-pane -t 1
bind-key t split-window -h -c "#{pane_current_path}" \; split-window -v -c "#{pane_current_path}" \; select-pane -t 1
## Copy paste
# enable OSC 52 clipboard
# https://medium.freecodecamp.org/tmux-in-practice-integration-with-system-clipboard-bcd72c62ff7b
set -g set-clipboard on
set-window-option -g allow-passthrough on
# require pressing "y" to copy mouse selection
set -g @yank_with_mouse off
# Ms modifies OSC 52 clipboard handling to work with mosh, see
# https://gist.github.com/yudai/95b20e3da66df1b066531997f982b57b
# set -ag terminal-overrides "vte*:XT:Ms=\\E]52;c;%p2%s\\7,xterm*:XT:Ms=\\E]52;c;%p2%s\\7"
set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c%p1%.0s;%p2%s\\7"
## set vi-mode
set-window-option -g mode-keys vi
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
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind-key : command-prompt
bind-key space next-window
bind-key bspace previous-window
bind-key enter next-layout
# Sync panes
bind C-s set-window-option synchronize-panes
# Reset window status color (for Claude Code hooks)
set -s command-alias[100] reset-color='set-window-option -u window-status-style \; set-window-option -u window-status-current-style'
bind r set-window-option -u window-status-style \; set-window-option -u window-status-current-style \; display "Color reset"
#### COLOUR
# Pane colour
set -g pane-border-style bg=colour0,fg=colour235
set -g pane-active-border-style bg=colour0,fg=colour28
## Status bar design
set -g status-justify left
set -g status-style bg=colour235,fg=colour1
set-option -g status-interval 1
set -g status-position bottom
set -g status-left ''
set -g status-right '#[fg=colour232,bg=colour241] %d/%m #[fg=colour232,bg=colour245] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style fg=colour232,bg=colour245,none
setw -g window-status-current-format ' #I#[fg=colour232]:#[fg=colour232]#W#[fg=colour232]#F '
setw -g window-status-style fg=colour232,bg=colour241,none
setw -g window-status-format ' #I#[fg=colour232]:#[fg=colour232]#W#[fg=colour232]#F '
setw -g window-status-bell-style fg=colour255,bg=colour1,bold
run '~/.tmux/plugins/tpm/tpm'