-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
89 lines (74 loc) · 3.68 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
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal xterm-256color
set -g focus-events on
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Load Config for specific tmux version
if-shell 'test "$(tmux -V)" = "tmux 2.1"' "source ~/.dotfiles/tmux.2.1.conf" "source ~/.dotfiles/tmux.1.9.conf"
# Create splits and vertical splits
bind-key v split-window -h -p 50 -c "#{pane_current_path}"
bind-key ^V split-window -h -p 50 -c "#{pane_current_path}"
bind-key s split-window -p 50 -c "#{pane_current_path}"
bind-key ^S split-window -p 50 -c "#{pane_current_path}"
# Smart pane switching with awareness of vim splits
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"
# set first window to index 1 (not 0) to map more to the keyboard layout...
set-option -g base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# No escape time for vi mode
set -sg escape-time 0
# Act like Vim
set-window-option -g mode-keys vi
# Copy like vim
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-copy 'C-v' rectangle-toggle
set-option -g set-clipboard on
# Bigger history
set -g history-limit 10000
# New windows/pane in $PWD
bind c new-window -c "#{pane_current_path}"
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Local config
if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user'
# Set title
set -g set-titles on
set -g set-titles-string "#h:#S > #{pane_current_command}"
# color scheme
set -g status 'on'
set -g status-utf8 'on'
set -g status-justify 'centre'
set -g status-left-length '100'
set -g status-right-length '100'
set -g status-bg 'colour237'
set -g message-bg 'colour3'
set -g message-command-bg 'colour109'
setw -g window-status-bg 'colour237'
setw -g window-status-activity-bg 'colour237'
setw -g window-status-fg 'colour109'
setw -g window-status-activity-fg 'colour109'
set -g message-fg 'colour237'
set -g message-command-fg 'colour237'
set -g pane-border-fg 'colour236'
set -g pane-active-border-fg 'colour109'
set -g status-right-attr 'none'
set -g status-attr 'none'
set -g status-left-attr 'none'
setw -g window-status-attr 'none'
setw -g window-status-activity-attr 'underscore'
setw -g window-status-separator ''
set -g status-left '#[fg=colour237,bg=colour109] #S #[fg=colour109,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour109,bg=colour236] #F #[fg=colour236,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour240,bg=colour237] #W #[fg=colour237,bg=colour237,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour237,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour240,bg=colour237] #[fg=colour236,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour109,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour237,bg=colour109] #H '
setw -g window-status-format '#[fg=colour237,bg=colour237,nobold,nounderscore,noitalics]#[default] #I #W #[fg=colour237,bg=colour237,nobold,nounderscore,noitalics]'
setw -g window-status-current-format '#[fg=colour237,bg=colour109,nobold,nounderscore,noitalics]#[fg=colour237,bg=colour109] #I #W #[fg=colour109,bg=colour237,nobold,nounderscore,noitalics]'