Windows host application for the Ghostty terminal emulator.
A WinUI 3 + C++/WinRT shell that hosts the libghostty C API. Each tab owns its own ghostty Surface and DirectX 11 device, rendered into a SwapChainPanel.
- Full terminal emulation via libghostty (VT parser, ConPTY backend)
- PowerShell / cmd.exe / arbitrary shell (
commandconfig option) - Japanese / CJK glyph rendering with system font fallback
- IME input (Japanese, Chinese, Korean) with composition preview
- UTF-16 surrogate pair support (emoji, supplementary planes)
- Auto-close tab when the shell process exits
- Multi-tab UI via WinUI 3
TabView - Per-tab isolation: each tab owns its own ghostty Surface + D3D11 device
- Per-tab SEH guard: a hardware exception in one tab does not take down siblings (fatal cases still trigger a clean process exit)
- New tab / close tab / reorder via standard
TabViewgestures - Custom XAML caption buttons (minimize / maximize / close) that route through
WM_SYSCOMMANDto avoid driver-side state-change crashes
- Keyboard:
WM_CHARtext input plus key-level events for shortcuts - Modifier-aware keybindings (Ctrl / Shift / Alt) forwarded to libghostty
- Mouse: left / middle / right click, drag, scroll wheel
- Selection: drag-to-select, Ctrl+C copy, Ctrl+V paste, right-click copy
- Selection auto-clear after copy
- Ctrl+click: URL highlight detection (see Known Issues)
- Custom title bar with
ExtendsContentIntoTitleBar - Drag region sized to survive many open tabs
- Fullscreen toggle, maximize / restore
- DPI scaling (Per-Monitor DPI Aware V2)
- Mica / Acrylic backdrop (when running as an MSIX package)
- Theme support (config file or
%LOCALAPPDATA%\ghostty\themes\) - Background image (
background-imageconfig) - Background opacity (
background-opacityconfig) - Title bar tint synced with terminal background (
DwmSetWindowAttribute, Windows 11) - Custom ANSI 16-color palette
- Cursor color customization
- DirectX 11 via the libghostty native renderer (no external dependencies)
- FLIP_DISCARD swap chain hosted in a
SwapChainPanel - High-resolution waitable timer for frame pacing (Windows 10 1803+)
SET_TITLE: tab title from terminal escape sequencesMOUSE_SHAPE: cursor changes (text, pointer, hand, resize, etc.)MOUSE_VISIBILITY: hide / show cursorOPEN_URL: open URLs in the default browser (ShellExecuteW)RING_BELL: flash window + system beepCOLOR_CHANGE: sync title bar tint with terminal backgroundTOGGLE_FULLSCREEN/TOGGLE_MAXIMIZESIZE_LIMIT/INITIAL_SIZE/RESET_WINDOW_SIZENEW_TAB/CLOSE_TAB/GOTO_TABQUIT: clean shutdown- Clipboard read / write
- Wakeup: thread-safe
PostMessageto the UI thread
GhosttyWin32App.exe (WinUI 3 / C++/WinRT)
├── App.xaml — application entry, XAML Controls Resources
├── MainWindow
│ ├── Custom title bar + caption buttons
│ ├── TabView
│ │ └── TerminalControl (per tab)
│ │ ├── SwapChainPanel → ghostty Surface
│ │ ├── Input forwarding (key / pointer / IME)
│ │ └── Per-tab D3D11 device + SEH guard
│ └── SetUnhandledExceptionFilter — best-effort cleanup
├── GhosttyApp — ghostty_app_t lifetime wrapper (config, callbacks)
└── Tabs / TabFactory / TabIdAllocator — tab bookkeeping
ghostty.dll (Zig, from i999rri/ghostty windows-port branch)
├── Terminal emulator core (VT parser, Screen)
├── DirectX 11 renderer (HLSL SM5.0, d3d11_impl.c COM wrapper)
├── Font rendering (Freetype + Harfbuzz)
├── ConPTY subprocess management
└── Windows font discovery (registry lookup, %WINDIR%\Fonts)
scoop bucket add ghostty https://github.com/i999rri/scoop-bucket
scoop install ghosttywin32v0.2.x (current latest release): the bucket ships a portable ZIP. No elevation required.
v0.3.0 and later (in development): the bucket will ship a signed MSIX.
Installation imports the signing certificate into
LocalMachine\TrustedPeople and registers the MSIX via Add-AppxPackage,
so scoop install has to run from an elevated PowerShell. See
issue #46 for the
in-flight migration to SignPath Foundation, which will remove the
elevation requirement.
v0.2.x: download GhosttyWin32-v<version>-x64.zip from
Releases and unzip
anywhere.
v0.3.0 and later:
- Download
Ghostty-<version>-x64.msixandGhostty.cerfrom Releases. - Trust the certificate (one-time per machine; Local Machine → Trusted
People store — see docs/INSTALL.md for the exact
wizard choices, since the wrong store choice silently fails with
0x800B0109). - Double-click the
.msixto install.
Subsequent updates only require step 3. Detailed walkthrough and troubleshooting: docs/INSTALL.md.
- Visual Studio 2022 (17.10+) with the "Desktop development with C++" and "Universal Windows Platform development" workloads
- Windows App SDK 1.6+ (installed via the project's NuGet packages)
- Zig 0.15.2+
- Windows SDK 10.0.22621.0+
This requires the forked Ghostty with Windows support patches:
git clone https://github.com/i999rri/ghostty.git
cd ghostty
git switch windows-port
zig build -Doptimize=ReleaseSafe -Drenderer=directxCopy the following into GhosttyWin32App/:
zig-out/lib/ghostty.dllzig-out/lib/ghostty.lib- (
ghostty.his already vendored in the repo)
Open GhosttyWin32.slnx in Visual Studio, select Release | x64, and
build the GhosttyWin32App project. F5 deploys as a packaged MSIX into
the local appx registry; Release | x64 build artifacts land under
x64/Release/GhosttyWin32App/.
Create %LOCALAPPDATA%\ghostty\config:
font-size=15
command=powershell
confirm-close-surface=false
theme=catppuccin-mocha
window-decoration=false
background-opacity=0.85
background-image=C:/Users/you/path/to/image.png
background-image-opacity=0.3
background-image-fit=coverTheme files go in %LOCALAPPDATA%\ghostty\themes\. See the upstream
Ghostty documentation for the full
option list.
- Ctrl+click on a URL exits the process with code 3 (#12) — ghostty-side issue
- Split panes are not yet implemented; only tabs (#13)
- Windows-specific config options (
windows-tab-bar,windows-drag-region) are not exposed yet (#17)
This is an experimental Windows port. See the windows-port branch for Ghostty-side changes and Discussion #2563 for context.
MIT. The libghostty library it embeds is also MIT-licensed.
Claude Code was used to assist with development.