forked from MikeMcQuaid/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 6
/
tmux.conf
executable file
·95 lines (73 loc) · 2.83 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
89
90
91
92
93
94
95
set-option -g default-shell /bin/zsh
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'xamut/tmux-spotify'
set -g @plugin 'christoomey/vim-tmux-navigator'
# Better prefix
set -g prefix C-a
unbind-key C-b
bind C-a send-prefix
# restore clearing screen
bind C-l send-keys 'C-l'
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'V' send -X select-line
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "pbcopy"
# Resize in smaller increments
bind -r M-h resize-pane -L 2
bind -r M-k resize-pane -U 2
bind -r M-j resize-pane -D 2
bind -r M-l resize-pane -R 2
# reload configs
unbind-key r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
unbind-key c # Unbind old create
bind-key c new-window -c "#{pane_current_path}" # Create current path
# 25% horizontal split
unbind ^T
bind ^T split-window -p 25 -c '#{pane_current_path}'
# 30% vertical split
unbind ^U
bind ^U split-window -h -p 30 -c '#{pane_current_path}'
# horizontal and vertical splits
unbind |
bind | split-window -h -c '#{pane_current_path}'
unbind _
bind _ split-window -v -c '#{pane_current_path}'
unbind Right
bind Right resize-pane -R 8
unbind Left
bind Left resize-pane -L 8
unbind Up
bind Up resize-pane -U 4
unbind Down
bind Down resize-pane -D 4
# zoom into current pane, repeating will unzoom
unbind +
bind + resize-pane -Z
# Set default terminal for colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ',xterm-256color:Tc'
set -g base-index 1 # 1 indexed, for keyboards
set -sg escape-time 0 # No escape time
set -g history-limit 10000 # More sane history limit
set -g renumber-windows on # Automatically renumber windows
set -g set-titles on # Report terminal title
set -g set-titles-string "#S - #W" # Terminal title format
# # Status bar
set -g status on
set -g status-interval 2
set -g status-position bottom
set -g status-right "#[fg=white]%d/%m %H:%M | #($HOME/go/bin/gitmux #{pane_current_path})"
set -g message-style bg=colour0,fg=colour1
set -g pane-border-style fg=colour3 # Yellow borders
set -g pane-active-border-style fg=colour3 # Yellow borders
set -g status-style bg=colour235,fg=colour8
set -g window-status-current-style fg=colour5 # Purple selected windows
set -g window-status-bell-style fg=colour1 # Red on bell
set -g window-status-separator " " # Separate by double space
# Settings for true color
set -ga terminal-overrides ",xterm-256color:Tc"
run -b '~/.tmux/plugins/tpm/tpm'