-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
142 lines (103 loc) · 3.26 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Usage:
# - Prefix is set to Ctrl-a (make sure you remapped Caps Lock to Ctrl)
# - All prefixed with Ctrl-a
# - Last used window: /
# - Last used pane: ;
# - Vertical split: v
# - Horizontal split: s
# - Previous window: [
# - Next window: ]
# - Choose session: Ctrl-s
# - Quick window: Ctrl-q
# some notes for myself
# -r flag make the command repeatable.
# set-option -g default-command "reattach-to-user-namespace -l zsh"
### LOOK & FEEL ###
set -g default-terminal "screen-256color"
#set -gw xterm-keys on
# default statusbar colors
set-option -g status-bg colour235
set-option -g status-fg colour179
#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
#set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
#set-option -g pane-border-fg colour235
#set-option -g pane-active-border-fg colour240
# pane number display
set-option -g display-panes-active-colour colour33
set-option -g display-panes-colour colour166
# clock
set-window-option -g clock-mode-colour colour64
# status bar left contents
set -g status-left ""
#set -g status-left-length 30
# status bar right contents
#set -g status-right "asdfasdf a #[fg=colour187][asdf] #[fg=default][%H:%M %e-%b-%Y]"
#set -g status-right '#(battery) '
set -g status-right "#[fg=default]%H:%M %e-%b"
set -g status-right-length 65
set -g status-interval 5
#set -g mouse-utf8 on
set -g mouse on
#set-window-option -g utf8 on
set-option -g status-keys vi
set-option -g mode-keys vi
setw -g mode-keys vi
#no command delay
set -sg escape-time 0
#count windows and panes from 1
set -g base-index 1
setw -g pane-base-index 1
### KEYS ###
#using C-a as prefix
unbind C-b
set-option -g prefix C-a
bind C-a send-prefix
#unbind /
#bind / last-window
unbind %
bind s split-window -v
unbind '"'
bind v split-window -h
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 4
bind -r J resize-pane -D 4
bind -r K resize-pane -U 4
bind -r L resize-pane -R 4
#unbind {
#bind { swap-pane -D
#unbind }
#bind } swap-pane -U
unbind r
bind r source-file ~/.tmux.conf\; display "Reloaded"
#bind Escape copy-mode
bind p paste-buffer
#unbind [
#bind [ previous-window
#unbind ]
#bind ] next-window
#swap panes
unbind o
bind o select-pane -t :.-
bind C-q command-prompt -I "htop" -p "Quick window command: " "new-window '%%'"
#bind -t vi-copy 'v' begin-selection
#bind -t vi-copy 'y' copy-selection
#bind C-c run "tmux save-buffer - | pbcopy"
#bind C-v run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
bind C-s choose-session
#stolen from el torkelo to enable l, k, j, h navigation between tmux and VIM
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(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"