-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
55 lines (43 loc) · 2.39 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
# set prefix to Ctrl+Space
set-option -g prefix C-Space
unbind-key C-Space
bind-key C-Space send-prefix
# first window number should be 1
set -g base-index 1
# Don't automatically rename windows
set-option -g allow-rename off
# prefix+R for reloading config
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
# Ctrl+hjkl for pane switching including Vim split awareness
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# Alt+hjkl as well
bind -n M-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-h) || tmux select-pane -L"
bind -n M-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-j) || tmux select-pane -D"
bind -n M-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-k) || tmux select-pane -U"
bind -n M-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys M-l) || tmux select-pane -R"
# Ctrl+v to paste tmux buffer
# bind -n C-v paste
# need to avoid ESC aliasing with Alt
set -s escape-time 0
set-option -g repeat-time 0
# Vim mode for window switching
set-window-option -g mode-keys vi
# Sets $TERM inside sessions
set -g default-terminal "screen-256color"
# Apply Tc
set-option -ga terminal-overrides ",screen-256color:Tc"
# THEME: My own, based on vim-airline-themes/molokai
set -g status-bg colour67 # cornflower blue
set -g status-fg colour15 # bright white
set -g window-status-current-bg colour67
set -g window-status-current-fg colour15
set -g window-status-current-attr bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#[fg=colour16,bold,bg=colour144] #S #[default] '
set -g status-right '#[default] #(cut -d " " -f 1-3 /proc/loadavg) #[bg=colour0,fg=brightgreen] #(whoami)@#(hostname) #[fg=colour16,bold,bg=colour144] %l:%M %p #[default]'
set -g pane-active-border-style fg=brightcyan
set -g pane-border-style fg=colour67