-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
88 lines (73 loc) · 3.56 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
# Update Prefix Key to ^A
# ---------------------------
# Ctrl+a just feels more natural to me, so we'll bind it to the meta key and
# unbind Ctrl-b.
set -g prefix C-a
bind C-a send-prefix
unbind C-b
# Use vi mode keys
setw -g mode-keys vi
# setup copy/selection binds
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
# Update our colors
# ------------------------------
set -g status-style bg=colour208,fg=black
set -g pane-active-border-style bg=blue,fg=black
# Bind pane resizing to Shift+Right/Left/Up/Down
# This is normally bound to Ctrl+Right/Left/Up/Down, but that conflicts with
# OSX's system bindings
bind -r S-Right resize-pane -R 1
bind -r S-Left resize-pane -L 1
bind -r S-Up resize-pane -U 1
bind -r S-Down resize-pane -D 1
# Bind window swapping to Ctrl+Shift+Right/Left
# See: http://superuser.com/questions/343572/how-do-i-reorder-tmux-windows
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# allow bind R to reload our tmux config
bind R source-file ~/.tmux.conf\; display-message "tmux config reloaded"
# Bind b to turn off/on status bar
bind b set-option status
# bind S to toggle the syncing of panes
bind S set-option synchronize-panes
# Set per-pane history limit to 200k lines
set -g history-limit 200000
# bind N to search for a window based on window name
bind-key F command-prompt -p 'search for window: ' 'find-window %%;'
# bind f to custom window search
bind-key f new-window -n 'winselect' '\
ases="$(tmux display-message -p "#S")";\
selection="$(tmux list-windows -aF "#S:#W" | egrep -v "winselect$" | fzf -i --reverse)";\
if [[ ! -z "$selection" ]]; then\
ses="$(echo "$selection"|sed "s/^\([^:]\+\):.*$/\1/")";\
tmux select-window -t "$selection";\
[[ "$ases" != "$ses" ]] && tmux switch-client -t "${ses}";\
fi'
# bind P to copy entire scrollback to file
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.scrollback' 'capture-pane -S -200000 ; save-buffer %1 ; delete-buffer'
# tune down the repeat timeout
set -g repeat-time 250
# do not allow tmux to rename my windows
set -g allow-rename off
# darker theme
set -g message-command-style bg=colour233,fg=colour242
set -g message-style bg=colour233,fg=colour242
set -g pane-active-border-style fg=colour242
set -g pane-border-style fg="colour233"
set -g status "on"
set -g status-justify "centre"
set -g status-left "#[fg=colour234,bg=colour242,bold] #S #[fg=colour242,bg=colour234,nobold,nounderscore,noitalics]"
set -g status-left-length "100"
set -g status-left-style "none"
set -g status-right "#[fg=colour234,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour240,bg=colour234] %A #[fg=colour233,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour242,bg=colour233] %Y-%m-%d · %R #[fg=colour242,bg=colour233,nobold,nounderscore,noitalics]#[fg=colour234,bg=colour242] #h "
set -g status-right-length "100"
set -g status-right-style "none"
set -g status-style "none"
set -g status-style bg="colour234"
setw -g window-status-activity-style bg=colour234,fg=colour242,none
setw -g window-status-current-format "#[fg=colour234,bg=colour233,nobold,nounderscore,noitalics]#[fg=colour214,bg=colour233] #I·#W #[fg=colour233,bg=colour234,nobold,nounderscore,noitalics]"
setw -g window-status-format "#[fg=colour234,bg=colour234,nobold,nounderscore,noitalics]#[default,fg=colour242] #I·#W #[fg=colour234,bg=colour234,nobold,nounderscore,noitalics]"
setw -g window-status-separator ""
setw -g window-status-style bg=colour234,fg=colour240,none