-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
91 lines (68 loc) · 2.6 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
set -sg escape-time 10
# set-option default-terminal "tmux-256color"
# set-option -ga terminal-overrides ",*256col*:Tc"
# set-option -ga default-terminal "xterm-256color"
# Set the prefix to `ctrl + a` instead of `ctrl + b`
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Open ~/.tmux.conf in vim and reload settings on quit
unbind e
bind e new-window -n '~/.tmux.conf' "sh -c 'nvim ~/.tmux.conf && tmux source ~/.tmux.conf'"
# Use | and - to split a window vertically and horizontally instead of " and % respoectively
unbind '"'
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Move around panes with hjkl, as one would in vim after pressing ctrl + w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Switch betewen panes using alt + arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Use shift + arrow key to move between windows in a session
#bind -n S-Left previous-window
#bind -n S-Right next-window
# And something closer to homerow too
bind -n M-C-H previous-window
bind -n M-C-L next-window
# Use r to quickly reload tmux settings
unbind r
bind r \
source-file ~/.tmux.conf \;\
display 'Reloaded tmux config'
#############################
########## Settings
#############################
# Refresh status line every 5 seconds - Good for when music is playing / update time etc
set -g status-interval 5
# Start window and pane indices at 1.
set -g base-index 1
set -g pane-base-index 0
# Length of tmux status line
set -g status-left-length 30
set -g status-right-length 150
set-option -g status "on"
# Default statusbar color
set-option -g status-style bg=colour0,fg=colour240 # bg=bg1, fg=fg1
# Default window title colors
set-window-option -g window-status-style bg=colour234,fg=colour244 # bg=yellow, fg=bg1
# Default window with an activity alert
set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
# Active window title colors
set-window-option -g window-status-current-style bg=colour244,fg=colour233 # fg=bg1
# Set active pane border color
set-option -g pane-active-border-style fg=colour241
# Set inactive pane border color
set-option -g pane-border-style fg=colour239
# Message info
set-option -g message-style bg=colour239,fg=colour253 # bg=bg2, fg=fg1
# Writing commands inactive
set-option -g message-command-style bg=colour239,fg=colour244 # bg=fg3, fg=bg1
# Pane number display
set-option -g display-panes-active-colour colour1 #fg2
set-option -g display-panes-colour colour237 #bg1