-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
97 lines (74 loc) · 2.3 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
# Use something easier to type as the prefix.
set -g prefix C-e
unbind C-e
bind C-e send-prefix
# Relax!
set -sg escape-time 0
set -sg repeat-time 600
# Reload the config.
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# Saner splitting.
bind v split-window -h
bind s split-window -v
bind S choose-session
# Window movement
bind-key -n C-h previous-window
bind-key -n C-l next-window
# Pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
bind -r C-h resize-pane -L 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5
# 256 colors please
if-shell -b '[ "$TERM_PROGRAM" = "ghostty" ]' {
set -g default-terminal "xterm-ghostty"
} {
set -g default-terminal "screen-256color"
}
# window colors
set -g status-fg colour230
set -g status-bg colour234
# tmux > 2.8
set -g window-status-activity-style bold
set -g pane-border-style fg=colour241
set -g pane-active-border-style fg=colour37
set -g message-style fg=colour125,bg=colour254,bold
# Custom status bar
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 5
set -g status-left '#[fg=colour37,bg=colour235,bold] #S '
set -g status-right '#[fg=colour136,bg=colour235,bold] #h '
set -g window-status-format "#[fg=colour245,bg=colour234] #I - #W "
set -g window-status-current-format "#[fg=colour234,bg=colour33,noreverse,bold] #I - #W "
# Activity
setw -g monitor-activity on
set -g visual-activity off
# Autorename sanely.
setw -g automatic-rename on
# Better name management
bind c new-window
bind , command-prompt "rename-window '%%'"
# Up the stored history
set -g history-limit 1000000
# mouse mode
set -g -q mouse on
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection
# Use vi bindings in copy mode
setw -g mode-keys vi
# vim-style copying
unbind [
bind C-u copy-mode
unbind p
bind p paste-buffer
# fix shitty MacOSX behavior
# see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set-option -g default-command "if type reattach-to-user-namespace > /dev/null ; then reattach-to-user-namespace -l zsh; else zsh; fi;"
# Save pane history to file
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'