-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
82 lines (62 loc) · 2.86 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
setw -g mode-keys vi
# Setting a 256 colour terminal
set -g default-terminal "screen-256color"
# Start Window Numbering at 1
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when a window is closed
set -sg renumber-windows on
# Faster Command Sequences
set -g escape-time 0
# Setting leader to C-a to mimic Screen
unbind C-b
set -g prefix C-a
bind a send-keys C-a
bind C-a last-window
# Split window with pipe and dash
bind | split-window -h
bind - split-window -v
# Use hjkl for movement between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind ` select-window -t 0
# reload tmux configuration
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# clear pane
bind C-l send-keys C-l
# Disable pane auto-renaming
set-option -g allow-rename off
# Smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys 'C-\\') || tmux select-pane -l"
# scrollback buffer size increase
set -g history-limit 100000
# Easily resize tmux panes
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
# ——— Cosmetics ————————————————————————————————————————————————————
set -g status-justify centre
set -g status-bg black
set -g status-left "#[fg=green]#S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-right "#[fg=cyan]%A, %b %d #[fg=yellow]|#[fg=cyan]%l:%M %p"
setw -g window-status-bell-attr default
setw -g window-status-bell-fg red
setw -g window-status-activity-attr bold
setw -g window-status-format "#[fg=cyan]• #[fg=white]#I#[fg=cyan] #[fg=white]#W"
setw -g window-status-current-format "#[fg=red]▶ #[fg=white]#I#[fg=red,bold] #[fg=white]#W"
set -g pane-border-fg colour238
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg black
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# ——— Cosmetics ————————————————————————————————————————————————————
if-shell '[[ -e ~/.tmux.conf.local ]]' 'source-file ~/.tmux.conf.local'