New icon for Linux GTK app that aligns with the Gnome HIG

This adds a new icon for the GTK-based application that adheres (mostly)
to the Gnome Human Interface Guidelines (HIG). The icon is designed to
fit in better with other Gnome applications. 

While there isn't a single standard "native" style amongst Linux
applications, I believe this better fits the general Linux desktop
ecosystem over our macOS icon.

The icon itself is undeniably Ghostty. The core design language is the
same and I don't think ayone will mistake it for anything else. I wanted
to keep the brand the same, but making it fit in better aligns with
Ghostty's goal of being "platform native".
This commit is contained in:
Mitchell Hashimoto
2025-07-23 09:48:01 -07:00
parent df57f17be8
commit b50c1c4fa0
11 changed files with 20 additions and 20 deletions

BIN
images/gnome/1024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

BIN
images/gnome/128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
images/gnome/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

BIN
images/gnome/2048.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 KiB

BIN
images/gnome/256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
images/gnome/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/gnome/512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

BIN
images/gnome/64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -63,8 +63,8 @@ pub const file_inputs = deps: {
var deps: [total][]const u8 = undefined;
var index: usize = 0;
for (icon_sizes) |size| {
deps[index] = std.fmt.comptimePrint("images/icons/icon_{d}.png", .{size});
deps[index + 1] = std.fmt.comptimePrint("images/icons/icon_{d}@2x.png", .{size});
deps[index] = std.fmt.comptimePrint("images/gnome/{d}.png", .{size});
deps[index + 1] = std.fmt.comptimePrint("images/gnome/{d}.png", .{size * 2});
index += 2;
}
for (blueprints) |bp| {
@ -162,7 +162,7 @@ fn genIcons(writer: anytype) !void {
// 1x
{
const alias = std.fmt.comptimePrint("{d}x{d}", .{ size, size });
const source = std.fmt.comptimePrint("images/icons/icon_{d}.png", .{size});
const source = std.fmt.comptimePrint("images/gnome/{d}.png", .{size});
try cwd.access(source, .{});
try writer.print(
\\ <file alias="{s}/apps/{s}.png">{s}</file>
@ -175,7 +175,7 @@ fn genIcons(writer: anytype) !void {
// 2x
{
const alias = std.fmt.comptimePrint("{d}x{d}@2", .{ size, size });
const source = std.fmt.comptimePrint("images/icons/icon_{d}@2x.png", .{size});
const source = std.fmt.comptimePrint("images/gnome/{d}.png", .{size * 2});
try cwd.access(source, .{});
try writer.print(
\\ <file alias="{s}/apps/{s}.png">{s}</file>

View File

@ -17,7 +17,7 @@ const icons = [_]struct {
},
.{
.alias = "16x16@2",
.source = "16@2x",
.source = "32",
},
.{
.alias = "32x32",
@ -25,7 +25,7 @@ const icons = [_]struct {
},
.{
.alias = "32x32@2",
.source = "32@2x",
.source = "64",
},
.{
.alias = "128x128",
@ -33,7 +33,7 @@ const icons = [_]struct {
},
.{
.alias = "128x128@2",
.source = "128@2x",
.source = "256",
},
.{
.alias = "256x256",
@ -41,7 +41,7 @@ const icons = [_]struct {
},
.{
.alias = "256x256@2",
.source = "256@2x",
.source = "512",
},
.{
.alias = "512x512",
@ -116,7 +116,7 @@ pub fn main() !void {
);
for (icons) |icon| {
try writer.print(
" <file alias=\"{s}/apps/com.mitchellh.ghostty.png\">images/icons/icon_{s}.png</file>\n",
" <file alias=\"{s}/apps/com.mitchellh.ghostty.png\">images/gnome/{s}.png</file>\n",
.{ icon.alias, icon.source },
);
}
@ -153,7 +153,7 @@ pub const dependencies = deps: {
index += 1;
}
for (icons) |icon| {
deps[index] = std.fmt.comptimePrint("images/icons/icon_{s}.png", .{icon.source});
deps[index] = std.fmt.comptimePrint("images/gnome/{s}.png", .{icon.source});
index += 1;
}
for (blueprint_files) |blueprint_file| {

View File

@ -360,47 +360,47 @@ fn addLinuxAppResources(
// Various icons that our application can use, including the icon
// that will be used for the desktop.
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_16.png"),
b.path("images/gnome/16.png"),
"share/icons/hicolor/16x16/apps/com.mitchellh.ghostty.png",
).step);
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_32.png"),
b.path("images/gnome/32.png"),
"share/icons/hicolor/32x32/apps/com.mitchellh.ghostty.png",
).step);
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_128.png"),
b.path("images/gnome/128.png"),
"share/icons/hicolor/128x128/apps/com.mitchellh.ghostty.png",
).step);
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_256.png"),
b.path("images/gnome/256.png"),
"share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png",
).step);
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_512.png"),
b.path("images/gnome/512.png"),
"share/icons/hicolor/512x512/apps/com.mitchellh.ghostty.png",
).step);
// Flatpaks only support icons up to 512x512.
if (!cfg.flatpak) {
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_1024.png"),
b.path("images/gnome/1024.png"),
"share/icons/hicolor/1024x1024/apps/com.mitchellh.ghostty.png",
).step);
}
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_16@2x.png"),
b.path("images/gnome/32.png"),
"share/icons/hicolor/16x16@2/apps/com.mitchellh.ghostty.png",
).step);
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_32@2x.png"),
b.path("images/gnome/64.png"),
"share/icons/hicolor/32x32@2/apps/com.mitchellh.ghostty.png",
).step);
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_128@2x.png"),
b.path("images/gnome/256.png"),
"share/icons/hicolor/128x128@2/apps/com.mitchellh.ghostty.png",
).step);
try steps.append(&b.addInstallFile(
b.path("images/icons/icon_256@2x.png"),
b.path("images/gnome/512.png"),
"share/icons/hicolor/256x256@2/apps/com.mitchellh.ghostty.png",
).step);
}