-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
51 lines (40 loc) · 2.04 KB
/
dot_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
# set-option [-aFgopqsuUw] [-t target-pane] option value
# Set a pane option with -p, a window option with -w, a server option with -s, otherwise a session option.
# If the option is not a user option, -w or -s may be unnecessary - tmux will infer the type from the option name,
# assuming -w for pane options.
# If -g is given, the global session or window option is set.
#
# -F expands formats in the option value.
# The -u flag unsets an option, so a session inherits the option from the global options (or with -g, restores a
# global option to the default).
# -U unsets an option (like -u) but if the option is a pane option also unsets the option on any panes in the window.
# 'value' depends on the option and may be a number, a string, or a flag (on, off, or omitted to toggle).
# Enable mouse mode (tmux 2.1 and above)
set-option -g mouse on
# Remap prefix from 'C-b' to 'C-a'
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Rename windows manually with 'C-a ,'
set-option -g allow-rename off
set-option -g automatic-rename off
# Clear a pane with 'C-a k'
bind-key -N "Clear terminal and scrollback" k \
send-keys C-c \; \
send-keys " clear && tmux clear-history" \; \
send-keys Enter
# Set pane divider colours
set-option -g pane-active-border-style bg=default,fg=colour208
# Set status bar colours
set-option -g status-style bg=colour208,fg=colour0
# Explode by default in window/pane chooser bound to 'C-a w'
bind-key w choose-tree -Z
# Append to built-in list of environment variables to keep refreshed
set-option -ga update-environment ' GOROOT'
# Move windows left and right with 'C-a Shift+Left/Right'
bind-key -N "Shift current window to the left" S-Left swap-window -t -1 \; select-window -t -1
bind-key -N "Shift current window to the right" S-Right swap-window -t +1 \; select-window -t +1
# Increase the scrollback buffer size
set-option -g history-limit 100000
# Set up some windows/panes - leave this near the end
set-hook -g after-new-session "source-file $HOME/.config/tmux/new-session.conf"