-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tmux.conf
75 lines (57 loc) · 2.82 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
# Configure tmux to bend to my will...
# TIPS:
# * Always use the -N option with `bind-key` to attach a note to it.
# That way it will show up in the binding for `list-keys -N`
# Remembering the colours sucks. Use this script to see what they are:
# for i in {0..255}; do printf "\x1b[38;5;${i}mcolor%-5i\x1b[0m" $i ; if ! (( ($i + 1) % 16 )); then echo ; fi ; done
# unbind default prefix...
unbind C-b
# And set it to CTRL+l so only one finger needs to leave the home row
set-option -g prefix C-l
bind-key -N "Send CTRL+L to the underlying shell" C-l send-prefix
# I don't care about describing an individual key binding...
unbind /
# Change the key to rename the session
unbind $
bind-key -N "Rename the current session" C-r command-prompt -I "#S" "rename-session '%%'"
unbind ,
bind-key -N "Rename the current window" R command-prompt -I "#W" "rename-window '%%'"
# Use vi mode
setw -g mode-keys vi
set-option -g status-keys vi
# Make global delaly as short as possible
set-option -gs escape-time 0
# Reload config file
bind-key -N "Reload tmux configuration" r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded!"
# More logical pane splitting
unbind-key '"'
bind-key -N "Split the window vertically" - split-window -v -c "#{pane_current_path}"
unbind-key %
# Use \ rather than | because that way it doesn't require the additional use of Shift
bind-key -N "Split the window horizontally" '\' split-window -h -c "#{pane_current_path}"
# Don't open new windows in the path where tmux started.
# Instead, open them to the current pane's path
unbind-key 'c'
bind-key -N "Create a new window" 'c' new-window -c "#{pane_current_path}"
# Change the visuals around the status bar/panels
setw -g clock-mode-colour colour5
#setw -g mode-style 'fg=colour1 bg=colour15 bold'
set-option -g window-style 'bg=colour239 fg=colour249'
set-option -g window-active-style 'bg=colour232 fg=default'
set-option -g pane-border-style 'bg=colour239 fg=colour238'
set-option -g pane-active-border-style 'bg=default fg=default'
set-option -g status-position bottom
set-option -g status-justify left
set-option -g status-style 'fg=colour7 bg=colour27'
set-option -g status-left ' #S '
set-option -g status-right '#[fg=colour15,bg=colour8] %Y-%m-%d %H:%M '
set-option -g status-right-length 18
set-option -g status-left-length 20
# Make the messages stand out better when they flash past...
set-option -g message-style 'fg=colour0 bg=colour15 bold'
# Copy to the system clipboard
if-shell -b 'test $(uname) = "Linux"' 'bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"'
if-shell -b 'test $(uname) = "Darwin"' 'bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"'
# Mouse mode keys
bind-key -N "Enable pane selection via the mouse" M set -g mouse on
bind-key -N "Disable pane selection via the mouse" m set -g mouse off