-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtmux.conf
128 lines (84 loc) · 3.38 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
##### Basic Usage #####
# Remap the prefix key to something that even Emacs doesn't use
unbind C-b
set -g prefix 'C-\' ; bind 'C-\' send-prefix
# Binding to reload tmux config (so we can pick up changes to this file without
# needing to restart tmux)
bind r source-file ~/.tmux.conf \; display "Reloaded tmux configuration!"
# Reduce the command delay time to something a bit shorter
set -sg escape-time 1
# Extend the repeat interval for repeatable commands (e.g., resize-pane)
set -sg repeat-time 1000
##### Vim :allthethings:! #####
# Use vi-style navigation in Copy mode (which is also scrollback mode)
setw -g mode-keys vi
# Navigate panes vim-style!
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# And windows too!
bind -r C-l select-window -t :+
bind -r C-h select-window -t :-
##### Window/pane management #####
# Split windows more intuitively (except for the fact that tmux doesn't
# understand that a horizontal split means the pane should be split down the
# middle horizontally, and likewise for a vertical split).
#
# Also, splits should start in the same directory as the pane being split from
# (Note that this doesn't help with chruby, but it's at least a start...)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Index panes from 1, but windows from 0
# set -g base-index 1
setw -g pane-base-index 1
# Quickly jump between two windows
bind i last-window
# Resizing panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Renumber windows
bind m command-prompt -p "move window to:" "move-window -t '%%'"
##### Colors #####
# Ensure we're using 256 colors
set -g default-terminal "screen-256color"
# Status bar
set -g status-style bg="#333333",fg=white
# Window list
setw -g window-status-style bg="#333333",fg=green
setw -g window-status-current-style bg=brightgreen,fg=black
setw -g window-status-activity-style bg=brightblue,fg=black
# Pane borders
set -g pane-border-style bg=black,fg=green
set -g pane-active-border-style bg=yellow,fg=green
# Command line
set -g message-style bright,bg=black,fg=white
# Status Bar Items
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=green]#P"
set -g status-right "#[fg=yellow]%d %b %R #[fg=green]#(wemux status_users)"
set -g status-justify centre
set -g status-interval 15
# Monitor windows for activity
setw -g monitor-activity on
set -g visual-activity on
# Status bar customization
# NOTE: looking at this because you accidentally hit C-q, below?
# PREFIX+:, then type `source ~/.tmux.conf.local` :)
set -g status-interval 3
set -g status-left "#[fg=green]Session: #S #[fg=yellow]W#I #[fg=green]P#P #(pane_size)"
set -g status-right " #[fg=green]#(wemux_user_list) #[fg=yellow]%R"
bind C-q set -g status-left "" \; set -g status-right "" # clear status bar for screencasting
bind s set -g status off # hide status bar entirely
bind S set -g status on # show status bar
# Bind ^K to clear the scrollback buffer
bind C-k clear-history
# tmux 3.1b introduced "lazy resize"; turn it back off
# (For more, search the CHANGES file from tmux 3.1b for the text
# "Support for windows larger than the client":
# https://raw.githubusercontent.com/tmux/tmux/3.1b/CHANGES)
set-option -g window-size smallest
# MOAR SCROLLBACK PLZ
set-option -g history-limit 100000