-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
156 lines (123 loc) · 4.12 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# set -g default-terminal 'st-256color'
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",alacritty:RGB"
# Remap prefix to Alt + q
set -g prefix M-a
unbind C-b
bind M-a send-prefix
set-option -sg escape-time 10
set-option -g repeat-time 0
# Index tabs starting at 1, like real programmers do
set-option -g base-index 1
set-option -g pane-base-index 1
set-option -g focus-events on
# Selection with mouse should copy to clipboard right away, in addition to the default action
unbind -n -Tcopy-mode-vi MouseDragEnd1Pane
bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard > /dev/null"
# Resizing (mouse also works)
unbind-key Left
bind-key -r Left resize-pane -L 5
unbind-key Right
bind-key -r Right resize-pane -R 5
unbind-key Down
bind-key -r Down resize-pane -D 5
unbind-key Up
bind-key -r Up resize-pane -U 5
set-option -g status-keys vi
# Force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
setw -g mode-keys vi
set -g mouse on
set-option -g default-terminal "screen-256color" #"xterm-256color" # "screen-256color"
# basic settings
set-window-option -g xterm-keys on # for vim
set-window-option -g mode-keys vi # vi key
set-window-option -g monitor-activity off
## Automatically set window title
setw -g automatic-rename
set-option -g status-interval 2
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Style
set-option -g status-justify left
set-option -g status-bg colour233
set-option -g status-fg cyan
set-option -g status-interval 5
set-option -g status-left-length 30
# set-option -g status-left ' #[fg=blue,bold]#T#[default] #[fg=magenta]# '
# set-option -g status-right '#[fg=cyan]»» #[fg=blue,bold]###S #[fg=magenta]%R %m-%d'
set-option -g visual-activity off
set -g status-justify left
# set -g status-bg default
# set -g status-fg default
set -g status-interval 2
setw -g window-status-format "#I #[fg=colour8] #W "
setw -g window-status-current-format "#I #[fg=colour7] #W "
setw -g window-status-current-style dim
set -g status-position bottom
# set -g status-justify centre
set -g status-left ""
set -g status-right " #[fg=colour8] %R "
# Panes
set -g pane-border-style fg=colour0
set -g pane-active-border-style fg=colour238
# Toggle statusbar
bind-key b set-option status
# Status line
# Messaging
set -g message-style fg=black,bg=blue
#set -g message-command-style fg=lightblue,bg=black
set -g automatic-rename on
# Window mode
setw -g mode-style bg=colour6,fg=colour0
# ------------------------------------------------------------
bind-key Enter break-pane
# bind-key Space command-prompt "joinp -t:%%" # %% = prompt for window.pane [-V|H] # vert|hor split
# Use send-prefix to pass C-a through to application
bind Space send-prefix
# Previous window
bind-key -n M-up prev
bind-key -n M-left prev
# Alt 1-9 to switch to window
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
# Next window
bind-key -n M-right next
bind-key -n M-down next
# Reorder windows
bind-key -n C-S-Left swap-window -t -1\; prev
bind-key -n C-S-Right swap-window -t +1\; next
# Change pane
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
# bind C-j previous-window
# bind C-k next-window
bind M-c new-window
bind-key M-a last-window # Prefix twice -> last active window
# Vim bindings
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set -g history-limit 10000
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the bottom)
run '~/.tmux/plugins/tpm/tpm'
setw -g aggressive-resize off # Incompatible with iterm2