-
Notifications
You must be signed in to change notification settings - Fork 7
/
tmux.conf
97 lines (75 loc) · 3.41 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
96
97
# Better prefix
set -g prefix C-s
unbind-key C-b
# 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"
# Vim pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# 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
unbind-key % # Unbind old horizontal
bind-key % split-window -hc "#{pane_current_path}" -l 84 # Vertical current path, 80 width
bind-key '|' split-window -hc "#{pane_current_path}" -l 84 # Vertical current path, 80 width
unbind-key '"' # Unbind old vertical
bind-key '"' split-window -c "#{pane_current_path}" # Horizontal current path
bind-key '-' split-window -c "#{pane_current_path}" # Horizontal current path
unbind-key c # Unbind old create
bind-key c new-window -c "#{pane_current_path}" # Create current path
bind-key r resize-pane -x 84 # Resize pane to 80 chars
bind-key k clear-history # Clear Screen
# Toggle status bar
bind-key a set-option status
unbind-key t
bind-key t display-popup -d '#{pane_current_path}' -E -w 80% -h 80% "$SHELL"
# Big lazygit for comitting
bind-key g display-popup -d '#{pane_current_path}' -E -w 80% -h 80% "lazygit"
# Set default terminal for colors
set -g default-terminal "xterm-256color"
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 mouse on # Enable mouse
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
set -g status-interval 5 # Update often for status
# Status bar
set -g status-left ''
set -g status-right ''
set -g status-right '#(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)'
set -g status-position bottom
set -g status-justify left
set -g message-style bg=colour0
set -g message-style fg=colour1
set -g pane-border-style fg=colour3
set -g pane-active-border-style fg=colour3
set -g status-style fg=colour8
set -g status-style fg=colour8
set -g window-status-current-style fg=colour4
set -g window-status-bell-style fg=colour1
set -g window-status-format "#I #W " # Window format
set -g window-status-current-format "#I #W " # Current window format
setw -g window-status-current-style "bg=terminal bold"
setw -g window-status-current-format ' #[fg=colour1]#I #W #F '
setw -g window-status-style 'dim'
setw -g window-status-format ' #[fg=terminal]#I #W #[fg=colour1]#F '
set -g window-status-separator ""
# Settings for true color
set -ga terminal-overrides ",xterm-256color:Tc"
# allow escape sequence passthrough
set -g allow-passthrough on