-
Notifications
You must be signed in to change notification settings - Fork 1
/
_tmux.conf
83 lines (65 loc) · 2.2 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
# * reload
# To reload
# tmux source-file ~/.tmux.conf
#
# * keybindings
# the default tmux prefix is C-b, we're instead going to go with my screen
# muscle memory by unbinding it and setting the prefix to C-]
unbind C-b
set -g prefix C-]
bind C-] send-prefix
bind r source-file ~/.tmux.conf \; display-message "Config reloaded"
bind C-c new-window -c "#{pane_current_path}"
bind C-d detach
bind C-] last-window
bind C-p previous-window
bind C-n next-window
# Window splitting
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
# Window resizing
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
# window navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
## ** TERM
set -g default-terminal "screen-256color"
set -sa terminal-features ',xterm*:RGB'
# ** display
# start counting at one - makes switching to a pane easier
set -g base-index 1
# configure the status bar
set -g status on
set -g status-style bg=black,fg=white
set -g status-left ""
set -g status-right ""
set -g status-justify centre
setw -g window-status-current-style bg=red
# renumber windows if you close one
set -g renumber-windows on
# ** window titles
# set the title of the terminal we're in
set -g set-titles on
set -g set-titles-string "#{pane_title}/#{window_name}"
# allow the renaming of windows by our guests
set -g allow-rename on
# naming in the status bar
set-window-option -g window-status-format "[#{window_index} #{window_name}]"
set-window-option -g window-status-current-format "[#{window_index} #{window_name}]"
# ** reattach-to-user-namespace
# on OSX, reattach the pastebuffer: port install tmux-pasteboard
# brew install reattach-to-user-namespace
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/Usage.md#cross-platform-conditional-usage
if-shell 'test "$(uname -s)" = Darwin' 'set-option -g default-command "exec reattach-to-user-namespace -l $SHELL"'
# ** propogate variables
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION COLORTERM"
# ** unicode
setw -gq utf8 on
# neovim asked for these
set -sg escape-time 10
set -g focus-events on