-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
124 lines (94 loc) · 3.49 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
# ##############################################################
# Global settings.
# Switch the prefix to Ctrl-a (Ctrl-b interferes with Vim paging).
set -g prefix C-a
unbind C-b
# Change the default input delay in order to improve Vim performance.
set -sg escape-time 1
# vi mode.
set -g mode-keys vi
set -g status-keys vi
# 256-color mode.
set -g default-terminal "screen-256color"
# Increase scrollback buffer size
set -g history-limit 50000
# Affects size of window when multiple people are attached.
set-window-option -g aggressive-resize on
# Disable mouse interactions
set -g mouse off
# ##############################################################
# Key bindings.
#
# Allow hitting Ctrl-a twice to issue it to other applications.
bind C-a send-prefix
# Reload .tmux.conf with "r".
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Create a new window
bind N new-window -c "#{pane_current_path}"
# Split windows with a more visual set of characters.
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Open new pane in same directory as current pane.
bind _ split-window -v -c "#{pane_current_path}"
# tmux 3.0 breaks on this. Escaping with \\ or '\' does not seem to work.
# bind \ split-window -h -c "#{pane_current_path}"
# Select panes with vi-style movement commands.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes with vi-style movement commands.
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
# Copy and paste with vi-style commands.
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel pbcopy
# Clear pane history
bind-key b send-keys -R \; clear-history
# Use vim keybindings in copy mode
set-window-option -g mode-keys vi
# Toggle synchonize panes, which puts typed commands into all panes.
# bind C-s set-window-option synchronize-panes
# ##############################################################
# Color Scheme
# Derived initially from:
# https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# Loud or Quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# Modes
set-window-option -g clock-mode-colour colour135
set-window-option -g mode-style "bold,fg=colour196,bg=colour238"
# Panes
set -g pane-border-style "bg=colour235,fg=colour238"
set -g pane-active-border-style "bg=colour236,fg=colour51"
# Status Bar
set -g status-justify left
set -g status-interval 2
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-style dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
# Window Status
set-window-option -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
set-window-option -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
set-window-option -g window-status-current-style "bold,fg=colour81,bg=colour238"
set-window-option -g window-status-style "none,fg=colour138,bg=colour235"
set-window-option -g window-status-bell-style "bold,fg=colour255,bg=colour1"
# The Messages
set -g message-style "bold,bg=colour166,fg=colour232"
set -g message-command-style "fg=blue,bg=black"