-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
121 lines (92 loc) · 3.49 KB
/
tmux.conf
File metadata and controls
121 lines (92 loc) · 3.49 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
# Keyboard Shortcuts
# ------------------
set-option -g xterm-keys on
# Easier vertical and horizontal splits
unbind-key %
unbind-key '"'
unbind-key -
bind-key | split-window -h
bind-key - split-window -v
# Move windows (press multiple time to chain)
bind-key -r [ swap-window -t -1
bind-key -r ] swap-window -t +1
# Toggle mouse on with ^B ^m
bind-key m set-option -g mouse on
# Toggle mouse off with ^B ^M
bind-key C-m set-option -g mouse off
# Resize panes using VIM like bindings
bind-key -r C-h resize-pane -L
bind-key -r C-j resize-pane -D
bind-key -r C-k resize-pane -U
bind-key -r C-l resize-pane -R
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# reload .tmux.conf file
bind r source ~/.tmux.conf
# Config
# ------
# 24bit colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# windows starts at 1 (match keyboard order)
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# increase scrollback buffer size
set -g history-limit 10000
# Don't auto rename windows
set-option -g allow-rename off
# resize to smallest session current window rather than smallest of all
set-window-option -g aggressive-resize on
# Status line
set -g status-left-length 30
set -g status-left '#[bg=colour136,fg=colour235] #S #[bg=colour235,fg=colour136] ' # base02 on yellow
set -g status-right '%H:%M %d-%b-%y #[bg=colour136,fg=colour235] #h '
# Colors
# ------
# Solarized 256 Color theme
# from https://github.com/seebi/tmux-colors-solarized
# default statusbar colors
# set-option -g status-bg colour235 #base02
# set-option -g status-fg colour136 #yellow
# set-option -g status-attr default
set-option -g status-style fg=colour136,bg=colour235,default
# default window title colors
# set-window-option -g window-status-fg colour244 #base0
# set-window-option -g window-status-bg default
# set-window-option -g window-status-attr dim
set-window-option -g window-status-style fg=colour244,bg=default,dim
# active window title colors
# set-window-option -g window-status-current-fg colour166 #orange
# set-window-option -g window-status-current-bg default
# set-window-option -g window-status-current-attr bright
set-window-option -g window-status-current-style fg=colour166,bg=default,bright
# pane border
# set-option -g pane-border-fg colour235 #base02
# set-option -g pane-active-border-fg colour240 #base01
set-option -g pane-border-style fg=colour235
set-option -g pane-active-border-style fg=colour240
# message text
# set-option -g message-bg colour235 #base02
# set-option -g message-fg colour166 #orange
set-option -g message-style fg=colour166,bg=colour235
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# bell
set-window-option -g window-status-bell-style fg=colour235,bg=colour160 #base02, red
# Plugins
# -------
# Restore tmux environment after system restart
# prefix + Ctrl-s - save
# prefix + Ctrl-r - restore
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux