Expand ~ in macos-custom-icon (#9024)

Since #8999, `macos-custom-icon` works when its a fully expanded
absolute path like `/Users/username/dir/icon.icns`, but not when it's
abbreviated as `~/dir/icon.icns`. Users were understandably surprised
and confused by this. This PR adds tilde expansion using `NSString`s
built-in property for this.

Also removed a line from the config docs that seemed erroneous. Given
that the option has a functional default, it seems incorrect to say that
it's required.
This commit is contained in:
Mitchell Hashimoto
2025-10-04 07:18:50 -07:00
committed by GitHub
2 changed files with 3 additions and 9 deletions

View File

@@ -2957,9 +2957,6 @@ keybind: Keybinds = .{},
/// Supported formats include PNG, JPEG, and ICNS.
///
/// Defaults to `~/.config/ghostty/Ghostty.icns`
///
/// Note: This configuration is required when `macos-icon` is set to
/// `custom`
@"macos-custom-icon": ?[:0]const u8 = null,
/// The material to use for the frame of the macOS app icon.