Files
claude-app-builder-4-mac/ghostty-template/dock-icon.patch
T
marcus.hinz 401ddd6f98 Ghostty-per-Projekt-Builder: Template + make/rebuild-Skripte
- ghostty-template/Ghostty.app: lokal gebautes Ghostty v1.3.1 mit DockTilePlugin-Patch
  (eigenes Dock-Icon ueber Contents/Resources/DockIcon.png)
- make-ghostty-app.sh: erzeugt pro Projekt eine App; Slots fuer
  icon/workdir/command/theme/bg/fg/font/font-size
- rebuild-template.sh: baut Template lokal neu (nur Xcode, kein Zig/VM),
  gepinnt auf vendor/libghostty v1.3.1
- ghostty-template/dock-icon.patch: der DockTilePlugin-Patch
- icons/robotunits.png
- enthaelt zudem die vorausgehende MiniTerm/libghostty-Integration
2026-06-24 18:50:53 +02:00

21 lines
944 B
Diff

diff --git a/macos/Sources/Features/Custom App Icon/DockTilePlugin.swift b/macos/Sources/Features/Custom App Icon/DockTilePlugin.swift
index 990cd8b..6cf7031 100644
--- a/macos/Sources/Features/Custom App Icon/DockTilePlugin.swift
+++ b/macos/Sources/Features/Custom App Icon/DockTilePlugin.swift
@@ -51,6 +51,15 @@ class DockTilePlugin: NSObject, NSDockTilePlugIn {
return
}
+ // Custom per-project dock icon: if the enclosing app bundle ships a
+ // Resources/DockIcon.png, use it verbatim and skip the ghost logic.
+ if let appURL = ghosttyAppURL,
+ let img = NSImage(contentsOf: appURL.appendingPathComponent("Contents/Resources/DockIcon.png")) {
+ dockTile.setIcon(img)
+ iconChangeObserver = nil
+ return
+ }
+
// Try to restore the previous icon on launch.
iconDidChange(ghosttyUserDefaults.appIcon, dockTile: dockTile)