-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
87 lines (68 loc) · 2.57 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
# Use C-a instead of C-b as the prefix
set -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
#set 256 colors
set -g default-terminal "screen-256color"
# set default shell
set -g default-command "exec /bin/zsh"
set -g display-time 2000
# set vi style key binding
set -g status-keys vi
setw -g mode-keys vi
# be more responsive, changing the default delay
set -sg escape-time 1
# set scrollback
set -g history-limit 10000
# Start numbering at 1
set -g base-index 1
setw -g pane-base-index 1
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# automatic window renaming
set-window-option -g automatic-rename on
# aggresive resize
setw -g aggressive-resize on
# Saner splitting.
bind v split-window -h
bind h split-window -v
bind S choose-session
# Pane resizing
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# set colors
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
# Custom status bar
# Powerline symbols:
set -g status-utf8 on
set -g status-left-length 32
set -g status-right-length 150
set -g status-interval 2
set -g status-left '#[fg=colour15,bg=colour238,bold] #S #[fg=colour238,bg=colour234,nobold]'
set -g status-right '#[fg=colour245] %R %d %b #[fg=colour255,bg=colour234,nobold]#[fg=colour16,bg=colour254,bold] #h '
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=colour16,bg=colour39,noreverse,bold] #I #W #F #[fg=colour39,bg=colour234,nobold]"
# Activity
setw -g monitor-activity on
set -g visual-activity on
# Mouse stuff
setw -g mode-mouse off
setw -g mouse-select-window off
setw -g mouse-select-pane off
setw -g mouse-resize-pane off
# Log output to a text file on demand
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# move between panes
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"