-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
68 lines (52 loc) · 2.5 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
# Tip of the hat to:
# https://github.com/thoughtbot/dotfiles/blob/master/tmux.conf
# https://github.com/square/maximum-awesome/blob/master/tmux.conf
# http://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu/
# use C-j, since it's on the home row and easier to hit than C-b
set-option -g prefix C-j
unbind-key C-j
bind-key C-j send-prefix
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# mouse behavior
set -g mouse on
# Use vi keys to move around history
set-window-option -g mode-keys vi
# Fix copy behavior on linux
bind-key j copy-mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
# bind -T copy-mode-vi y send -X copy-pipe-and-cancel "copy2clip"
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"
# bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "copy2clip"
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"
set -g default-terminal "xterm-256color"
set -ag terminal-overrides ",xterm-256color:Tc"
bind-key : command-prompt
bind-key r refresh-client
bind-key space last-window
bind-key enter source-file ~/dotfiles/tmux/dev.tmux
# increase scrollback lines
set -g history-limit 10000
# remove administrative debris (session name, hostname, time) in status bar
set -g status-left-length 85
set-option -g status-left "#[fg=#dfbfff,bold]\
#(tmux-k8s)\
#[fg=default] -- "
set -g status-right ''
# Set color palette to match Ayu
set-window-option -g window-status-current-style fg='#59C2FF',bg=default
set-window-option -g window-status-style fg='#B3B1AD',bg=default
set-option -g message-style fg=black,bg='#FFB454'
# default statusbar colors
set-option -g status-style fg='#B3B1AD',bg='#0A0E14' #yellow and base02
# Have tmux automatically rename itself
set-option -g allow-rename off
set-window-option -g automatic-rename on
set-window-option -g automatic-rename-format "#{?#{m:*/repo/*,#{pane_current_path}},#(cd #{pane_current_path} && basename `git rev-parse --show-toplevel`),#{?#{!=:#{pane_current_command},bash},#{?#{m:ssh,#{pane_current_command}},#(pgrep -flaP #{pane_pid} ssh | cut -d ' ' -f 3),#{pane_current_command}},#{?#{m:*/bob,#{pane_current_path}},~,#{b:pane_current_path}}}}"
set-window-option -g status-interval 5
# Allow the arrow key to be used immediately after changing windows
set-option -g repeat-time 0
set-option -sg escape-time 10