-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
136 lines (105 loc) · 4.71 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
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
128
129
130
131
132
133
134
135
136
set -g default-terminal "screen-256color"
set-window-option -g xterm-keys on
set-option -g prefix C-b
unbind %
bind | split-window -h
bind - split-window -v
bind _ split-window -v
bind-key -r C-p previous-window
bind-key -r C-b last-window
bind-key -r C-n next-window
bind-key -r Left swap-window -t -1
bind-key -r Right swap-window -t +1
unbind-key left ; bind-key -r left resize-pane -L
unbind-key up ; bind-key -r up resize-pane -U
unbind-key down ; bind-key -r down resize-pane -D
unbind-key right ; bind-key -r right resize-pane -R
unbind-key C-left ; bind-key -r C-left resize-pane -L 5
unbind-key C-right ; bind-key -r C-right resize-pane -R 5
unbind-key C-up ; bind-key -r C-up resize-pane -U 5
unbind-key C-down ; bind-key -r C-down resize-pane -D 5
unbind-key h ; bind-key -r h select-pane -L
unbind-key k ; bind-key -r k select-pane -U
unbind-key j ; bind-key -r j select-pane -D
unbind-key l ; bind-key -r l select-pane -R
#unbind-key C-j ; bind-key -r C-j resize-pane -D
#unbind-key C-k ; bind-key -r C-k resize-pane -U
unbind-key C-h ; bind-key -r C-h previous-window
unbind-key C-l ; bind-key -r C-l next-window
unbind-key Tab ; bind-key -r Tab select-pane -t :.+
#clear history
bind C-k clear-history
# reload the conf file
bind R source-file ~/.tmux.conf \; display-message "Config reloaded"
# renumber windows
unbind r
bind r run "~/dotfiles/tmux-renum"
# join a pane from another tmux window
# note that ! by default breaks pane to a new window
bind-key @ command-prompt -p "Create pane from:" "join-pane -h -s ':%%'"
# open a man page in new vsplit
bind C-m command-prompt -p "man" "split-window -h 'exec man %%'"
# toggle statusbar
# bind-key C-s set-option status
set -g @resurrect-save 'S'
# turn off Esc-Wait
set-option -sg escape-time 0
# big history limit
set-option -g history-limit 20000
# activity notifications
setw -g monitor-activity on
set -g visual-activity on
# automatic tab renaming
setw -g automatic-rename on
#--Status-Bar-------------------------------------------------------------------
# Default colors
set -g status-bg black
set -g status-fg white
set-window-option -g window-status-style fg=brightblue,bg=colour236,dim
set-window-option -g window-status-current-style fg=brightred,bg=colour236,bright
# Left side of status bar
set -g status-left-length 20
set -g status-left '#[fg=green][#[bg=black,fg=]#S#[bg=black,fg=blue,dim]:#H#[fg=green]]'
# try and set window titles
# set titles on
# Inactive windows in status bar
set-window-option -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
# Current or active window in status bar
#set-window-option -g window-status-current-bg yellow
#set-window-option -g window-status-current-fg black
# set-window-option -g window-status-current-format '#[bg=white,fg=black,bold]#I#[bg=white,fg=black]:#[fg=black]#W#[fg=dim]#F'
set-window-option -g window-status-current-format '#[bg=white,fg=black,bold]#I#[bg=white,fg=black]:#[fg=black]#{pane_current_command}#[fg=dim]#F'
# Right side of status bar
#set -g status-right '#[fg=yellow]#(date)'
#set -g status-right '#[fg=green][#[fg=white]#T#[fg=green]][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]#[fg=green]]'
#set -g status-right '#[fg=green][#[fg=white]#(uptime | egrep -o "[0-9]+ users?, +load.*"|perl -pe "s| averages?||")#[fg=green]] %H:%M'
#if-shell 'test "$(uname)" = "Darwin"' 'set -g status-right "#[fg=green][#[fg=white]#(uptime | cut -dv -f 2 | cut -d: -f 2-)#[fg=green]] %H:%M"'
set -g status-right "#[fg=green][#[fg=white]#(uptime | cut -dv -f 2 | cut -d' ' -f 2-)#[fg=green]] %H:%M"
#if-shell 'type byobu-status >/dev/null 2>&1' "set -g status-right-length 60; set status-interval 1; set -g status-right '#(byobu-status tmux_right)#[fg=green]'"
setw -g status-interval 1
# number from 1
set -g base-index 1
setw -g pane-base-index 1
# automatically renumber windows
set -g renumber-windows on
# better window resize default
setw -g aggressive-resize on
# keep tmux msgs around longer
set -g display-time 1800
# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# Alacritty
set -as terminal-features ",alacritty:RGB"
# tmux plugin manager
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
"
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-resurrect \
"
run-shell ~/.tmux/plugins/tpm/tpm
if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf'