-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtmux.conf
More file actions
101 lines (79 loc) · 3.55 KB
/
tmux.conf
File metadata and controls
101 lines (79 loc) · 3.55 KB
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
98
99
100
101
# 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
# Easy window movement
bind-key < swap-window -t -1
bind-key > swap-window -t +1
# 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
# scrollbar
set -g pane-scrollbars-style "width=0,bg=0,fg=7,pad=1"
set -g pane-scrollbars "modal"
# Handle bells
set -g monitor-bell on
set -g bell-action other # don't let the current window be noisy
# Status bar
set -g status-left ''
set -g status-right '#(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)'
set -g status-position top
set -g status-justify absolute-centre
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
# Window colors
set -g window-status-separator '#[fg=colour8] • #[fg=default]'
set -g window-status-style "fg=colour7"
set -g window-status-format '#[bg=terminal]#[fg=7]#W#{?window_zoomed_flag, ,}#[fg=magenta]#{?window_bell_flag, ◉,}'
set -g window-status-current-format '#[fg=colour14]#W#{?window_zoomed_flag, ,}#[fg=default]'
# Settings for true color
set -ga terminal-overrides ",xterm-256color:Tc"
# Allow escape sequence passthrough (e.g. colors)
set -g allow-passthrough on