-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
87 lines (70 loc) · 3.08 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
###
# Usability settings
###
# Mousewheel scrolling support & clickable panes
set -g mouse on
# Remap prefix from 'Ctrl+b' to 'Ctrl+Space'
# You can change this per personal preference, however
# I would not recommend using Ctrl+b, Ctrl+c, Ctrl+a, etc.
# As they interfere with some network CLIs
unbind C-b
set-option -g prefix C-Space
bind-key C-Space send-prefix
# Prevent renaming of windows
set-option -g allow-rename off
# Default terminal
set -s default-terminal 'tmux-256color'
# Set vi bindings for buffer navigation
set-window-option -g mode-keys vi
set-option -g history-limit 2000
# Pane splitting keys, if you wish to split horizontaly or vertically
unbind "'"
unbind %
bind-key \= split-window -h
bind-key - split-window -v
# Use Alt-arrow keys without prefix key to switch panes
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
# Rebind last window (Ctrl+Space twice)
unbind l
bind-key C-Space last-window
# Ctrl+Space r to Reload tmux config
bind r source-file ~/.tmux.conf \; display "Reloaded config"
# Smaller delay for escape key press
# Values between 5-100 are recommended
# Increase this if you are seeing text leaks
set -sg escape-time 5
# Start windows from 1
set -g base-index 1
set -g pane-base-index 1
###
# Visibility settings
# Left triangle = \uE0B2
# Right triangle = \uE0B0
###
# Set status bar
set -g status-bg colour0
set -g status-fg white
set -g status-interval 1
set -g status-justify centre
# Left side of status bar, uncomment for relevant environment
set -g status-left-length 40
set -g status-right-length 40
set-window-option -g window-status-separator ' | '
#
# Some environment examples here which have different colours
#
# Prod
#set -g status-left " #[bg=colour236,fg=colour236]#[fg=colour39] #S #[fg=colour236] #[bg=red]\uE0B0#[fg=yellow] !PROD! #[bg=black,fg=red]\uE0B0"
#set -g status-right "#[bg=black,fg=red]\uE0B2#[bg=red,fg=yellow] !PROD! #[fg=color236]\uE0B2#[bg=color236,fg=color135] %H:%M:%S #[fg=color246]\uE0B3#[fg=brightyellow] %d-%b-%y "
# Dev
set -g status-left " #[bg=colour236,fg=colour236]#[fg=colour39] #S #[fg=colour236] #[bg=green]\uE0B0#[fg=black] DEV #[bg=black,fg=green]\uE0B0"
set -g status-right "#[bg=black,fg=green]\uE0B2#[bg=green,fg=black] DEV #[fg=color236]\uE0B2#[bg=color236,fg=color135] %H:%M:%S #[fg=color246]\uE0B3#[fg=brightyellow] %d-%b-%y "
# Preprod
#set -g status-left " #[bg=colour236,fg=colour236]#[fg=colour39] #S #[fg=colour236] #[bg=colour166]\uE0B0#[fg=black] STAGE #[bg=black,fg=colour166]\uE0B0"
#set -g status-right "#[bg=black,fg=colour166]\uE0B2#[bg=colour166,fg=black] STAGE #[fg=color236]\uE0B2#[bg=color236,fg=color135] %H:%M:%S #[fg=color246]\uE0B3#[fg=brightyellow] %d-%b-%y "
# Window titles
set-window-option -g window-status-format "#[fg=color240]\uE0B2#[bg=color240,fg=white] #I #[bg=color236,fg=color240]\uE0B0#[fg=white] #W#[fg=yellow]#F #[bg=black,fg=color236]\uE0B0"
set-window-option -g window-status-current-format "#[fg=red]\uE0B2#[bg=red,fg=yellow] #I #[bg=color236,fg=red]\uE0B0#[fg=white] #[bold]#W#[fg=yellow]#F #[bg=black,fg=color236]\uE0B0"