From 2aa176dff59d2ce80f77d760300db0aa6dded975 Mon Sep 17 00:00:00 2001 From: Li Tang Date: Tue, 7 Apr 2026 11:27:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20tmux=20=E5=8F=AF=E4=BB=A5=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=80=89=E6=8B=A9=20panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Li Tang --- .gitignore | 1 + .tmux.conf | 2 ++ setup.sh | 20 ++++++++++++++++++++ tmux/plugins/tpm | 1 - 4 files changed, 23 insertions(+), 1 deletion(-) delete mode 160000 tmux/plugins/tpm diff --git a/.gitignore b/.gitignore index 5e6fc67..7035feb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ nvim/plugin/ nvim/.netrwhist +tmux/plugins/ raycast/extensions raycast/config.json *.env diff --git a/.tmux.conf b/.tmux.conf index a0d88f4..c20a73e 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -68,6 +68,8 @@ bind-key -T copy-mode-vi v send -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy" bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy" +# 单击鼠标左键切换 pane 焦点,不触发 copy mode +bind-key -T root MouseDown1Pane select-pane -t = \; send-keys -M # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.config/tmux/plugins/tpm/tpm' diff --git a/setup.sh b/setup.sh index 4829926..29add60 100755 --- a/setup.sh +++ b/setup.sh @@ -163,6 +163,17 @@ function cmd_init() { print_success "Antigen already installed" fi + # Install tpm (Tmux Plugin Manager) + local tpm_dir="$WORKING_DIR/tmux/plugins/tpm" + if [ -d "$tpm_dir" ]; then + print_success "tpm already installed" + else + print_warning "Installing tpm..." + mkdir -p "$WORKING_DIR/tmux/plugins" + git clone https://github.com/tmux-plugins/tpm "$tpm_dir" + print_success "tpm installed" + fi + # Create necessary directories print_warning "Creating directories..." mkdir -p "$HOME/.config/" @@ -616,6 +627,15 @@ function cmd_check() { missing=$((missing + 1)) fi + # Check tpm + echo -n "tpm: " + if [ -d "$WORKING_DIR/tmux/plugins/tpm" ]; then + print_success "installed" + else + print_error "not found" + missing=$((missing + 1)) + fi + # Check symlinks echo "" echo "Symlinks:" diff --git a/tmux/plugins/tpm b/tmux/plugins/tpm deleted file mode 160000 index b699a7e..0000000 --- a/tmux/plugins/tpm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b699a7e01c253ffb7818b02d62bce24190ec1019