-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
84 lines (69 loc) · 2.67 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
set-option -g default-shell $SHELL
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",screen-256color:Tc"
set -g history-limit 1000000
# Make it use C-a, similar to screen..
unbind C-b
set -g prefix C-a
bind C-a send-prefix
unbind l
unbind Space
# general shortcuts
bind-key l last-window
bind-key C-k clear-history
# rebind new window/pane to open in same dir
unbind '"'
bind '"' split-window -c "#{pane_current_path}"
unbind %
bind % split-window -h -c "#{pane_current_path}"
unbind c
bind c new-window -c "#{pane_current_path}"
## Join panes:
bind-key m-j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key m-s command-prompt -p "send pane to:" "join-pane -t '%%'"
## Swap/Move windows:
bind-key m-w command-prompt -p "swap current window with:" "swap-window -t '%%'"
bind-key m-W command-prompt -p "move current window to:" "move-window -t '%%'"
# Reload key
bind-key R source-file "$HOME/.tmux/reload.tmux"
# Load default layout
bind-key C-l source-file "$HOME/.tmux/layout.tmux"
set -g repeat-time 250
set -sg escape-time 0
setw -g mode-keys vi
# resize panes
# bind-key -n M-Left resize-pane -L 5
# bind-key -n M-Right resize-pane -R 5
# bind-key -n M-Up resize-pane -U 5
# bind-key -n M-Down resize-pane -D 5
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# ressurect
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-vim 'session'
# continuum
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
# pane hostname
set -g @plugins "soyuka/tmux-current-pane-hostname"
# status
set -g status-style 'fg=black,bg=colour34'
set -g status-left-length 100
set -g status-left '[#S] '
set -g status-right-length 150
set -g status-right '#[fg=colour147]#[default]#[fg=colour23,bold,bg=colour147] #h #[default]#[fg=colour220,bg=colour147]#[default]#[fg=colour94,bold,bg=colour220] #[default]#[fg=colour202,bg=colour220]#[default]#[fg=colour231,bold,bg=colour202] %Y-%m-%d %H:%M:%S #[default]'
set -g window-status-format '#I:#{=15:window_name}'
set -g window-status-current-format '#[fg=colour84]║#[default]#[bg=colour84,bold] #I:#W #{?window_zoomed_flag,⫹,} #[default]#[fg=colour84]║#[default]'
set -g pane-border-style fg=colour106,bg=default
set -g pane-active-border-style fg=yellow,bg=default
# set -g window-style 'fg=colour28,bg=colour28'
# hooks
# set-hook pane-focus-in 'send-keys "export SSH_AGENT_PID='$SSH_AGENT_PID' \; export SSH_AUTH_SOCK='$SSH_AUTH_SOCK' "'
# set-hook -u pane-focus-in
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# local configs
source-file "$HOME/.tmux/local.tmux"