-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
60 lines (52 loc) · 2.02 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
# -- start
# copied from https://raw.githubusercontent.com/geohot/configuration/master/.tmux.conf
unbind C-b
set -g prefix `
bind-key ` last-window
bind-key e send-prefix
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-left ''
set -g status-right '#{?client_prefix,⌨ ,} #[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g mode-keys vi
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
set-option -g history-limit 5000
# -- end
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# -- start https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# --end
# -- start https://gist.github.com/tsl0922/d79fc1f8097dde660b34
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Enable native Mac OS X copy/paste
set-option -g default-command "/bin/bash -c 'which reattach-to-user-namespace >/dev/null && exec reattach-to-user-namespace $SHELL -l || exec $SHELL -l'"
# -- end
# switch panes using Alt-arrow without prefix
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R