-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
141 lines (109 loc) · 4.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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Use something easier to type as the prefix.
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# reload config without killing server
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# 256 colors
set -g default-terminal "screen-256color"
# disable auto renaming
setw -g automatic-rename off
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# I personally rebind the keys so “|” splits the current window vertically, and “-” splits it horizontally. Not the easiest things to type, though easy to remember.
unbind %
bind | split-window -h
bind - split-window -v
# easy resizing of panes
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# create new windows/panes in same directory
bind c new-window -c "#{pane_current_path}"
bind "\"" split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# enable and disable keyboard input for panes
bind < select-pane -d \; display-message "input disabled"
bind > select-pane -e \; display-message "input enabled"
# size windows based on clients looking at that window
setw -g aggressive-resize on
# enable mouse control
set -g mouse on
# start window numbers at 1 to match keyboard order with tmux order
set -g base-index 1
# start pane numbers at 1 to match keyboard order with tmux order
setw -g pane-base-index 1
# reenable automatic renaming for the current window
bind N setw automatic-rename on \; display-message "automatic rename enabled"
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# fixes the delay problem
set -sg escape-time 0
# display pane numbers for longer
set -g display-panes-time 2000
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# increase scrollback lines
set -g history-limit 65536
# keybinding to clear history
bind C-k clear-history \; display-message "history cleared"
# display pane numbers for longer
set -g display-panes-time 2000
# Color (base16-tomorrow-night)
# Customized from https://github.com/mattdavis90/base16-tmux/blob/master/colors/base16-tomorrow-night.conf
set -g status-left-length 20
set -g status-left '#{?pane_input_off,#[fg=#f7ca88],#[fg=#dc9695]}[#[fg=#dc9695]#S:#I.#P#{?pane_input_off,#[fg=#f7ca88],#[fg=#dc9695]}] '
set -g status-right '#[fg=#7cafc2]#([ "$(tmux show-option -g prefix)" != "prefix C-a" ] && echo "($(tmux show-option -g prefix | cut -c 8-)) ")#[fg=#ab4642]%d %b %Y #{?client_prefix,#[fg=#f7ca88],#[fg=#ba4642]}- #[fg=#a1b56c]%I:%M %p #{?client_prefix,#[fg=#f7ca88],#[fg=#babbaf]}- #[fg=#7cafca]#([ -f $HOME/.name ] && cat $HOME/.name || hostname)'
# default statusbar colors
set-option -g status-style "fg=#b4b7b4,bg=#282a2e"
# default window title colors
set-window-option -g window-status-style "fg=#b4b7b4,bg=default"
# active window title colors
set-window-option -g window-status-current-style "fg=#f0c674,bg=default"
# pane border
set-option -g pane-border-style "fg=#282a2e"
set-option -g pane-active-border-style "fg=#373b41"
# message text
set-option -g message-style "fg=#c5c8c6,bg=#282a2e"
# pane number display
set-option -g display-panes-active-colour "#b5bd68"
set-option -g display-panes-colour "#f0c674"
# clock
set-window-option -g clock-mode-colour "#b5bd68"
# copy mode highligh
set-window-option -g mode-style "fg=#b4b7b4,bg=#373b41"
# bell
set-window-option -g window-status-bell-style "fg=#282a2e,bg=#cc6666"
# # Fix nested tmux problem while using ssh
# bind -n C-t new-window -a
# bind -n S-left prev
# bind -n S-right next
# bind -n S-C-left swap-window -t -1
# bind -n S-C-right swap-window -t +1
#
# bind -n M-F11 set -qg status-bg colour233
# bind -n M-F12 set -qg status-bg colour238
# bind -n S-up \
# send-keys M-F12 \; \
# set -qg status-bg colour233 \; \
# unbind -n S-left \; \
# unbind -n S-right \; \
# unbind -n S-C-left \; \
# unbind -n S-C-right \; \
# unbind -n C-t \; \
# set -qg prefix C-b
# bind -n S-down \
# send-keys M-F11 \; \
# set -qg status-bg colour238 \; \
# bind -n S-left prev \; \
# bind -n S-right next \; \
# bind -n S-C-left swap-window -t -1 \; \
# bind -n S-C-right swap-window -t +1 \; \
# bind -n C-t new-window -a -c "#{pane_current_path}" \; \
# set -qg prefix C-a