-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
116 lines (87 loc) · 4.14 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
# ------------------------------------------------
# General
# ------------------------------------------------
# Set terminal window title
set-option -g set-titles on
set-option -g set-titles-string '#S [#{pane_current_path}]'
# Set TERM
# set-option -g default-terminal "tmux"
set-option -g default-terminal "screen-256color"
set-option -g history-limit 90000
# Set Ctrl-a as the default prefix key combination
# and unbind C-b to free it up
set-option -g prefix C-a
unbind-key C-b
# Use send-prefix to pass C-a through to application
bind-key C-a send-prefix
# Start indices on correct side of keyboard (0 by default)
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Allow faster command sequences
set-option -s escape-time 0
# Use prefix-'|' to split window horizontally and prefix-'-' to split vertically
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
# Use vi-like status and mode keys
set-option -g status-keys vi
set-option -g mode-keys vi
# Map vi-like movement keys as pane movement keys
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# ------------------------------------------------
# Colors
# ------------------------------------------------
# Set pane colors - highlight the active pane
#set-option -g pane-border-fg colour235 # Dark brown
#set-option -g pane-active-border-fg colour240 # Medium brown
# Colorize messages in the command line
#set-option -g message-bg colour24 # Turquoise blue
#set-option -g message-fg colour253 # True white
#set-option -g message-attr bold
# ------------------------------------------------
# Status Bar
# ------------------------------------------------
set-option -g status on # turn the status bar on
set -g status-interval 20 # set update frequency (default 15 seconds)
set -g status-justify centre # center window list for clarity
# visual notification of activity in other windows
setw -g monitor-activity on
set -g visual-activity on
# set color for status bar
set-option -g status-bg black
set-option -g status-fg brightwhite
#set-option -g status-attr none
# Set window list colors - red for active and cyan for inactive
#
# Set windows properties
#set-window-option -g window-status-fg white
#set-window-option -g window-status-bg black
#set-window-option -g window-status-attr dim
set-window-option -g window-status-format '(#I) #W'
# Set current window properties
#set-window-option -g window-status-current-fg brightwhite
#set-window-option -g window-status-current-bg black
#set-window-option -g window-status-current-attr bright
set-window-option -g window-status-current-format '(#I) #W'
#set-window-option -g window-status-activity-fg colour234 # Dark gray
#set-window-option -g window-status-activity-bg red
#set-window-option -g window-status-activity-attr bright
# show host name and IP address on left side of status bar
set -g status-left-length 80
set -g status-left "#[fg=black,bg=brightwhite] #(echo #h | tr '[:lower:]' '[:upper:]') #[default,fg=brightwhite,nobold]#[fg=brightgreen]#(ip -o addr show up primary scope global | awk '$2 ~ /^e/ {print \" \" $4}' | cut -d/ -f1)#[fg=brightblue]#(ip -o addr show up primary scope global | awk '$2 ~ /^w/ {print \" \" $4}' | cut -d/ -f1)#[fg=brightmagenta]#(ip -o addr show up primary scope global | awk '$2 ~ /^t/ {print \" \" $4}' | cut -d/ -f1)#[default] "
# show session name, window & pane number, date and time on right side of status bar
set -g status-right-length 60
set -g status-right " #S [#I:#P] #[fg=brightblack]#[default,bg=brightblack] %b %d %Y #[fg=black,bg=brightwhite] %H:%M "
set -g mouse on
set -g @yank_selection 'clipboard' # or 'secondary' or 'clipboard'
# y and p as in vim
bind Escape copy-mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b"
bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
set-option -g focus-events on
set-option -sa terminal-overrides ',xterm-256color:RGB'