Skip to content

Commit d5487ff

Browse files
Lee Seongjooclaude
andcommitted
App icon + native menu-bar glyphs
- App icon: violet squircle with angle brackets ⟨⟩ around a sound waveform (code → speech). Source SVG kept at Resources/AppIcon.svg; AppIcon.icns carries all sizes 16–1024 incl. retina. Info.plist gains CFBundleIconFile; build.sh copies the icns into the bundle's Resources. - Menu bar: replace the emoji (🔊⏳🔈⏸) with SF Symbol template images that adapt to light/dark menu bars — waveform (idle), ellipsis (synthesizing), speaker.wave.2.fill (playing), pause.fill (paused). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 27cc092 commit d5487ff

5 files changed

Lines changed: 37 additions & 5 deletions

File tree

‎Resources/AppIcon.icns‎

114 KB
Binary file not shown.

‎Resources/AppIcon.svg‎

Lines changed: 20 additions & 0 deletions
Loading

‎Resources/Info.plist‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<string>0.1.0</string>
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
19+
<key>CFBundleIconFile</key>
20+
<string>AppIcon</string>
1921
<key>LSMinimumSystemVersion</key>
2022
<string>13.0</string>
2123

‎Sources/App/AppDelegate.swift‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,18 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
2929

3030
// MARK: - Status item (persistent, focus-safe affordance to reopen the UI)
3131

32+
/// Menu-bar glyph: a monochrome SF Symbol template (adapts to light/dark
33+
/// menu bar), swapped per playback phase.
34+
private func setStatusSymbol(_ name: String) {
35+
let img = NSImage(systemSymbolName: name, accessibilityDescription: "Codebasic TTS")
36+
img?.isTemplate = true
37+
statusItem.button?.image = img
38+
statusItem.button?.title = ""
39+
}
40+
3241
private func setUpStatusItem() {
3342
statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
34-
statusItem.button?.title = "🔊"
43+
setStatusSymbol("waveform")
3544

3645
let menu = NSMenu()
3746
menu.autoenablesItems = false
@@ -68,10 +77,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
6877
.sink { [weak self] phase in
6978
guard let self else { return }
7079
switch phase {
71-
case .idle: self.statusItem.button?.title = "🔊"; self.overlay.hide()
72-
case .synthesizing: self.statusItem.button?.title = "⏳"; self.overlay.show()
73-
case .playing: self.statusItem.button?.title = "🔈"; self.overlay.show()
74-
case .paused: self.statusItem.button?.title = "⏸"; self.overlay.show()
80+
case .idle: self.setStatusSymbol("waveform"); self.overlay.hide()
81+
case .synthesizing: self.setStatusSymbol("ellipsis"); self.overlay.show()
82+
case .playing: self.setStatusSymbol("speaker.wave.2.fill"); self.overlay.show()
83+
case .paused: self.setStatusSymbol("pause.fill"); self.overlay.show()
7584
}
7685
}
7786
.store(in: &cancellables)

‎build.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ build() {
3535
-framework AppKit -framework SwiftUI -framework AVFoundation
3636

3737
cp "$HERE/Resources/Info.plist" "$APP_DIR/Contents/Info.plist"
38+
[ -f "$HERE/Resources/AppIcon.icns" ] && cp "$HERE/Resources/AppIcon.icns" "$RES_DIR/AppIcon.icns"
3839
printf 'APPL????' > "$APP_DIR/Contents/PkgInfo"
3940

4041
echo "==> Ad-hoc code signing"

0 commit comments

Comments
 (0)