Ghostty
Ghosttyは高速なターミナルエミュレータで、主にGPU加速によるスムーズな描画が特徴
主な特徴(Perplexity先生調べ)
- GPU(Metal/OpenGL)で高速レンダリングを実現し、大容量ログでも60fpsを維持
- セッション永続化で再起動後もタブやレイアウトを自動復元
- Kittyグラフィックスプロトコル対応でインライン画像表示可能、内蔵マルチプレクサでtmux不要
- ネイティブUI採用でOSとの親和性が高く、シンプルな設定ファイル
導入メリット
- パフォーマンス向上:iTerm2比で高速、特にリサイズやスクロールが滑らかでレスポンス良い
- 軽量・メモリ効率高く、長時間作業で疲れにくい自然なUI
- カスタマイズしやすく、テーマやリガチャ対応で開発効率アップ
導入デメリット
- 成熟度がiTerm2に劣り、細かなGUI調整や長年蓄積された機能が少ない
- 全ての高度機能が揃っているわけではなく、「必要なことだけ高速に」に特化
- 新興のため、稀に安定性や互換性の問題が発生する可能性
まだmacOS版とLinux版しかリリースされていないようで、Windows版のリリースが待ち遠しい
実際に常用しているUbuntu(Gnome)環境にインストールしてみた
Ubuntuだと
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/mkasberg/ghostty-ubuntu/HEAD/install.sh)"
で楽々インストールできた
設定ファイル
~/.config/ghostty/config がGhosttyの設定ファイル
個人的には設定をdotfilesで管理しているので
$ cd dotfiles
$ mkdir -p ~/dotfiles/ghostty/.config/ghostty
$ nano ghostty/.config/ghostty/config
$ stow ghostty
~/dotfiles/ghostty/.config/ghostty/config
#-- 初期ウインドウサイズ
window-width = 100
window-height = 45
#-- フォントを「PlemolJP35 Console NF」にする
font-family = "PlemolJP35 Console NF"
#-- コピペ関連
#-- 右クリックでペースト
right-click-action = "paste"
#-- マウスで選択時にコピー
copy-on-select = "clipboard"
#-- [ctrl]+[shift]と[c]、[v]でコピペ
keybind = ctrl+shift+c=copy_to_clipboard
keybind = ctrl+shift+v=paste_from_clipboard
#-- 確認不要でGhosttyを即クローズ
confirm-close-surface = false
#-- [alt]+[enter]で全画面
keybind = alt+enter=toggle_fullscreen
#-- 見た目
cursor-style-blink = false
mouse-hide-while-typing = true
いい感じだったので標準ターミナルアプリを変更してみた
$ sudo update-alternatives --config x-terminal-emulator
There are 3 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/ghostty 50 auto mode
* 1 /usr/bin/alacritty 20 manual mode
2 /usr/bin/ghostty 50 manual mode
3 /usr/bin/qterminal 40 manual mode
Press <enter> to keep the current choice[*], or type selection number:2
これで[ctrl]+[alt]+[t] で Ghostty が起動するようになりました