-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
85 lines (65 loc) · 2.77 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
# This fixes pbpaste/pbcopy integration in Vim, so yanking to system register works in tmux sessions.
# See: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
# Install with brew install reattach-to-user-namespace
set -g default-command "reattach-to-user-namespace -l bash"
set-option -sa terminal-overrides ',xterm-256color:RGB'
# Change prefix from C-b to C-a for less finger-wrecking keystrokes
# Also unloads the C-b keystroke
set -g prefix C-a
unbind C-b
# You want C-a to pass through to other applications as well
bind C-a send-prefix
# This is a delay between prefix and command
set -sg escape-time 1
# By default windows start at index 0
set -g base-index 1
# Prefix-r reloads our tmux config in realtime, and displays a message.
bind r source-file ~/.tmux.conf \; display "tmux config reloaded."
# More logical window-splitting commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# open new windows/splits in the same path
bind '"' split-window -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Prefix-hjkl moves a
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Significantly speed up pane selection
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Better pane resizing, including key repeat
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
# Enable the mouse. This makes it easier for others to use my config (scroll and switch panes/tabs)
set -g mouse on
set-option -g history-limit 5000
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
# Note that xterm-256color on OSX works, but screws up bg-colors in Vim.
set -g default-terminal "screen-256color"
# This fixes Ctrl + arrow key navigation in shell on OSX with iTerm2 + tmux
set-window-option -g xterm-keys on
# add a space inside our window status blocks
setw -g window-status-format " #W#F "
setw -g window-status-current-format " #W#F "
# Sets the color of command / message line
set -g message-style fg=white
set -g message-style bg=terminal
# Enable activity alerts (flash the statusline on output)
setw -g monitor-activity on
set -g visual-activity on
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 60
set -g status-left '#[fg=white,bg=colour166] TMUX '
set -g status-right '%H:%M '
setw -g status-style "bg=#efe9d5"
setw -g window-status-style fg=colour240
setw -g window-status-current-style "bg=colour166,fg=white"
setw -g window-status-activity-style "bg=white,fg=colour166"
set -g message-style fg=black,bg=7