-
Notifications
You must be signed in to change notification settings - Fork 2
/
tmux.conf
80 lines (60 loc) · 2.07 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
#statusbar stuff
set -g status-style bg=black,fg=yellow
set -g pane-active-border-style bg=black,fg=yellow
set -g window-status-current-style bg=yellow,fg=black,bright,reverse
# because tmux eats terminal colors
set -g default-terminal "tmux-256color"
# fix terminal colors for neovim
set-option -sa terminal-features ',xterm-256color:RGB'
# set focus events to fix tmux autoread
set-option -g focus-events on
# Use C-a instead of C-b as the prefix (C-b is bullshit)
unbind-key C-b
set -g prefix C-a
bind C-a send-prefix
bind a send-prefix
# because terminals are stupid, and Esc == Alt (meta) which fucks with my
# navigation shortcuts below
set -s escape-time 0
# Pane navigation
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-h select-pane -L
bind -n M-l select-pane -R
# Pane Zoom
bind -n M-z resize-pane -Z
# Window navigation
bind -n C-l select-window -n
bind -n C-h select-window -p
# Copy/Paste shortcuts
bind -n M-[ copy-mode
bind -n M-] paste-buffer
# Move panes around forward and in reverse
bind -n M-f move-pane -t '.-'
bind -n M-r move-pane -h -t '.-'
# tmux 1.9 fucking broke shit, set it back as it should be
unbind-key '"'
bind '"' split-window -v -c "#{pane_current_path}"
unbind-key '%'
bind '%' split-window -h -c "#{pane_current_path}"
unbind c
bind c new-window -c "#{pane_current_path}"
# MOAR SCROLLBACK
set -g history-limit 10000
# Set vi mode
set-window-option -g mode-keys vi
# FIXME - fucking PROMPT_COMMAND is doing stupid shit, mask it
set-window-option -g allow-rename off
#CLIPBOARD selection integration
##Requires prefix key before the command key
#Copy tmux paste buffer to CLIPBOARD
#
# Requires xsel/xclip - they randomly take turns working and not working
#
bind y run 'tmux show-buffer | xsel -bi'
#bind y run 'tmux show-buffer | xclip -i -selection clipboard -l 1'
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
#bind C-y run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer"
# Fix ssh session stuff
set -g update-environment "SSH_AUTH_SOCK"
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock