Skip to content

chore: wezterm・ghosttyの設定追加#699

Open
ryo246912 wants to merge 3 commits intomainfrom
feature
Open

chore: wezterm・ghosttyの設定追加#699
ryo246912 wants to merge 3 commits intomainfrom
feature

Conversation

@ryo246912
Copy link
Owner

@ryo246912 ryo246912 commented Mar 20, 2026

Summary by CodeRabbit

リリースノート

  • 新機能

    • Ghostty および WezTerm ターミナルエミュレータの公式サポートを追加しました
    • 複数のターミナルエミュレータに対応した tmux 自動起動機能を実装しました
  • ドキュメント

    • サポート対象のターミナルエミュレータ一覧をドキュメントに更新しました
  • Chores

    • Homebrew パッケージ構成に新規ターミナルエミュレータをインストール対象に追加しました

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

このプルリクエストは、WezTermとGhosttyという2つの新しいターミナルエミュレータのサポートを既存のドットファイル設定に統合することを目的としています。これにより、ユーザーはより多様なターミナル環境を選択できるようになり、各ターミナルがtmuxとシームレスに連携するように設定が調整されています。ドキュメントも更新され、新しいツールの追加が反映されています。

Highlights

  • 新しいターミナルエミュレータの追加: WezTermとGhosttyの構成がドットファイルに追加されました。
  • ドキュメントの更新: CLAUDE.mdとREADME.mdが、新しいターミナルエミュレータのサポートを反映するように更新されました。
  • tmux連携の強化: tmux.confとdot_zshrcが更新され、WezTermとGhosttyでのtmuxの自動アタッチとターミナルオーバーライドがサポートされました。
  • パッケージ管理の統合: Homebrew Cask設定にGhosttyとWezTermが追加され、macOSでのインストールが容易になりました。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Warning

Rate limit exceeded

@ryo246912 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 8 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5b52c69c-037c-467c-905a-21b119a27bc3

📥 Commits

Reviewing files that changed from the base of the PR and between e3c8315 and 3768081.

📒 Files selected for processing (4)
  • .chezmoiignore
  • dot_config/ghostty/config.tmpl
  • dot_config/tmux/tmux.conf
  • dot_config/zsh/dot_zshrc

Walkthrough

GhostyとWezTermのターミナルエミュレータサポートを追加。新規の設定テンプレートファイルを作成し、既存の設定やパッケージインストールスクリプトをこれら対応に更新。ドキュメントも複数ターミナルエミュレータの列記に変更。

Changes

Cohort / File(s) Summary
ドキュメント更新
CLAUDE.md, README.md
複数ターミナルエミュレータ(Alacritty、Ghostty、Rio、WezTerm)への対応を記載。ツール数とテンプレート数を更新。
パッケージマニフェスト
dot_config/brew/brew_cask.json, run_once_install-packages_mac.sh
Homebrew caskマニフェストにghosttywezterm@nightlyを追加。
ターミナルエミュレータ設定
dot_config/ghostty/config.tmpl, dot_config/wezterm/wezterm.lua
Ghosttyおよび WezTerm用の新規設定ファイルを作成。フォント、色、キーバインディング、プラットフォーム固有の設定を定義。
既存設定の統合更新
dot_config/tmux/tmux.conf, dot_config/zsh/dot_zshrc
tmux terminal-overridesに新エミュレータのRGB設定を追加。zshのmux自動起動ロジックを拡張し、複数のTERM値と TERM_PROGRAM値に対応。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • feature #427: パッケージインストールマニフェスト(run_once_install-packages_mac.sh、Homebrewマニフェスト)の変更を共有し、異なるパッケージ追加(本PRではghosty/wezterm casks)。
  • Feature2 #658: dot_config/brew/brew_cask.jsonwezterm@nightly caskの追加/変更で同じマニフェストに重複する変更。

Poem

🐰 新しいターミナルの友達がやってきたよ
Ghostty、WezTerm、みんな仲良く
設定ファイル、キーバインド、色も鮮やかに
rabbit's carrot garden、さらに広がった~ 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは「chore: wezterm・ghosttyの設定追加」で、WezTermとGhosttyという2つの新しいターミナルエミュレータの設定を追加するという主要な変更内容を正確に反映しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable the changed files summary in the walkthrough.

Disable the reviews.changed_files_summary setting to disable the changed files summary in the walkthrough.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

このプルリクエストは、ターミナルエミュレータのweztermghosttyのサポートを追加するもので、関連する設定ファイルやインストールスクリプトが更新されています。全体的に、新しいターミナルの統合はうまく行われているようです。いくつかの設定ファイルについて、可読性や一貫性を向上させるための提案をさせていただきました。ご確認いただければ幸いです。

Comment on lines +58 to +62
keybind = super+w=text:\x02x
keybind = super+x=text:\x02x
keybind = super+shift+w=text:\x02d
keybind = super+z=text:\x02z
keybind = super+shift+z=text:\x02z

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

いくつかのキーバインドに重複が見られます。

  • 58-59行目で、super+wsuper+x が同じアクション (text:\x02x) に設定されています。
  • 61-62行目で、super+zsuper+shift+z が同じアクション (text:\x02z) に設定されています。

他のターミナル設定との一貫性や設定の簡潔さを考慮すると、重複している super+xsuper+shift+z のキーバインドは不要かもしれません。意図しない重複であれば、削除をご検討ください。

Comment on lines +100 to +103
send_string_binding("{", "CMD|SHIFT", "\x02p")
send_string_binding("}", "CMD|SHIFT", "\x02n")
send_string_binding("{", "CMD|SHIFT|OPT", "\x02\x18")
send_string_binding("}", "CMD|SHIFT|OPT", "\x02\x19")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

{} のようなShiftキーを伴う文字を key に指定すると、weztermが暗黙的に SHIFT 修飾子を追加します。そのため、mods にも SHIFT を指定すると冗長になり、可読性が低下する可能性があります。

より明確にするために、ベースとなるキー(例: [)を key に指定し、modsSHIFT を含める形に統一することをお勧めします。

  send_string_binding("[", "CMD|SHIFT", "\x02p")
  send_string_binding("]", "CMD|SHIFT", "\x02n")
  send_string_binding("[", "CMD|SHIFT|OPT", "\x02\x18")
  send_string_binding("]", "CMD|SHIFT|OPT", "\x02\x19")

Comment on lines +6 to +16
case "${TERM:-}" in
alacritty|rio|wezterm|ghostty|xterm-ghostty)
should_auto_attach_tmux=1
;;
esac

case "${TERM_PROGRAM:-}" in
WezTerm|ghostty|Ghostty)
should_auto_attach_tmux=1
;;
esac

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

現在の実装では、$TERM$TERM_PROGRAM をチェックするために2つの case 文が使用されています。これは正常に動作しますが、より簡潔で効率的に記述できます。

最初の case 文で一致しなかった場合にのみ2つ目の case 文を評価するようにネストすることで、可読性と効率を改善できます。

case "${TERM:-}" in
  alacritty|rio|wezterm|ghostty|xterm-ghostty)
    should_auto_attach_tmux=1
    ;;
  *)
    case "${TERM_PROGRAM:-}" in
      WezTerm|ghostty|Ghostty)
        should_auto_attach_tmux=1
        ;;
    esac
    ;;
esac

thock
thebrowsercompany-dia
visual-studio-code
wezterm@nightly

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

ここで wezterm@nightly をインストール対象に追加していますが、このプルリクエストの変更では、バージョン管理用の dot_config/brew/brew_cask.jsonwezterm@nightly が追加されていないようです。

ghostty と同様に、Renovateなどのツールでバージョンを追跡できるよう、brew_cask.json にも wezterm@nightly を追加するのが一貫性の観点から望ましいです。

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
dot_config/wezterm/wezterm.lua (1)

129-131: Ubuntu-20.04のバージョン確認

WSLのデフォルトディストリビューションとしてUbuntu-20.04が指定されていますが、Ubuntu 20.04は2025年4月にEOLを迎えています。より新しいLTSバージョン(例:Ubuntu-24.04)の使用を検討してください。

♻️ 新しいUbuntuバージョンへの更新
 else
