14
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

最近話題のターミナルGhosttyに入門してみた!

14
Posted at

はじめに

ターミナルは何使っていますか??僕はKittyを使っていたんですが、最近Ghosttyが話題になっていたので、使ってみたいと思います!!

Ghosttyとは?

HashiCorpの創業者であるMitchell Hashimoto氏が開発を主導している、GPUアクセラレーションを活用した次世代のターミナルエミュレーターです。「高速な動作」と「リッチな機能」を両立し、かつOSネイティブなUI(MacならSwiftUI)を採用している点が最大の特徴です。

image.png

インストールする

brew install --cask ghostty

試してみる

ターミナルとghosttyで速さを比較する。
1 から 10,000,000(1000万)までを表示し、速度を比較します。

1 から 10,000,000(1000万)までを表示する
time seq 1 10000000

gohstyのベンチマーク.gif

計測項目 既存ターミナル Ghostty 結果
実行完了までの時間 (Real) 11.72秒 7.56秒 約 1.55倍 高速 🚀
CPU処理時間 (User) 3.08秒 2.91秒 ほぼ差なし
システム処理時間 (Sys) 4.30秒 4.35秒 ほぼ差なし

CPUやシステム処理時間はほぼ差がなかったんですが、レンダリングで4秒程の差がつきました!
ghosttyはGPUでレンダリングしているため、レンダリングのオーバーヘッドがほぼなく、高速なんですね!!

ちなみに、僕が普段使っているKitty。Kittyも速いんですが、下記のような結果でした。

順位 ターミナル 実行時間 (Total) 比較 (vs既存) 評価
🥇 Ghostty 7.56秒 1.55倍 速い 👑 最速 (描画負荷ほぼゼロ)
🥈 Kitty 9.35秒 1.25倍 速い 🏎️ 高速 (GPUアクセラレーション)
🥉 既存ターミナル 11.72秒 (基準) 🐢 普通 (CPUレンダリング)

→ちなみに、KittyはOpenGLという規格を利用しているようで、Appleはすでに「非推奨」としています。現在のmacOSでは、OpenGLの命令を受け取ると、OS内部で無理やりMetal(Appleの新しい規格)に翻訳して実行しているため、表示が遅れているようです。

設定のしやすさ

Ghosttyは直感的に設定がしやすいのでいいですね!!僕は下記設定で一旦使っていきます!

# --- 見た目・フォント ---
# フォントサイズ(お好みで調整してください)
font-size = 14
# 行間を少し広げてモダンにする(10%〜20%くらいが人気)
adjust-cell-height = 10%
# フォントファミリー(指定なしでJetBrains Monoになりますが、明示も可能)
# font-family = "JetBrains Mono"

# テーマ(トレンドのCatppuccinを採用。飽きたら "Tokyo Night" もおすすめ)
theme = catppuccin-mocha

# --- ウィンドウ・透明度 ---
# 背景を透過させてブラー(すりガラス効果)を入れる
background-opacity = 0.90
background-blur-radius = 20

# ウィンドウ内の余白を入れて圧迫感を減らす
window-padding-x = 10
window-padding-y = 10
window-padding-balance = true

# --- Macネイティブな挙動 ---
# タイトルバーを透明にしてスッキリさせる
macos-titlebar-style = transparent
# フルスクリーン時にMac標準の挙動にする
macos-window-shadow = true
# 入力中はマウスカーソルを隠す
mouse-hide-while-typing = true

# --- 操作性 ---
# OptionキーをAltとして扱う(Vimなどのショートカット用)
macos-option-as-alt = true
# 選択しただけでクリップボードにコピー
copy-on-select = true
# クリップボードの読み書きを許可
clipboard-read = allow
clipboard-write = allow

# --- キーバインド設定(画面分割スペシャル) ---

# 【重要】Cmd+Enter で「下に」分割
keybind = cmd+enter=new_split:down

# Cmd+Shift+Enter で「右に」分割
keybind = cmd+shift+enter=new_split:right

# Cmd + 矢印キー で分割した画面を「移動」
keybind = cmd+left=goto_split:left
keybind = cmd+right=goto_split:right
keybind = cmd+up=goto_split:top
keybind = cmd+down=goto_split:bottom

# Cmd + Shift + 矢印キー で分割サイズを「調整」
keybind = cmd+shift+left=resize_split:left,20
keybind = cmd+shift+right=resize_split:right,20
keybind = cmd+shift+up=resize_split:up,20
keybind = cmd+shift+down=resize_split:down,20

# Cmd + W で現在の「ペイン(分割)」を閉じる
# (デフォルトだとウィンドウごと閉じてしまうことがあるため、ペインを閉じる設定を優先)
keybind = cmd+w=close_surface

→Kittyの時は、設定が面倒で最低限の設定にしてました。ただ、Ghosttyは楽でいいですね!
ショートカットコマンドも変更できるのがさらに良い!!

image.png

image.png

image.png

→カラーパレットや合字も多彩でいいですね!!

最後に

今回は最近話題のGhosttyを触ってみました!!今までは速さを求めてKittyを使っていたのですが、この機会にGhosttyに乗り換えてみようと思います!!

14
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?