-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
96 lines (78 loc) · 3.06 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
set -s escape-time 0
set -g default-terminal "${TERM}"
set -ga terminal-overrides ',*256col*:Tc'
set -g detach-on-destroy off # don't exit from tmux when closing a session
set -g allow-rename off
setw -g automatic-rename off
set -g set-titles on
set -g mouse on
set-option -g focus-events on
# Set prefix
unbind C-b
set -g prefix C-space
bind C-space send-prefix
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
# Copy/Paste
bind P paste-buffer
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'simeonoff/minimal-tmux-status#nightfox'
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @resurrect-strategy-nvim 'session'
# Split panes using | and -
bind | split-window -h # Split panes horizontally with the '|' key
bind - split-window -v # Split panes vertically with the '-' key
unbind '"'
unbind %
# Minimal Tmux Status configuration
set -g @minimal-tmux-theme 'rose-pine'
set -g @minimal-tmux-justify 'center'
set -g @minimal-tmux-indicator true
set -g @minimal-tmux-status 'top'
set -g @minimal-tmux-show-expanded-icon-for-all-tabs true
# Set the window status format
set -g @minimal-tmux-window-status-format "#I: #W"
# Enables or disables the left and right status bar
set -g @minimal-tmux-right false
set -g @minimal-tmux-status-right " %I:%M %p "
# Set vi-mode
set-window-option -g mode-keys vi
# Set x to kill pane
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
# Vim Keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Relaod TMUX config
unbind r
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
# Resize panes
bind -r H resize-pane -L 5 # Resize pane 10 cells to the left
bind -r J resize-pane -D 5 # Resize pane 10 cells down
bind -r K resize-pane -U 5 # Resize pane 10 cells up
bind -r L resize-pane -R 5 # Resize pane 10 cells to the right
set-window-option -g pane-border-status top
set-window-option -g pane-border-format ''
# Run lazygit in a new window named "Lazygit" when G is pressed
bind g new-window -n "Lazygit" lazygit
# Enable undercurl
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# Show sesh picker
unbind "t"
bind-key "t" run-shell "sesh connect $(
sesh list -tz | fzf-tmux -p 55%,60% \
--no-sort --border-label ' Sesh ' --prompt ' ' \
--bind 'tab:down,btab:up' \
--bind 'ctrl-a:change-prompt( )+reload(sesh list)' \
--bind 'ctrl-t:change-prompt( )+reload(sesh list -t)' \
--bind 'ctrl-x:change-prompt( )+reload(sesh list -z)' \
--bind 'ctrl-f:change-prompt( )+reload(fd -H -d 2 -t d -E .Trash . ~)'
)"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'