A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
Your own sounds: replace any of Mochi's sounds with a file of your own
Claudeade88451ad1f
diff --git a/NotchBuddy/Sources/App/SettingsView.swift b/NotchBuddy/Sources/App/SettingsView.swiftindex 4c3da479..c7e128ac 100644--- a/NotchBuddy/Sources/App/SettingsView.swift+++ b/NotchBuddy/Sources/App/SettingsView.swift@@ -135,6 +135,7 @@ struct SettingsView: View {@AppStorage("iPhoneInstructionsEnabled") private var iPhoneInstructionsEnabled = false#endif@AppStorage(ClaudeHost.terminalCardsKey) private var terminalCardsEnabled = false+ @State private var customSoundCount = SoundEngine.shared.customized.countprivate var appVersion: String {Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""@@ -288,6 +289,24 @@ struct SettingsView: View {.frame(width: 36, alignment: .trailing).monospacedDigit()}+ HStack(spacing: 8) {+ Button("Open sounds folder") { SoundEngine.shared.revealCustomFolder() }+ Button("Reload sounds") {+ SoundEngine.shared.reload()+ customSoundCount = SoundEngine.shared.customized.count+ SoundEngine.shared.play("pop")+ }+ if customSoundCount > 0 {+ Text(String(format: String(localized: "%lld custom"), Int64(customSoundCount)))+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ }+ }+ .disabled(!state.soundEnabled)+ Text("Drop a file named like one of Mochi's sounds (finish.wav, approval.mp3, greet.m4a…) in the sounds folder to replace it, then Reload.")+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ .fixedSize(horizontal: false, vertical: true)}.padding(6)}diff --git a/NotchBuddy/Sources/App/SoundEngine.swift b/NotchBuddy/Sources/App/SoundEngine.swiftindex b1d08b3e..1794e706 100644--- a/NotchBuddy/Sources/App/SoundEngine.swift+++ b/NotchBuddy/Sources/App/SoundEngine.swift@@ -19,23 +19,72 @@ final class SoundEngine {preload()}+ static let soundNames = ["peek","open","close","hover","blip","slap","annoyed","dizzy","greet",+ "work","finish","error","approval","question","approve","gulp","tick",+ "send","love","pop","proud","wink","yawn","attach","think","search",+ "rate","sleep","greeting"]++ /// Your own sounds: a file named like a built-in sound (e.g. finish.wav, approval.mp3) in this+ /// folder replaces it. ~/Library/Application Support/NotchBuddy/Sounds (in the App Store build,+ /// the same path inside the app's container).+ static var customFolder: URL? {+ FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?+ .appendingPathComponent("NotchBuddy/Sounds", isDirectory: true)+ }+ private static let customExtensions = ["wav", "aiff", "aif", "caf", "m4a", "mp3"]++ /// The custom file for a sound, if the user dropped one in the folder.+ static func customURL(for name: String) -> URL? {+ guard let dir = customFolder else { return nil }+ for ext in customExtensions {+ let url = dir.appendingPathComponent(name).appendingPathExtension(ext)+ if FileManager.default.isReadableFile(atPath: url.path) { return url }+ }+ return nil+ }++ /// Names of the built-in sounds currently replaced by a custom file.+ private(set) var customized: [String] = []+private func preload() {- let names = ["peek","open","close","hover","blip","slap","annoyed","dizzy","greet",- "work","finish","error","approval","question","approve","gulp","tick",- "send","love","pop","proud","wink","yawn","attach","think","search",- "rate","sleep","greeting"]- for name in names {- guard let url = Bundle.main.url(forResource: name, withExtension: "wav", subdirectory: "sounds") else { continue }- var pool: [AVAudioPlayer] = []- for _ in 0..<3 {- if let p = try? AVAudioPlayer(contentsOf: url) {- p.volume = volume- p.prepareToPlay()- pool.append(p)- }+ var pools: [String: [AVAudioPlayer]] = [:]+ var custom: [String] = []+ for name in Self.soundNames {+ let own = Self.customURL(for: name)+ // A custom file that can't be decoded falls back to the built-in sound.+ var pool = own.map { makePool($0) } ?? []+ if pool.isEmpty {+ guard let url = Bundle.main.url(forResource: name, withExtension: "wav", subdirectory: "sounds") else { continue }+ pool = makePool(url)+ } else {+ custom.append(name)}- if !pool.isEmpty { players[name] = pool }+ if !pool.isEmpty { pools[name] = pool }}+ players = pools+ customized = custom+ }++ private func makePool(_ url: URL) -> [AVAudioPlayer] {+ var pool: [AVAudioPlayer] = []+ for _ in 0..<3 {+ if let p = try? AVAudioPlayer(contentsOf: url) {+ p.volume = volume+ p.prepareToPlay()+ pool.append(p)+ }+ }+ return pool+ }++ /// Re-reads the sounds (after the user changed the custom folder).+ func reload() { preload() }++ /// Creates the custom folder if needed and shows it in the Finder.+ func revealCustomFolder() {+ guard let dir = Self.customFolder else { return }+ try? FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true)+ NSWorkspace.shared.activateFileViewerSelecting([dir])}/// Fade out all currently-playing instances of `name` over `duration` seconds,diff --git a/README.md b/README.mdindex 17e26b9a..e9ee0ccd 100644--- a/README.md+++ b/README.md@@ -50,6 +50,7 @@ Meet **Mochi**: a soft little squircle with big eyes that pops out of your notch- 👗 **Dress Mochi up** — right-click him for the wardrobe. He also dresses up for the seasons on his own.- ⌨️ **Keyboard shortcuts** — open the chat, jump to an alert or a terminal, switch pills, mute, send Mochi to the desktop or open the wardrobe from anywhere; all customizable in Settings → Shortcuts.- 🎭 **A real character** — idle breathing, blinks, eyes on a sphere that follow your mouse, emotes, 28 handcrafted sounds, a greeting on launch.+- 🔊 **Your own sounds** *(macOS)* — drop a file named like one of Mochi's sounds (`finish.wav`, `approval.mp3`…) in Settings → General → Sound → **Open sounds folder** to replace it.- 🫥 **Invisible when idle** — hides away when nothing is running, peeks out when you hover the notch (the top edge of the screen on Windows and Linux).- 🖥️ **Any Mac, notch or not** — on an iMac, a Mac mini, or a MacBook with its lid closed on an external display, Mochi sits in a small bar at the top of the screen. With several displays, pick his screen in Settings → General, or let him follow your mouse *(macOS)*.- 📱 **Coucou on iPhone** — your sessions, approvals and services in your pocket, with Live Activities, widgets and Siri. See [Coucou on iPhone](#coucou-on-iphone).