forked from magus424/dotfiles-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
86 lines (70 loc) · 2.31 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
86
set -s escape-time 0
# set -g base-index 1
set -g default-terminal xterm-256color
setw -g utf8 on
setw -g aggressive-resize on
set-option -g xterm-keys off
set -g other-pane-width 50
# screen keybinds
set-option -g prefix C-a
bind-key a send-prefix
bind-key C-a last-window
bind-key C-c new-window
bind-key C-n next-window
bind-key C-p previous-window
bind-key C-d detach-client
# resize panes using PREFIX H, J, K, L
bind C-H resize-pane -L 5
bind C-J resize-pane -D 5
bind C-K resize-pane -U 5
bind C-L resize-pane -R 5
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# rebind pane movement
bind C-Left select-pane -L
bind C-Down select-pane -D
bind C-Up select-pane -U
bind C-Right select-pane -R
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# reload config
bind C-r source-file ~/.tmux.conf \; display "Config Reloaded!"
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
# easier splits
unbind-key %
bind-key - split-window -v
# how the F do you bind to Ctrl+Minus?
# bind-key C-- split-window -v
unbind-key '"'
bind-key \ split-window -h
# this works, but if I can't get Ctrl+Minus for vertical...
# bind-key C-\ split-window -h
# fix ctrl+arrow keys in putty
set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"
# clone screen titles that I'm used to
set -g set-titles on
set -g set-titles-string "[screen #I: #W] #T"
# kill the status bar
set -g status on
set -g status-utf8 on
set -g status-interval 1
set -g status-bg colour234
set -g status-fg colour248
# mouse mode
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# less garish pane borders
set-option -g pane-border-bg black
set-option -g pane-border-fg colour245
set-option -g pane-active-border-bg black
set-option -g pane-active-border-fg white
source ~/.config/powerline/bindings/tmux.conf