-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_tmux.conf
More file actions
114 lines (89 loc) · 3.28 KB
/
Copy pathdot_tmux.conf
File metadata and controls
114 lines (89 loc) · 3.28 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
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
# List of plugins
set-option -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-battery \
tmux-plugins/tmux-cpu \
tmux-plugins/tmux-urlview \
tmux-plugins/tmux-pain-control \
ki-chi/tmux-inputmethod \
yanskun/tmux-my-plugin \
yanskun/tmux-work-dir \
yanskun/tmux-ccusage \
robhurring/tmux-spotify \
hiroppy/tmux-agent-sidebar \
'
set -g prefix C-b
set -g allow-passthrough on
# plugin config
## tmux-continum
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
## style
set-window-option -g pane-border-status off
set -g pane-border-style fg=colour238
set -g pane-active-border-style fg=green
## agent-sidebar
set -g @sidebar_auto_create off
# status bar
set-option -g default-terminal "xterm-256color"
set-option -g status-position bottom
set-option -g status-interval 1
set-option -g status-right-length 100
set-option -g status-left-length 70
set-option -g status-right "\
#[fg=colour22]#[bg=colour0]#[fg=colour255]#[bg=colour22]\
#{iptmthd} |\
#{battery_icon} #{battery_percentage}% |\
#[fg=colour255]%m/%d(%a) %H:%M:%S#[default] "
# #(networkQuality | grep 'Upload capacity' | sed -e 's/Upload capacity: //') ¥
set-option -g status-left "\
#[fg=colour255]#[bg=colour236]\
#S:#I:#P |\
#{ccusage_today_cost} #{ccusage_today_tokens} \
#[fg=blue] #(gcloud config get-value project 2>/dev/null)#[fg=colour255]\
#{artist}: #{track}\
#[fg=colour236]#[bg=colour0]"
set-option -g status-justify centre
set-window-option -g window-status-current-format '\
#[fg=colour239]#[bg=colour234]#[bg=colour239]#[fg=colour119]\
#I#[fg=colour249]:#[fg=colour255]#W\
#[fg=colour239]#[bg=colour234]'
set-option -g status-bg black
set-option -g status-fg white
# rename windows
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
set-option -g default-shell $SHELL
set -g default-command $SHELL
# prefix
set-option -g prefix C-b
# key bind
bind-key r source-file ~/.tmux.conf \; display-message "Reload Config!!"
unbind-key -n Tab
unbind-key Space
set-window-option -g mode-keys vi
# clipboard
set -g default-command "reattach-to-user-namespace $SHELL --login"
# bind-key -T copy-mode-vi v send-keys -X begin-selection
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "win32yank.exe -i"
# bind p run-shell 'win32yank.exe -o | xargs -0 -I{} tmux set-buffer -- {} && tmux paste-buffer'
# enable mouse action
set-option -g mouse on
bind-key -T edit-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T edit-mode-vi WheelDownPane send-keys -X scroll-down
# pane
set -g display-panes-time 10000
# open current directory in new window
bind-key c new-window -c "#{pane_current_path}"
bind-key '"' split-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
# create worktree window (Claude Code + Codex + nvim + dev)
bind-key C-w display-popup -d "#{pane_current_path}" -w 50% -h 20% \
-E "~/.local/bin/cc-worktree-popup"
bind-key P run-shell "tmux popup -d '#{pane_current_path}' -h 50% | exit 0"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run "~/.tmux/plugins/tpm/tpm"