-
Notifications
You must be signed in to change notification settings - Fork 6
/
tmux.conf
82 lines (64 loc) · 2.4 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
# Enable OS X pasteboard.
# http://robots.thoughtbot.com/post/19398560514/how-to-copy-and-paste-with-tmux-on-mac-os-x
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Change the prefix from C-b to C-a. Map a to send C-a.
unbind-key C-b
set -g prefix C-a
bind-key a send-prefix
# Enable mouse for selecting panes and windows, resizing panes, and scrolling.
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
# Use 256 colors.
set -g default-terminal 'screen-256color'
# Use mislavs solution to switch panes transparently in vim and tmux.
# https://gist.github.com/mislav/5189704
bind-key -n C-k run-shell 'tmux-vim-select-pane -U'
bind-key -n C-j run-shell 'tmux-vim-select-pane -D'
bind-key -n C-h run-shell 'tmux-vim-select-pane -L'
bind-key -n C-l run-shell 'tmux-vim-select-pane -R'
bind-key -n "C-\\" run-shell 'tmux-vim-select-pane -l'
# act like vim
setw -g mode-keys vi
# jump to previous and next window
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# increase scrollback lines
set -g history-limit 10000
# soften status bar colors
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# resize panes like vim
bind-key < resize-pane -L 5
bind-key > resize-pane -R 5
bind-key - resize-pane -D 5
bind-key + resize-pane -U 5
# kill the scroll back
bind-key k clear-history
# better mnemonics for splitting
bind-key \ split-window -h
bind-key - split-window -v
# Source this file with r.
bind-key r source-file ~/.tmux.conf; display-message " ✱ ~/.tmux.conf is reloaded"
# Disable programs changing window names.
set-window-option -g allow-rename off
# Customize status bar.
set-option -g status-utf8 on
set-option -g status-bg colour11
set-option -g status-fg colour8
set-option -g status-left ' #[bold]❐ #S#[default] |'
set-option -g status-right '#[bold]#(whoami) ● #H#[default] '
set-option -g status-right-length 60
set-option -g status-left-length 60
# Highlight active window.
set-window-option -g window-status-current-bg colour166
set-window-option -g window-status-current-fg colour15
set-window-option -g window-status-current-attr bold
set-window-option -g window-status-current-format ' #I:#W '
# Create new session.
bind-key S new-session