-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
77 lines (61 loc) · 1.75 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
# tmux settings
# change prefix to Ctrl-Space
unbind C-b
set -g prefix C-Space
bind Space send-prefix
# default to 256 colors
set -g default-terminal "screen-256color"
# count sessions start at 1
set -g base-index 1
# use vim bindings
setw -g mode-keys vi
set -g status-keys vi
# vi-like copy
bind P paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'C-v' rectangle-toggle
bind-key -t vi-copy 'y' copy-pipe 'xclip -in -selection clipboard'
# remap pane navigation to vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Alt-vim keys without prefix to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Alt-arrow without prefix to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Shift-arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# turn on aggressive resize
setw -g aggressive-resize on
# resize panes
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# resize panes
bind M-h resize-pane -L
bind M-j resize-pane -D
bind M-k resize-pane -U
bind M-l resize-pane -R
# set the title bar
set -g set-titles on
set -g set-titles-string "#(whoami) :: #h :: #(curl ipecho.net/plain;echo)"
# set the status line
if-shell "test -f ~/.tmuxline.conf" "source ~/.tmuxline.conf"
# set reload key to r
unbind r
bind r source-file ~/.tmux.conf
# update environment variables in tmux
set -g update-environment "SSH_ASKPASS \
SSH_AUTH_SOCK \
SSH_AGENT_PID \
SSH_CONNECTION \
DISPLAY"