-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
58 lines (43 loc) · 1.81 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
# allow nested tmux sessions
bind b send-prefix
# use Ctrl-a like screen instead of default Ctrl-b
#unbind C-b
#set -g prefix C-a
#bind C-a last-window
#bind a send-prefix
# reload configuration on <prefix> r
bind r source-file ~/.tmux.conf \; display-message "configuration reloaded"
# allow esc to enter copy mode like screen
bind Escape copy-mode
# use vi-like navigation
setw -g mode-keys vi
set -g status-keys vi
set -g default-terminal screen-256color
set -g history-limit 10000
set -s escape-time 0
setw -g aggressive-resize on
# Enable mouse support as long as we aren't connected via SSH.
#set -g mouse on
if-shell 'test -z "${SSH_CONNECTION:-}"' 'set -g mouse on'
# Highlight color for copy-mode, mouse, etc. Isn't set by theme
set -g mode-style "bg=#314f78"
# Don't do anything with mouse selection. Copying selection to
# clipboard will require another step.
unbind-key -T copy-mode MouseDragEnd1Pane
unbind-key -T copy-mode-vi MouseDragEnd1Pane
# Add vi-like yank to copy mode
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Allow use of ANSI escape codes from shell
# $'\ek...\e\\' - update tmux window title
set -g allow-rename on
# $'\ePtmux;...\a\e\\' - pass ANSI escape code to terminal
set -g allow-passthrough on
# Load theme config if it exists
if-shell "test -f ~/.tmux-theme.conf" "source ~/.tmux-theme.conf"
# Prime tmux's default PATH with possible homebrew locations. This path
# will be overwritten by bash.d/99-tmux.sh. This is necessary if tmux
# is installed via homebrew.
set-environment -g PATH "$HOME/opt/brew/bin:/opt/brew/bin:$HOME/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
# Load OS-specific tmux configuration
run-shell 'tmux set-environment -g OS "$(uname -s | tr "A-Z" "a-z")"'
if-shell 'test -f ~/.tmux-$OS.conf' 'source ~/.tmux-$OS.conf'