diff --git a/CHANGELOG.md b/CHANGELOG.md index a62860e..f74a025 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +--- + +## [0.5.0] - 2026-03-01 + +### Added +- **Kali Linux style starship prompt** (`config/starship.toml`): two-line prompt with `┌──(user@host)─[dir git]` / `└─$` layout; always shows username and hostname; git branch/status, Node/Python/Rust/Go version indicators +- **tmux auto-attach** (`dotfiles/.zshrc.d/tmux.zsh`): attaches to the most recent existing session on shell start, or creates a new one; uses `exec` so closing tmux exits the shell; skips VSCode terminal + ### Fixed - ShellCheck CI: add `# shellcheck shell=bash` directive to all `dotfiles/.zshrc.d/*.zsh` files (SC2148, SC1103) - ShellCheck CI: add `# shellcheck disable=SC1090` for non-constant `source` in `fzf.zsh` (SC1090) @@ -18,6 +26,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Linux CI: make `yazi` cargo build failure non-fatal in `modules/core.sh` - Linux CI: pre-install `yazi` binary from GitHub releases in workflow to avoid `cargo` compile failure +### Maintenance +- `dotfiles/.zshrc`: remove duplicate tmux auto-attach block (superseded by `tmux.zsh`) +- `uninstall.sh`: add `tmux.zsh` to `ZSHRC_D_FILES` so it is removed on uninstall +- `tests/test_configs.sh`: add `tmux.zsh` to `.zshrc.d` file existence check +- `README.md/ja/zh`: fix tmux session description (removed incorrect "named `main`" reference) +- `CLAUDE.md`: add `tmux.zsh` to `.zshrc.d/` structure listing + --- ## [0.4.0] - 2026-03-01 diff --git a/CLAUDE.md b/CLAUDE.md index 84eccec..52e3816 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,7 +15,7 @@ dotfiles/ ├── install_and_configure.sh ← ORIGINAL: monolithic installer (DO NOT MODIFY — CI uses it) ├── modules/ │ ├── lib.sh ← shared helpers (colors, OS detect, pkg_install, backup) -│ ├── core.sh ← existing tools: zsh/tmux/lsd/emacs/htop/neofetch/yazi +│ ├── core.sh ← existing tools: zsh/tmux/lsd/emacs/htop/neofetch/yazi + tmux.zsh │ ├── shell.sh ← starship, fzf, zoxide, atuin │ ├── dev.sh ← gh, ripgrep, direnv, bat, delta, fd, jq, lazygit │ ├── node.sh ← fnm + Node LTS + commitizen @@ -27,6 +27,7 @@ dotfiles/ │ ├── .gitmessage ← conventional commit template │ ├── .zshrc.local.example ← secrets/local config template (copy to ~/.zshrc.local) │ └── .zshrc.d/ +│ ├── tmux.zsh ← auto-attach to tmux session on shell start │ ├── fzf.zsh ← fzf keybindings + rg integration + helpers │ ├── zoxide.zsh ← eval "$(zoxide init zsh)" │ ├── starship.zsh ← eval "$(starship init zsh)" diff --git a/README.ja.md b/README.ja.md index 77d9dd4..2d5733d 100644 --- a/README.ja.md +++ b/README.ja.md @@ -110,7 +110,7 @@ bash bootstrap.sh --list # モジュール一覧表示 |-------|------| | [tmux](https://github.com/tmux/tmux) | ターミナルマルチプレクサ。ログイン時に自動起動し、tmux 終了でシェルも終了 | -新しいターミナルを開くと tmux が自動的に起動し、`main` という名前のセッションにアタッチ(なければ作成)します。tmux を終了するとシェルも終了します。無効にするには `~/.zshrc.d/tmux.zsh` を削除してください。 +新しいターミナルを開くと tmux が自動的に起動し、既存のセッションがあればアタッチし、なければ新しいセッションを作成します。tmux を終了するとシェルも終了します。無効にするには `~/.zshrc.d/tmux.zsh` を削除してください。 ### ファイル管理 diff --git a/README.md b/README.md index 6dcb2cf..7defac9 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ bash bootstrap.sh --list # List modules |------|-------------| | [tmux](https://github.com/tmux/tmux) | Terminal multiplexer. Auto-starts on login; exit tmux to close the shell | -tmux starts automatically when you open a new terminal and attaches to (or creates) a session named `main`. Closing tmux also exits the shell. To disable, remove `~/.zshrc.d/tmux.zsh`. +tmux starts automatically when you open a new terminal and attaches to the most recent existing session, or creates a new one. Closing tmux also exits the shell. To disable, remove `~/.zshrc.d/tmux.zsh`. ### File Management diff --git a/README.zh.md b/README.zh.md index 20e5905..2a70336 100644 --- a/README.zh.md +++ b/README.zh.md @@ -109,7 +109,7 @@ bash bootstrap.sh --list # 列出所有模块 |------|------| | [tmux](https://github.com/tmux/tmux) | 终端复用器。登录时自动启动;退出 tmux 同时退出 Shell | -打开新终端时 tmux 会自动启动,并附加到名为 `main` 的会话(不存在则创建)。关闭 tmux 时 Shell 也会一并退出。如需禁用,请删除 `~/.zshrc.d/tmux.zsh`。 +打开新终端时 tmux 会自动启动,并附加到最近的现有会话(不存在则创建新会话)。关闭 tmux 时 Shell 也会一并退出。如需禁用,请删除 `~/.zshrc.d/tmux.zsh`。 ### 文件管理 diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index ee65ce5..a906ec2 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -162,8 +162,3 @@ if [ -d "$HOME/.zshrc.d" ]; then fi # Load machine-specific / secret config (never committed) [ -f "$HOME/.zshrc.local" ] && . "$HOME/.zshrc.local" - -# tmux auto-attach: attach to 'tmux-dev' session (create if missing) -if command -v tmux &>/dev/null && [ -z "$TMUX" ] && [[ $- == *i* ]]; then - tmux new-session -As tmux-dev -fi diff --git a/tests/test_configs.sh b/tests/test_configs.sh index 9275dd0..995d22a 100644 --- a/tests/test_configs.sh +++ b/tests/test_configs.sh @@ -14,7 +14,7 @@ run_tests() { done # ── .zshrc.d files ────────────────────────────────────────────────────────── - for _f in fzf.zsh zoxide.zsh starship.zsh atuin.zsh direnv.zsh node.zsh docker.zsh commit.zsh; do + for _f in tmux.zsh fzf.zsh zoxide.zsh starship.zsh atuin.zsh direnv.zsh node.zsh docker.zsh commit.zsh; do assert_file_exists ".zshrc.d/${_f}" "${r}/dotfiles/.zshrc.d/${_f}" done diff --git a/uninstall.sh b/uninstall.sh index e15fe64..7ce6855 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -10,6 +10,7 @@ export DOTFILES_ROOT # ── Files we own in ~/.zshrc.d ───────────────────────────────────────────────── ZSHRC_D_FILES=( + tmux.zsh fzf.zsh zoxide.zsh starship.zsh