-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathtmux.conf
93 lines (79 loc) · 3.12 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
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
setw -g mode-keys vi
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
set-option -g repeat-time 0
set -g default-terminal "${TERM}"
set -as terminal-overrides ",$TERM:Tc"
set -as terminal-overrides ',$TERM:Tc,*:Ss=\E[%p1%d q:Se=\E[2 q'
# undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# support colors for undercurl
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# smart pane switching with awareness of vim splits
set -g @vim_navigator_mapping_left "C-h"
set -g @vim_navigator_mapping_right "C-l"
set -g @vim_navigator_mapping_up "C-k"
set -g @vim_navigator_mapping_down "C-j"
set -g @vim_navigator_mapping_prev ""
set-window-option -g other-pane-height 40
set-window-option -g other-pane-width 90
set -g default-terminal "xterm-ghostty"
set -g focus-events on
set -sg escape-time 0
set-option -g -q mouse on
set -g base-index 1
# Easy config reload
bind R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# edit tmux.conf or tmux-status
bind E new-window -n 'tmux.conf' 'nvim ~/.dotfiles/tmux.conf && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'
bind S new-window -c 'tmux-status.conf' 'nvim ~/.config/tmux/tmux-status.conf && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'
# edit vimrc
bind N new-window -n 'nimrc' 'cd ~/.config/nvim && nvim'
# edit zshrc
bind Z new-window -n 'zshrc' 'nvim ~/.dotfiles/zshrc && source ~/.zshrc && tmux desplay ".zshrc updated"'
# vi is good
# set -g status-keys vi
bind : command-prompt
bind r refresh-client
bind L clear-history
bind Q set -g status
bind space next-window
bind bspace previous-window
bind enter next-layout
# use vim-like keys for splits and windows
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind C-l send-keys 'C-l'
bind C-o rotate-window
bind + select-layout main-horizontal
bind = select-layout main-vertical
bind a last-pane
bind q display-panes
bind c new-window -c "#{pane_current_path}"
bind t next-window
bind T previous-window
bind [ copy-mode
bind ] paste-buffer
bind -Tcopy-mode-vi Enter send -X copy-selection-and-cancel
bind -Tcopy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
source-file $HOME/.config/tmux/tmux-status.conf
# List of plugins
set -g monitor-activity on
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins'
set -g @plugins 'tmux-plugins/tpm'
set -g @plugins 'tmux-plugins/tmux-battery'
set -g @plugins 'tmux-plugins/tmux-cpu'
set -g @plugins 'mhartington/tmux-mail'
set -g @plugins 'tmux-plugins/tmux-resurrect'
set -g @plugins 'tmux-plugins/tmux-continuum'
set -g @plugins 'tmux-plugins/tmux-yank'
set -g @plugin 'christoomey/vim-tmux-navigator'
run '~/.config/tmux/plugins/tpm/tpm'