-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtmux.conf
86 lines (66 loc) · 2.46 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
# Load prefix_highlight
run-shell -b ~/.dotfiles/tmux_prefix_highlight
# Create and configure shells session
new-session -As shells
# Set C-o as command prefix
set -g prefix C-o
# Vi mode
set -g mode-keys vi
# Ensure color works
set -g default-terminal "screen-256color"
# Rename the window title to be the current 'application'
set -g automatic-rename on
# Colors
# To see a list of colours:
# for i in {0..255} ; do printf "\x1b[38;5;${i}mcolour${i}\n"; done | less
set-option -g status-style fg=colour136,bg=colour235
set-option -g window-status-bell-style bg=colour20,fg=white,blink
set-option -g pane-border-style fg=colour235
set-option -g pane-active-border-style fg=colour240
set-option -g message-style fg=colour166,bg=colour235
set-option -g display-panes-active-colour colour33
set-option -g display-panes-colour colour166
# Sensible split keys
unbind %
bind | split-window -h
bind - split-window -v
# Join another window into a pane in this window
bind-key j choose-window "join-pane -s "%%""
# Move the current pane into a new window
bind-key s break-pane
# Bind Alt-Left and Alt-Right to prev/next window
bind -n M-Left previous-window
bind -n M-Right next-window
# Bind Alt-Up and Alt-Down to prev/next pane
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Open new window with F5 or a new window in current path with F6
bind -n F5 new-window
bind -n F6 new-window -c "#{pane_current_path}"
# Move a window in the list with Prefix-Left and Prefix-Right
bind-key left swap-window -t -1 \; previous-window
bind-key right swap-window -t +1 \; next-window
# Fill the gaps with <Prefix>up
bind-key up move-window -r
# Rename current window with <Prefix>R
bind-key R command-prompt -p "Name for this window: " "rename-window '%%'"
# Use <Prefix>r to quickly reload tmux settings
bind r \
source-file ~/.tmux.conf \; \
display 'Reloaded tmux config'
# Host-specific colors
%if "#{==:#{host_short},grunthos}"
set-environment HOSTCOLOR colour24
%else
set-environment HOSTCOLOR colour196
%endif
# Statusbar
set status on
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "left"
set-option -g status-left ""
set-option -g status-right "#{prefix_highlight} #[fg=colour1]%H:%M #[fg=colour2]%m/%d #[fg=colour3]#h"
set-option -g status-right-length 50
set-window-option -g window-status-format "#[fg=#{HOSTCOLOR}] #I #W "
set-window-option -g window-status-current-format "#[bg=white]#[fg=#{HOSTCOLOR}] #I #[bg=#{HOSTCOLOR}]#[fg=white] #W "