-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
108 lines (83 loc) · 3.14 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# C-q is nice due to the layout of the Kinesis Advantage
unbind C-b
set -g prefix C-q
# Allow C-Q q to send C-Q to application
bind-key C-q send-prefix
# Start window index of 1
set -g base-index 1
# UTF-8 charater support in the status bar
set-option -g status-utf8 on
# Lowers the delay time between the prefix key and other keys - fixes pausing in vim
set -sg escape-time 1
# Mouse behavior
#set-window-option -g mode-mouse on
#set-option -g mouse-select-pane on
#set-option -g mouse-resize-pane on
#set-option -g mouse-select-window on
# Act like vim in copy mode
set-window-option -g mode-keys vi
# Keybindings
bind-key C-v split-window -h -c "#{pane_current_path}"
bind-key C-s split-window -v -c "#{pane_current_path}"
bind-key _ split-window -v -p 25 # Makes a horizontal 'testing' pane
bind-key / split-window -h -p 33 # Makes a vertical 'testing' pane
bind C-h select-pane -L
bind C-j select-pane -D
bind C-k select-pane -U
bind C-l select-pane -R
bind-key S set-option status
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key M-j resize-pane -D
bind-key M-k resize-pane -U
bind-key M-h resize-pane -L
bind-key M-l resize-pane -R
bind-key b break-pane -d
bind-key x kill-pane
bind-key X kill-window
bind-key -r C-n select-window -t :+
bind-key -r C-p select-window -t :-
bind-key C-o rotate-window
bind-key + select-layout main-horizontal
bind-key = select-layout main-vertical
set-window-option -g other-pane-height 25
set-window-option -g other-pane-width 80
set -g default-terminal "screen-256color"
set -g history-limit 10000
# Make pbcopy and pbpaste work
# See https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Copy and paste from and to tmux
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
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'"
# Theme
set -g status-left-length 30
set -g status-right-length 48
set -g status-left '#[fg=green](#S) #(whoami)@#H#[default]'
set -g status-right ''
# Default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# Default window title colors
set-window-option -g window-status-fg colour244
set-window-option -g window-status-bg default
# Active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
# Pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# Message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# Pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# Clock
set-window-option -g clock-mode-colour colour64 #green
# Reload key
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf is reloaded"