-  config.default_prog = { "wsl.exe", "~", "-d", "Ubuntu-20.04" }
+  config.default_prog = { "wsl.exe", "~", "-d", "Ubuntu-24.04" }
 end
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dot_config/wezterm/wezterm.lua` around lines 129 - 131, The config sets
config.default_prog to launch wsl.exe with the hardcoded distribution
"Ubuntu-20.04", which is EOL; update the distro string to a supported LTS (e.g.,
"Ubuntu-24.04") or make it configurable via an environment variable so future
upgrades are easier; specifically modify the config.default_prog entry (and any
place that references "Ubuntu-20.04") to use "Ubuntu-24.04" or
process.env.WSL_DISTRO_NAME with a sensible default.
dot_config/ghostty/config.tmpl (1)

58-62: 重複するキーバインディングの確認

以下のキーバインディングが同じ値にマッピングされています:

  • super+wsuper+xが両方とも\x02x(tmux kill-pane)
  • super+zsuper+shift+zが両方とも\x02z(tmux zoom)

意図的な設定であれば問題ありませんが、super+xsuper+shift+zに別の機能を割り当てることも検討できます。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dot_config/ghostty/config.tmpl` around lines 58 - 62, 設定ファイル内のキーバインディングで
super+w と super+x が両方とも `\x02x` に、また super+z と super+shift+z が両方とも `\x02z`
に割り当てられており(キー行: `keybind = super+w`, `keybind = super+x`, `keybind =
super+shift+w`, `keybind = super+z`, `keybind =
super+shift+z`)、重複が発生しています。意図しない重複なら `super+x` と/または `super+shift+z`
のマッピングを変更して別機能を割り当てるか、重複を削除して片方をコメントアウト/削除してください(例: `super+x` を `\x02...`
の別シーケンスにする、または `super+shift+z` を削除して `super+z`
のみを残す)。確認が必要な場合は、どちらのショートカットを保持するか明示してください。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@dot_config/tmux/tmux.conf`:
- Line 23: tmuxのterminal-overrides行 ("set -ag terminal-overrides
\",alacritty:RGB,rio:Tc,wezterm:RGB,xterm-ghostty:RGB,ghostty:RGB\"") は WezTerm
側の wezterm.lua で config.term = "xterm-256color" が設定されていると wezterm:RGB
オーバーライドが効かないため、ターミナル名の不整合を解消してください。対応策としては tmux.conf の terminal-overrides に
xterm-256color:RGB を追加するか、WezTerm の設定ファイル wezterm.lua の config.term を "wezterm"
に変更して wezterm:RGB オーバーライドが確実に適用されるようにしてください。

In `@dot_config/wezterm/wezterm.lua`:
- Line 21: The TERM detection in your zshrc (the case "${TERM:-}" branch that
checks for "wezterm") is effectively dead because wezterm.lua sets config.term =
"xterm-256color"; either make the values consistent or change detection: update
wezterm.lua's config.term to a value that zshrc expects (e.g., "wezterm") or
modify dot_zshrc to detect wezterm via TERM_PROGRAM (WezTerm) instead of TERM;
locate the symbols config.term in wezterm.lua and the case "${TERM:-}" branch in
dot_zshrc and apply the matching change so the TERM-based branch is reachable.

In `@dot_config/zsh/dot_zshrc`:
- Around line 6-10: The case branch that checks for "wezterm" in the TERM check
is dead code because wezterm.lua sets config.term = "xterm-256color", so $TERM
will never be "wezterm"; update the case block that sets should_auto_attach_tmux
to either remove the "wezterm" token from the pattern
(alacritty|rio|ghostty|xterm-ghostty) or, if you prefer to keep it for clarity,
add a short comment next to "wezterm" explaining that wezterm sets TERM to
xterm-256color via wezterm.lua (and that TERM_PROGRAM-based detection via
TERM_PROGRAM is the authoritative check used elsewhere).

---

Nitpick comments:
In `@dot_config/ghostty/config.tmpl`:
- Around line 58-62: 設定ファイル内のキーバインディングで super+w と super+x が両方とも `\x02x` に、また
super+z と super+shift+z が両方とも `\x02z` に割り当てられており(キー行: `keybind = super+w`,
`keybind = super+x`, `keybind = super+shift+w`, `keybind = super+z`, `keybind =
super+shift+z`)、重複が発生しています。意図しない重複なら `super+x` と/または `super+shift+z`
のマッピングを変更して別機能を割り当てるか、重複を削除して片方をコメントアウト/削除してください(例: `super+x` を `\x02...`
の別シーケンスにする、または `super+shift+z` を削除して `super+z`
のみを残す)。確認が必要な場合は、どちらのショートカットを保持するか明示してください。

In `@dot_config/wezterm/wezterm.lua`:
- Around line 129-131: The config sets config.default_prog to launch wsl.exe
with the hardcoded distribution "Ubuntu-20.04", which is EOL; update the distro
string to a supported LTS (e.g., "Ubuntu-24.04") or make it configurable via an
environment variable so future upgrades are easier; specifically modify the
config.default_prog entry (and any place that references "Ubuntu-20.04") to use
"Ubuntu-24.04" or process.env.WSL_DISTRO_NAME with a sensible default.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ebe5a92d-aee3-476f-b567-1f1b5a30466a

📥 Commits

Reviewing files that changed from the base of the PR and between 79ca0d5 and e3c8315.

📒 Files selected for processing (8)
  • CLAUDE.md
  • README.md
  • dot_config/brew/brew_cask.json
  • dot_config/ghostty/config.tmpl
  • dot_config/tmux/tmux.conf
  • dot_config/wezterm/wezterm.lua
  • dot_config/zsh/dot_zshrc
  • run_once_install-packages_mac.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant