-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmux.conf
More file actions
149 lines (103 loc) · 3.86 KB
/
Copy pathtmux.conf
File metadata and controls
149 lines (103 loc) · 3.86 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# unbind-key -a # unbind keys not being binded anymore (unbinds ALL!!)
# source-file ~/.tmux.reset.conf
# source-file ~/.tmux.defaults #<< this one
# set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# set prefix
unbind C-b
set -g prefix `
bind-key ` send-prefix
# also binds TAB
# set-option -g prefix C-i
# bind-key C-Tab send-prefix
# bind-key C-Tab next-window
set -g mouse off
# setw -g mode-keys vi
# tmux resurrect
# tmux continuum
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'
# !!!importent!!! 开启24 bit color 其他方式都无效
# set -g default-terminal "xterm-256color"
set-option -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
# Enable true color support for wezterm
set -ga terminal-overrides ",wezterm:Tc"
# set -g default-terminal "xterm-24bit"
# set -g default-terminal "xterm-256color"
# set -g default-terminal "screen-256color"
# set -ga terminal-overrides ",*256col*:Tc"
# enable tmux's set of vi bindings for navigating buffers
set -g mode-keys vi
# set default shell
set-option -g default-shell "/bin/zsh"
set-option -g detach-on-destroy off
# rename window as cwd
set-option -g status-interval 5
set-option -g automatic-rename on
# set-option -g automatic-rename-format '#{b:pane_current_path}'
set-option -g automatic-rename-format '#{b:pane_current_path} #{pane_current_command}' # add current command
set-option -g allow-rename off
# reset window number
set -g renumber-windows on
# enable mouse mode
set -g mouse on
# remove esc delay
set -sg escape-time 10
# don't rename windows automaticaly
# set -option -g allow-rename off
# new split windows created in same working directory
bind h split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind R run-shell "~/dotfiles/nvim-reload"
# source-file ~/.nav.conf
# swap window
unbind-key .
bind-key . command-prompt "swap-window -t '%%'; select-window -t :'%%'"
# bind-key . { swap-window -t; previous-window }
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
set 'focus-events'
# NEW show git branch
# status line at top
set-option -g status-position bottom
# # bind C-l send-keys 'C-l'
# bind C-l send-keys -t.- 'clear' Enter
# bind 'if-shell -F "#{!=:#{window_panes},1}"
# PLUGINS
run-shell ~/tools/tmux-resurrect/resurrect.tmux
run-shell ~/tools/tmux-continuum/continuum.tmux
## COLORSCHEME: gruvbox dark
source ~/dotfiles/tmux.conf.gruvbox-dark
# set -g @plugin 'egel/tmux-gruvbox'
# REMOTE TMUX ACCESS - MOBILE
# set -g @plugin 'bjesus/muxile'
# nvim - tmux - skhdrc space navigation
source ~/dotfiles/tmux.conf.yabai
# popup windows
source-file ~/dotfiles/tmux.conf.popup-windows
bind-key S run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh"
bind-key s run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh switch"
bind-key W run-shell -b ~/.tmux/plugins/tmux-fzf/scripts/window.sh
bind-key P run-shell -b ~/.tmux/plugins/tmux-fzf/scripts/pane.sh
bind-key N run-shell -b "~/.tmux/plugins/tmux-fzf/scripts/session.sh new"
set-environment -g TMUX_FZF_SESSION_FILTER "^popup-"
# Put this at the bottom of ~/.tmux.conf ($XDG_CONFIG_HOME/tmux/tmux.conf works too):
# FOR TPM
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' # optional recommended
# set -g @plugin 'christoomey/vim-tmux-navigator' # breaking for yabai
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'sainnhe/tmux-fzf'
# AI TUTOR
# Log pane content periodically
set-hook -g after-resize-pane 'run-shell "tmux capture-pane -t $TMUX_PANE -p > ~/claude_sessions/current/pane_$TMUX_PANE.txt"'
# Enable logging plugin
set -g @plugin 'tmux-plugins/tmux-logging'
TMUX_FZF_MENU=\
"foo\necho 'Hello!'\n"\
"bar\nls ~\n"\
"sh\nsh ~/test.sh\n"
# Initialize TPM (must be last)
run '~/.tmux/plugins/tpm/tpm'