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
Mochi feels the Mac, Focus sessions with time per project, screen capture for Claude
Claude732cb30e89d1
diff --git a/NotchBuddy/Resources/Localizable.xcstrings b/NotchBuddy/Resources/Localizable.xcstringsindex c00e58b8..555fc1af 100644--- a/NotchBuddy/Resources/Localizable.xcstrings+++ b/NotchBuddy/Resources/Localizable.xcstrings@@ -1,6 +1,3321 @@{"sourceLanguage" : "en","strings" : {+ "vitals.title" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "موتشي وجهاز Mac"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "মোচি আর আপনার Mac"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi and your Mac"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi y tu Mac"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi et ton Mac"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "मोची और आपका Mac"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi dan Mac-mu"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi e seu Mac"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Мочи и ваш Mac"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi 和你的 Mac"+ }+ }+ }+ },+ "vitals.toggle" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "يتفاعل موتشي مع جهاز Mac"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "মোচি আপনার Mac-এ সাড়া দেয়"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi reacts to your Mac"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi reacciona a tu Mac"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi réagit à ton Mac"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "मोची आपके Mac पर प्रतिक्रिया देता है"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi bereaksi pada Mac-mu"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi reage ao seu Mac"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Мочи реагирует на ваш Mac"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mochi 会对你的 Mac 做出反应"+ }+ }+ }+ },+ "vitals.about" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "يتعرّق عندما يعمل المعالج بأقصى طاقته، ويحمرّ عندما يسخن جهاز Mac، وينتفخ عندما تنقص الذاكرة، ويغفو عندما تضعف البطارية. ضع المؤشر على موتشي لترى السبب. لا تتم القراءة إلا عندما يكون موتشي على الشاشة، ولا يغادر شيء جهازك."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "প্রসেসর পুরো চাপে থাকলে সে ঘামে, Mac গরম হলে লাল হয়ে যায়, মেমরি কম পড়লে ফুলে ওঠে আর ব্যাটারি কম হলে ঘুম পায়। কারণ দেখতে মোচির ওপর পয়েন্টার রাখুন। মোচি স্ক্রিনে থাকলেই শুধু পড়া হয়; কিছুই আপনার Mac ছেড়ে যায় না।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "He sweats when the processor is at full load, flushes when the Mac is hot, puffs up when memory is short and gets sleepy when the battery is low. Point at Mochi to see why. Read only while Mochi is on screen; nothing leaves your Mac."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Suda cuando el procesador va al máximo, se pone rojo cuando el Mac se calienta, se hincha cuando falta memoria y le entra sueño cuando la batería está baja. Señala a Mochi para ver por qué. Solo se lee mientras Mochi está en pantalla; nada sale de tu Mac."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Il transpire quand le processeur est à fond, rougit quand le Mac chauffe, gonfle quand la mémoire manque et s'endort quand la batterie est faible. Pointe Mochi pour voir pourquoi. Lu seulement quand Mochi est à l'écran ; rien ne quitte ton Mac."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "प्रोसेसर पूरी तरह व्यस्त हो तो उसे पसीना आता है, Mac गर्म हो तो वह लाल हो जाता है, मेमोरी कम हो तो फूल जाता है और बैटरी कम हो तो उसे नींद आती है। वजह देखने के लिए मोची पर पॉइंटर रखें। सिर्फ़ तब पढ़ा जाता है जब मोची स्क्रीन पर हो; कुछ भी आपके Mac से बाहर नहीं जाता।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Dia berkeringat saat prosesor bekerja penuh, memerah saat Mac panas, menggembung saat memori kurang, dan mengantuk saat baterai lemah. Arahkan penunjuk ke Mochi untuk melihat alasannya. Hanya dibaca saat Mochi ada di layar; tidak ada yang keluar dari Mac-mu."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ele sua quando o processador está no máximo, fica vermelho quando o Mac esquenta, incha quando falta memória e fica com sono quando a bateria está fraca. Aponte para o Mochi para ver por quê. Só é lido enquanto o Mochi está na tela; nada sai do seu Mac."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Он потеет, когда процессор загружен полностью, краснеет, когда Mac нагревается, раздувается, когда не хватает памяти, и засыпает, когда батарея садится. Наведите на Мочи, чтобы узнать причину. Читается, только пока Мочи на экране; ничего не покидает ваш Mac."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "处理器满载时他会流汗,Mac 发热时他会脸红,内存不足时他会鼓起来,电量低时他会犯困。把指针放到 Mochi 上就能看到原因。仅在 Mochi 显示时读取,所有数据都留在你的 Mac 上。"+ }+ }+ }+ },+ "vitals.hot" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "جهاز Mac ساخن"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "আপনার Mac গরম"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Your Mac is hot"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tu Mac está caliente"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ton Mac chauffe"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "आपका Mac गर्म है"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mac-mu panas"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Seu Mac está quente"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ваш Mac горячий"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "你的 Mac 很热"+ }+ }+ }+ },+ "vitals.warm" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "جهاز Mac دافئ"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "আপনার Mac একটু গরম"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Your Mac is warm"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tu Mac está templado"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ton Mac est tiède"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "आपका Mac गुनगुना है"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mac-mu hangat"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Seu Mac está morno"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ваш Mac тёплый"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "你的 Mac 有点热"+ }+ }+ }+ },+ "vitals.memory-full" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "الذاكرة ممتلئة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "মেমরি ভর্তি"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Memory is full"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Memoria llena"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mémoire pleine"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "मेमोरी भर गई है"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Memori penuh"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Memória cheia"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Память заполнена"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "内存已满"+ }+ }+ }+ },+ "vitals.memory-short" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "الذاكرة قليلة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "মেমরি কম"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Memory is short"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Poca memoria"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mémoire juste"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "मेमोरी कम है"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Memori menipis"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pouca memória"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Мало памяти"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "内存紧张"+ }+ }+ }+ },+ "vitals.battery %lld" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "البطارية %lld %%"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ব্যাটারি %lld %%"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Battery %lld %%"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Batería %lld %%"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Batterie %lld %%"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "बैटरी %lld %%"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Baterai %lld %%"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Bateria %lld %%"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Батарея %lld %%"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "电量 %lld%%"+ }+ }+ }+ },+ "Focus" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "تركيز"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ফোকাস"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Focus"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Enfoque"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Focus"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "फ़ोकस"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Fokus"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Foco"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Фокус"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "专注"+ }+ }+ }+ },+ "hub.notch.focus" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "مؤقت للعمل بتركيز، وموتشي بسماعاته، ووقتك لكل مشروع."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "মনোযোগ দিয়ে কাজের টাইমার, হেডফোন পরা মোচি, আর প্রতিটি প্রজেক্টে আপনার সময়।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A timer for deep work, Mochi with his headphones on, and your time per project."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Un temporizador para concentrarte, Mochi con sus cascos y tu tiempo por proyecto."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Un minuteur pour bosser au calme, Mochi avec son casque, et ton temps par projet."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "गहरे काम के लिए टाइमर, हेडफ़ोन पहने मोची, और हर प्रोजेक्ट पर आपका समय।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Timer untuk kerja fokus, Mochi dengan headphone-nya, dan waktumu per proyek."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Um timer para trabalhar concentrado, o Mochi de fones e o seu tempo por projeto."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Таймер для глубокой работы, Мочи в наушниках и ваше время по проектам."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "专注工作的计时器、戴着耳机的 Mochi,以及你在每个项目上的时间。"+ }+ }+ }+ },+ "focus.stop?" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "إيقاف؟"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "থামাবেন?"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Stop?"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "¿Parar?"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Arrêter ?"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "रोकें?"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Hentikan?"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Parar?"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Остановить?"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "停止?"+ }+ }+ }+ },+ "focus.start-help %lld" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "بدء جلسة تركيز لمدة %lld دقيقة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld মিনিটের ফোকাস সেশন শুরু করুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Start a %lld-minute Focus session"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Empezar una sesión de enfoque de %lld min"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Lancer une session Focus de %lld min"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld मिनट का फ़ोकस सत्र शुरू करें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mulai sesi fokus %lld menit"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Iniciar uma sessão de foco de %lld min"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Начать сеанс фокуса на %lld мин"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "开始 %lld 分钟的专注"+ }+ }+ }+ },+ "focus.stop-help" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "انقر مرتين لإيقاف الجلسة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "সেশন থামাতে দুবার ক্লিক করুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Click twice to stop the session"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Haz clic dos veces para parar la sesión"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Clique deux fois pour arrêter la session"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "सत्र रोकने के लिए दो बार क्लिक करें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Klik dua kali untuk menghentikan sesi"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Clique duas vezes para parar a sessão"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Нажмите дважды, чтобы остановить сеанс"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "点两次停止专注"+ }+ }+ }+ },+ "focus.today" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "اليوم"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "আজ"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Today"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Hoy"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Aujourd'hui"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "आज"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Hari ini"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Hoje"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Сегодня"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "今天"+ }+ }+ }+ },+ "focus.week" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 أيام"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "৭ দিন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 days"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 días"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 jours"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 दिन"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 hari"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 dias"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 дней"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "7 天"+ }+ }+ }+ },+ "focus.about" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "مؤقت في الجزيرة. يضع موتشي سماعاته ويبقى Coucou صامتًا حتى النهاية: لا أصوات، ولا تفتح الجزيرة من تلقاء نفسها. لكن طلب الإذن أو سؤال الوكيل يصل دائمًا."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "আইল্যান্ডে একটি টাইমার। মোচি হেডফোন পরে আর শেষ না হওয়া পর্যন্ত Coucou চুপ থাকে: কোনো শব্দ নেই, আইল্যান্ড নিজে খোলে না। কোনো এজেন্টের অনুমতির অনুরোধ বা প্রশ্ন তবুও আসে।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A timer in the island. Mochi puts his headphones on and Coucou keeps quiet until it ends: no sounds, and the island no longer opens by itself. A permission request or a question from an agent still comes through."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Un temporizador en la isla. Mochi se pone los cascos y Coucou guarda silencio hasta el final: sin sonidos, y la isla ya no se abre sola. Una solicitud de permiso o una pregunta de un agente sigue llegando."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Un minuteur dans l'île. Mochi met son casque et Coucou se tait jusqu'à la fin : pas de sons, et l'île ne s'ouvre plus toute seule. Une demande de permission ou une question d'un agent passe quand même."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "आइलैंड में एक टाइमर। मोची हेडफ़ोन पहन लेता है और खत्म होने तक Coucou चुप रहता है: कोई आवाज़ नहीं, और आइलैंड अपने आप नहीं खुलता। किसी एजेंट का अनुमति अनुरोध या सवाल फिर भी आता है।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Timer di pulau. Mochi memakai headphone dan Coucou diam sampai selesai: tanpa suara, dan pulau tidak terbuka sendiri. Permintaan izin atau pertanyaan dari agen tetap muncul."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Um timer na ilha. O Mochi coloca os fones e o Coucou fica em silêncio até o fim: sem sons, e a ilha não abre mais sozinha. Um pedido de permissão ou uma pergunta de um agente ainda chega."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Таймер в острове. Мочи надевает наушники, и Coucou молчит до конца: без звуков, остров больше не открывается сам. Запрос разрешения или вопрос агента всё равно приходят."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "灵动岛里的计时器。Mochi 戴上耳机,Coucou 保持安静直到结束:没有声音,岛也不再自己打开。代理的权限请求或提问仍会显示。"+ }+ }+ }+ },+ "focus.length" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "الجلسة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "সেশন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Session"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sesión"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Session"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "सत्र"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sesi"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sessão"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Сеанс"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "时长"+ }+ }+ }+ },+ "focus.minutes %lld" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld د"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld মিনিট"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld मिनट"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld mnt"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld мин"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld 分钟"+ }+ }+ }+ },+ "focus.break" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "استراحة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "বিরতি"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Break"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Descanso"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pause"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ब्रेक"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Istirahat"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pausa"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Перерыв"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "休息"+ }+ }+ }+ },+ "focus.no-break" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "بدون استراحة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "বিরতি নেই"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "No break"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sin descanso"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pas de pause"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "कोई ब्रेक नहीं"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tanpa istirahat"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sem pausa"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Без перерыва"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "不休息"+ }+ }+ }+ },+ "focus.start" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "بدء جلسة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "সেশন শুরু করুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Start a session"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Empezar una sesión"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Lancer une session"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "सत्र शुरू करें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mulai sesi"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Iniciar uma sessão"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Начать сеанс"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "开始专注"+ }+ }+ }+ },+ "focus.stop" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "إيقاف"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "থামান"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Stop"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Parar"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Arrêter"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "रोकें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Hentikan"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Parar"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Остановить"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "停止"+ }+ }+ }+ },+ "focus.shortcut-hint %@" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ يبدأ الجلسة أو يوقفها من أي تطبيق."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ যেকোনো অ্যাপ থেকে সেশন শুরু বা বন্ধ করে।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ starts or stops a session from any app."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ empieza o para una sesión desde cualquier app."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ lance ou arrête une session depuis n'importe quelle app."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ किसी भी ऐप से सत्र शुरू या बंद करता है।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ memulai atau menghentikan sesi dari aplikasi mana pun."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ inicia ou para uma sessão em qualquer app."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ запускает или останавливает сеанс из любого приложения."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "在任何应用中按 %@ 即可开始或停止专注。"+ }+ }+ }+ },+ "focus.macos" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "وضع التركيز في macOS"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS ফোকাস"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS Focus"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Concentración de macOS"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Concentration de macOS"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS फ़ोकस"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Fokus macOS"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Foco do macOS"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Фокусирование macOS"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "macOS 专注模式"+ }+ }+ }+ },+ "focus.macos-about" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "لا يستطيع أي تطبيق تشغيل وضع التركيز في macOS بنفسه. أنشئ اختصارين في تطبيق الاختصارات بإجراء «تعيين التركيز» (واحد للتشغيل وآخر للإيقاف) واكتب اسميهما هنا: يشغّلهما Coucou عند بدء الجلسة وانتهائها."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "কোনো অ্যাপ নিজে macOS ফোকাস চালু করতে পারে না। Shortcuts অ্যাপে « Set Focus » অ্যাকশন দিয়ে দুটি শর্টকাট বানান (একটি চালু, একটি বন্ধ) আর তাদের নাম এখানে লিখুন: সেশন শুরু ও শেষে Coucou সেগুলো চালায়।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "An app can't turn on a macOS Focus by itself. Make two shortcuts in the Shortcuts app with the « Set Focus » action (one on, one off) and type their names here: Coucou runs them when a session starts and ends."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Una app no puede activar una Concentración de macOS por sí sola. Crea dos atajos en la app Atajos con la acción «Definir concentración» (uno para activar y otro para desactivar) y escribe sus nombres aquí: Coucou los ejecuta al empezar y al terminar una sesión."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Une app ne peut pas activer une Concentration de macOS toute seule. Crée deux raccourcis dans l'app Raccourcis avec l'action « Définir la concentration » (un pour activer, un pour désactiver) et tape leurs noms ici : Coucou les lance au début et à la fin d'une session."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "कोई ऐप खुद macOS फ़ोकस चालू नहीं कर सकता। Shortcuts ऐप में « Set Focus » ऐक्शन के साथ दो शॉर्टकट बनाएँ (एक चालू, एक बंद) और उनके नाम यहाँ लिखें: सत्र शुरू और खत्म होने पर Coucou उन्हें चलाता है।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Aplikasi tidak bisa menyalakan Fokus macOS sendiri. Buat dua pintasan di app Pintasan dengan tindakan « Atur Fokus » (satu menyalakan, satu mematikan) dan ketik namanya di sini: Coucou menjalankannya saat sesi mulai dan selesai."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Um app não consegue ativar um Foco do macOS sozinho. Crie dois atalhos no app Atalhos com a ação «Definir Foco» (um para ativar, outro para desativar) e digite os nomes aqui: o Coucou os executa no início e no fim de uma sessão."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Приложение не может само включить режим фокусирования macOS. Создайте две быстрые команды в приложении «Быстрые команды» с действием «Задать фокусирование» (включить и выключить) и введите их названия здесь: Coucou запустит их в начале и в конце сеанса."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "应用无法自行打开 macOS 的专注模式。在“快捷指令”App 中用“设定专注模式”操作创建两个快捷指令(一个打开,一个关闭),并在这里输入它们的名称:Coucou 会在专注开始和结束时运行它们。"+ }+ }+ }+ },+ "focus.shortcut-on" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "عند البدء"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "শুরু হলে"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "When it starts"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Al empezar"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Au début"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "शुरू होने पर"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Saat mulai"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ao iniciar"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "При начале"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "开始时"+ }+ }+ }+ },+ "focus.shortcut-off" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "عند الانتهاء"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "শেষ হলে"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "When it ends"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Al terminar"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "À la fin"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "खत्म होने पर"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Saat selesai"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ao terminar"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "При окончании"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "结束时"+ }+ }+ }+ },+ "focus.shortcut-placeholder" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "اسم الاختصار"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "শর্টকাটের নাম"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Shortcut name"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nombre del atajo"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nom du raccourci"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "शॉर्टकट का नाम"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nama pintasan"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nome do atalho"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Название команды"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "快捷指令名称"+ }+ }+ }+ },+ "focus.open-shortcuts" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "فتح الاختصارات"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Shortcuts খুলুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Open Shortcuts"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Abrir Atajos"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ouvrir Raccourcis"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Shortcuts खोलें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Buka Pintasan"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Abrir Atalhos"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Открыть «Быстрые команды»"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "打开快捷指令"+ }+ }+ }+ },+ "focus.projects" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "الوقت لكل مشروع"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "প্রতিটি প্রজেক্টে সময়"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Time per project"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tiempo por proyecto"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Temps par projet"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "हर प्रोजेक्ट पर समय"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Waktu per proyek"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tempo por projeto"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Время по проектам"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "每个项目的时间"+ }+ }+ }+ },+ "focus.track" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "احسب وقتي لكل مشروع"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "প্রতিটি প্রজেক্টে আমার সময় গুনুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Count my time per project"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Contar mi tiempo por proyecto"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Compter mon temps par projet"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "हर प्रोजेक्ट पर मेरा समय गिनें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Hitung waktuku per proyek"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Contar meu tempo por projeto"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Считать моё время по проектам"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "统计我在每个项目上的时间"+ }+ }+ }+ },+ "focus.track-about" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "عندما يكون محرر برمجة (VS Code وCursor وXcode وZed…) أو طرفية جلسة وكيل في المقدمة، يُحسب الوقت لمشروعه. لا يُحسب الوقت بعيدًا عن لوحة المفاتيح. يبقى على جهازك لمدة 90 يومًا."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "কোড এডিটর (VS Code, Cursor, Xcode, Zed…) বা কোনো এজেন্ট সেশনের টার্মিনাল সামনে থাকলে সময় তার প্রজেক্টে যোগ হয়। কিবোর্ড থেকে দূরে থাকার সময় গোনা হয় না। আপনার Mac-এ থাকে, ৯০ দিন।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "While a code editor (VS Code, Cursor, Xcode, Zed…) or the terminal of an agent session is in front, its project gets the time. Time away from the keyboard does not count. Stays on your Mac, kept 90 days."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mientras un editor de código (VS Code, Cursor, Xcode, Zed…) o el terminal de una sesión de agente está delante, su proyecto suma el tiempo. El tiempo lejos del teclado no cuenta. Se queda en tu Mac, 90 días."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tant qu'un éditeur de code (VS Code, Cursor, Xcode, Zed…) ou le terminal d'une session d'agent est au premier plan, son projet compte le temps. Le temps loin du clavier ne compte pas. Reste sur ton Mac, gardé 90 jours."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "जब कोई कोड एडिटर (VS Code, Cursor, Xcode, Zed…) या किसी एजेंट सत्र का टर्मिनल सामने हो, तो समय उसके प्रोजेक्ट में जुड़ता है। कीबोर्ड से दूर बिताया समय नहीं गिना जाता। आपके Mac पर रहता है, 90 दिन तक।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Selama editor kode (VS Code, Cursor, Xcode, Zed…) atau terminal sesi agen ada di depan, waktunya dihitung untuk proyeknya. Waktu jauh dari keyboard tidak dihitung. Tetap di Mac-mu, disimpan 90 hari."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Enquanto um editor de código (VS Code, Cursor, Xcode, Zed…) ou o terminal de uma sessão de agente está na frente, o projeto dele conta o tempo. O tempo longe do teclado não conta. Fica no seu Mac, por 90 dias."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Пока впереди редактор кода (VS Code, Cursor, Xcode, Zed…) или терминал сеанса агента, время идёт его проекту. Время без клавиатуры не считается. Хранится на вашем Mac 90 дней."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "当代码编辑器(VS Code、Cursor、Xcode、Zed…)或代理会话的终端在最前面时,时间计入它的项目。离开键盘的时间不计算。保存在你的 Mac 上,保留 90 天。"+ }+ }+ }+ },+ "focus.done-today %lld" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "الجلسات المكتملة اليوم: %lld"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "আজ শেষ হওয়া সেশন: %lld"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sessions finished today: %lld"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sesiones terminadas hoy: %lld"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sessions terminées aujourd'hui : %lld"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "आज पूरे हुए सत्र: %lld"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sesi selesai hari ini: %lld"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sessões concluídas hoje: %lld"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Сеансов сегодня: %lld"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "今天完成的专注:%lld"+ }+ }+ }+ },+ "focus.left %@" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "متبقٍ %@"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ বাকি"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ left"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Quedan %@"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Encore %@"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ बाकी"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sisa %@"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Faltam %@"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Осталось %@"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "还剩 %@"+ }+ }+ }+ },+ "focus.break-left %@" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "استراحة، متبقٍ %@"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "বিরতি, %@ বাকি"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Break, %@ left"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Descanso, quedan %@"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pause, encore %@"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ब्रेक, %@ बाकी"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Istirahat, sisa %@"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pausa, faltam %@"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Перерыв, осталось %@"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "休息中,还剩 %@"+ }+ }+ }+ },+ "focus.no-time" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "لا شيء بعد."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "এখনো কিছু নেই।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nothing yet."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nada todavía."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Rien pour l'instant."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "अभी कुछ नहीं।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Belum ada."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nada ainda."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Пока ничего."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "暂无记录。"+ }+ }+ }+ },+ "focus.min %lld" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld د"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld মিনিট"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld मिनट"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld mnt"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld min"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld мин"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld 分钟"+ }+ }+ }+ },+ "focus.hours %lld %lld" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld س %02lld"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld ঘ %02lld"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld h %02lld"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld h %02lld"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld h %02lld"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld घं %02lld"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld j %02lld"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld h %02lld"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld ч %02lld"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%lld 小时 %02lld"+ }+ }+ }+ },+ "shortcut.focus" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "بدء جلسة تركيز أو إيقافها"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ফোকাস সেশন শুরু বা বন্ধ করুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Start or stop a Focus session"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Empezar o parar una sesión de enfoque"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Lancer ou arrêter une session Focus"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "फ़ोकस सत्र शुरू या बंद करें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mulai atau hentikan sesi fokus"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Iniciar ou parar uma sessão de foco"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Начать или остановить сеанс фокуса"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "开始或停止专注"+ }+ }+ }+ },+ "shortcut.capture" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "التقاط الشاشة لـ Claude"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Claude-এর জন্য স্ক্রিন ক্যাপচার"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capture the screen for Claude"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capturar la pantalla para Claude"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capturer l'écran pour Claude"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Claude के लिए स्क्रीन कैप्चर करें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tangkap layar untuk Claude"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capturar a tela para o Claude"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Снимок экрана для Claude"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "为 Claude 截取屏幕"+ }+ }+ }+ },+ "capture.permission" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "اسمح لـ Coucou في إعدادات النظام ← الخصوصية والأمن ← تسجيل الشاشة، ثم التقط مرة أخرى."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "System Settings → Privacy & Security → Screen Recording-এ Coucou-কে অনুমতি দিন, তারপর আবার ক্যাপচার করুন।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Allow Coucou in System Settings → Privacy & Security → Screen Recording, then capture again."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Permite Coucou en Ajustes del Sistema → Privacidad y seguridad → Grabación de pantalla y vuelve a capturar."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Autorise Coucou dans Réglages Système → Confidentialité et sécurité → Enregistrement de l'écran, puis capture à nouveau."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "System Settings → Privacy & Security → Screen Recording में Coucou को अनुमति दें, फिर दोबारा कैप्चर करें।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Izinkan Coucou di Pengaturan Sistem → Privasi & Keamanan → Rekaman Layar, lalu tangkap lagi."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Permita o Coucou em Ajustes do Sistema → Privacidade e Segurança → Gravação da Tela e capture de novo."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Разрешите Coucou в Системных настройках → Конфиденциальность и безопасность → Запись экрана и сделайте снимок снова."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "请在“系统设置 → 隐私与安全性 → 录屏”中允许 Coucou,然后再截一次。"+ }+ }+ }+ },+ "capture.copied" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "الالتقاط في الحافظة: اضغط ⌘V حيث تريده."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ক্যাপচার ক্লিপবোর্ডে আছে: যেখানে চান সেখানে ⌘V চাপুন।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "The capture is on the clipboard: press ⌘V where you want it."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "La captura está en el portapapeles: pulsa ⌘V donde la quieras."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "La capture est dans le presse-papiers : fais ⌘V où tu la veux."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "कैप्चर क्लिपबोर्ड पर है: जहाँ चाहिए वहाँ ⌘V दबाएँ।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tangkapan ada di papan klip: tekan ⌘V di tempat yang kamu mau."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "A captura está na área de transferência: pressione ⌘V onde quiser."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Снимок в буфере обмена: нажмите ⌘V там, где он нужен."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "截图已在剪贴板上:在需要的地方按 ⌘V。"+ }+ }+ }+ },+ "capture.name" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "لقطة شاشة"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "স্ক্রিনশট"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Screenshot"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Captura de pantalla"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capture d'écran"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "स्क्रीनशॉट"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tangkapan layar"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Captura de tela"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Снимок экрана"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "截图"+ }+ }+ }+ },+ "capture.annotate" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "تعليق"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "টীকা"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Annotate"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Anotar"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Annoter"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "एनोटेट"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Anotasi"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Anotar"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Пометить"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "标注"+ }+ }+ }+ },+ "capture.done" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "تم"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "হয়েছে"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Done"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Listo"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "OK"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "हो गया"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Selesai"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "OK"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Готово"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "完成"+ }+ }+ }+ },+ "capture.ready" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "تم الالتقاط. موتشي ابتلعه."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ক্যাপচার হয়েছে। মোচির কাছে আছে।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Captured. Mochi has it."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capturado. Mochi lo tiene."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capturé. Mochi l'a avalé."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "कैप्चर हो गया। मोची के पास है।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tertangkap. Mochi menyimpannya."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Capturado. O Mochi pegou."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Готово. Мочи проглотил снимок."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "截好了,Mochi 吞下了它。"+ }+ }+ }+ },+ "capture.paste" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "لصق"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "পেস্ট"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Paste"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pegar"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coller"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "पेस्ट"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tempel"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Colar"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Вставить"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "粘贴"+ }+ }+ }+ },+ "capture.copy" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "نسخ"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "কপি"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Copy"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Copiar"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Copier"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "कॉपी"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Salin"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Copiar"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Копировать"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "复制"+ }+ }+ }+ },+ "capture.ask" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "اسأل Claude"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Claude-কে জিজ্ঞেস করুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ask Claude"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Preguntar a Claude"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Demander à Claude"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Claude से पूछें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tanya Claude"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Perguntar ao Claude"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Спросить Claude"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "问 Claude"+ }+ }+ }+ },+ "capture.flow-hint %@" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "اضغط مطولًا على %@ وتحدث: تذهب الصورة وكلماتك معًا."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ চেপে ধরে বলুন: ছবি আর আপনার কথা একসাথে যাবে।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Hold %@ and talk: the image and your words go in together."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mantén %@ y habla: la imagen y tus palabras van juntas."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Maintiens %@ et parle : l'image et tes mots partent ensemble."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ दबाकर बोलें: तस्वीर और आपके शब्द साथ जाएँगे।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tahan %@ dan bicara: gambar dan kata-katamu masuk bersama."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Segure %@ e fale: a imagem e suas palavras vão juntas."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Удерживайте %@ и говорите: снимок и слова уйдут вместе."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "按住 %@ 说话:图片和你的话会一起发出。"+ }+ }+ }+ },+ "capture.hint" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "الصقه في طلبك أو علّق عليه أو اسأل Claude."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "প্রম্পটে পেস্ট করুন, টীকা দিন বা Claude-কে জিজ্ঞেস করুন।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Paste it into your prompt, annotate it, or ask Claude."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Pégala en tu prompt, anótala o pregunta a Claude."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Colle-la dans ton prompt, annote-la ou demande à Claude."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "इसे अपने प्रॉम्प्ट में पेस्ट करें, एनोटेट करें या Claude से पूछें।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tempel ke prompt-mu, beri anotasi, atau tanya Claude."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Cole no seu prompt, anote ou pergunte ao Claude."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Вставьте в промпт, пометьте или спросите Claude."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "粘贴到提示词中、标注它,或问 Claude。"+ }+ }+ }+ }," %@" : {},diff --git a/NotchBuddy/Sources/App/AppDelegate.swift b/NotchBuddy/Sources/App/AppDelegate.swiftindex a12ed8ce..49609160 100644--- a/NotchBuddy/Sources/App/AppDelegate.swift+++ b/NotchBuddy/Sources/App/AppDelegate.swift@@ -13,6 +13,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {#endifDemoEngine.shared.stop()HotKeyCenter.shared.unregisterAll()+ ProjectTime.shared.flush()}func applicationDidFinishLaunching(_ notification: Notification) {@@ -28,6 +29,8 @@ final class AppDelegate: NSObject, NSApplicationDelegate {#endifsetupMenuBarItem()setupIsland()+ MachineVitals.shared.start()+ ProjectTime.shared.start()#if !APPSTORE// Opened by hand (Finder, Dock, Spotlight): the Coucou window shows. Not at login.if FlowHubController.openAtLaunch && !FlowHubController.launchedAtLogin() {diff --git a/NotchBuddy/Sources/App/BotCanvasView.swift b/NotchBuddy/Sources/App/BotCanvasView.swiftindex 1a40bf2c..0cc9a59f 100644--- a/NotchBuddy/Sources/App/BotCanvasView.swift+++ b/NotchBuddy/Sources/App/BotCanvasView.swift@@ -28,6 +28,9 @@ struct BotCanvasView: View {engine.lookX = look.xengine.lookY = look.yengine.particleOverhang = particleOverhang+ // How the Mac feels, and the Focus headphones (MochiMood.swift).+ engine.moodTarget = MachineVitals.shared.mood+ engine.headphonesTarget = FocusSession.shared.phase == .focus ? 1 : 0// Widen slot when file is hovering over the mailbox (morph > 0.5)// Open mouth (hover=0.20R) when file dragged over box; close when notif engine.morph > 0.3 {diff --git a/NotchBuddy/Sources/App/CaptureCardView.swift b/NotchBuddy/Sources/App/CaptureCardView.swiftnew file mode 100644index 00000000..8a62676c--- /dev/null+++ b/NotchBuddy/Sources/App/CaptureCardView.swift@@ -0,0 +1,54 @@+#if !APPSTORE+import SwiftUI++/// The island after ⌃⌥X: Mochi on the left (he just swallowed the capture), the image, and what+/// to do with it. With Flow on, holding its key sends the image and your words together.+struct CaptureCardView: View {+ @ObservedObject private var capture = ScreenCapture.shared+ @ObservedObject private var flow = FlowDictation.shared++ var body: some View {+ ZStack(alignment: .leading) {+ CardBackground(wash: nil)+ HStack(alignment: .center, spacing: 14) {+ thumbnail+ VStack(alignment: .leading, spacing: 7) {+ Text("capture.ready")+ .font(.system(size: 14, weight: .semibold))+ Text(verbatim: hint)+ .font(.system(size: 12))+ .foregroundColor(Color(hex: "#9398A1"))+ .lineLimit(1)+ .truncationMode(.tail)+ HStack(spacing: 7) {+ PrimaryButton(verbatim: String(localized: "capture.paste")) { capture.pasteIntoPrompt() }+ SecondaryButton(verbatim: String(localized: "capture.copy")) { capture.copy() }+ SecondaryButton(verbatim: String(localized: "capture.annotate")) { capture.annotate() }+ SecondaryButton(verbatim: String(localized: "capture.ask")) { capture.askClaude() }+ }+ }+ }+ .padding(.leading, 98)+ .padding(.trailing, 16)+ }+ }++ @ViewBuilder private var thumbnail: some View {+ if let image = capture.image {+ Image(nsImage: image)+ .resizable()+ .aspectRatio(contentMode: .fill)+ .frame(width: 104, height: 72)+ .clipShape(RoundedRectangle(cornerRadius: 9, style: .continuous))+ .overlay(RoundedRectangle(cornerRadius: 9, style: .continuous).stroke(Color.white.opacity(0.14), lineWidth: 1))+ }+ }++ /// "Hold fn and talk: the image and your words go in together." when Flow is on.+ private var hint: String {+ flow.isEnabled+ ? String(format: String(localized: "capture.flow-hint %@"), flow.key.label)+ : String(localized: "capture.hint")+ }+}+#endifdiff --git a/NotchBuddy/Sources/App/DesktopMochi.swift b/NotchBuddy/Sources/App/DesktopMochi.swiftindex 3dbc0096..e795dcbc 100644--- a/NotchBuddy/Sources/App/DesktopMochi.swift+++ b/NotchBuddy/Sources/App/DesktopMochi.swift@@ -36,6 +36,8 @@ struct DesktopBotView: View {// Eye tracking based on the panel's own screen positionengine.lookX = tanh((appState.mousePosition.x - viewState.lookOrigin.x) / 260)engine.lookY = -tanh((appState.mousePosition.y - viewState.lookOrigin.y) / 200)+ engine.moodTarget = MachineVitals.shared.mood+ engine.headphonesTarget = FocusSession.shared.phase == .focus ? 1 : 0// Desktop Mochi is always the "main" Mochi — always dressedengine.setOutfit(appState.resolvedOutfit, animated: true)diff --git a/NotchBuddy/Sources/App/FlowDictation.swift b/NotchBuddy/Sources/App/FlowDictation.swiftindex 3a23a59d..bcc3efd8 100644--- a/NotchBuddy/Sources/App/FlowDictation.swift+++ b/NotchBuddy/Sources/App/FlowDictation.swift@@ -363,6 +363,8 @@ final class FlowDictation: ObservableObject {let latest = self.current === listenif latest { self.current = nil }guard !text.isEmpty else { if latest { self.pill.rest() }; return }+ // A capture waiting on the island (⌃⌥X): the image goes in first, then the words.+ _ = await ScreenCapture.shared.pasteForDictation()let result = FlowPaste.insert(text)if latest { self.pill.rest() }switch result {diff --git a/NotchBuddy/Sources/App/FlowHub.swift b/NotchBuddy/Sources/App/FlowHub.swiftindex 99ae08d1..42c9a2f2 100644--- a/NotchBuddy/Sources/App/FlowHub.swift+++ b/NotchBuddy/Sources/App/FlowHub.swift@@ -6,12 +6,12 @@ import SwiftUI/// The pages of the Coucou window: Flow (the dictation, the Notetaker) and the notch's settings.enum HubPage: String, CaseIterable, Identifiable {case dictation, notes, insights, dictionary, snippets, styles, settings- case general, pills, agents, chat, integrations, voice, shortcuts+ case general, pills, agents, chat, integrations, voice, focus, shortcutsvar id: String { rawValue }static let flowPages: [HubPage] = [.dictation, .notes, .insights, .dictionary, .snippets, .styles, .settings]- static let notchPages: [HubPage] = [.general, .pills, .agents, .chat, .integrations, .voice, .shortcuts]+ static let notchPages: [HubPage] = [.general, .pills, .agents, .chat, .integrations, .voice, .focus, .shortcuts]/// The section of Settings this page shows, for the notch's pages.var settingsSection: String? {@@ -22,6 +22,7 @@ enum HubPage: String, CaseIterable, Identifiable {case .chat: return "chat"case .integrations: return "integrations"case .voice: return "voice"+ case .focus: return "focus"case .shortcuts: return "shortcuts"default: return nil}@@ -40,6 +41,7 @@ enum HubPage: String, CaseIterable, Identifiable {case .chat: return String(localized: "Chat")case .integrations: return String(localized: "Integrations")case .voice: return String(localized: "Voice")+ case .focus: return String(localized: "Focus")case .shortcuts: return String(localized: "Shortcuts")case .dictation: return String(localized: "hub.page.dictation")case .notes: return String(localized: "hub.page.notes")@@ -66,6 +68,7 @@ enum HubPage: String, CaseIterable, Identifiable {case .chat: return "bubble.left.and.bubble.right"case .integrations: return "puzzlepiece.extension"case .voice: return "waveform"+ case .focus: return "headphones"case .shortcuts: return "keyboard"}}@@ -117,6 +120,7 @@ extension HubPage {case .chat: return String(localized: "hub.notch.chat")case .integrations: return String(localized: "hub.notch.integrations")case .voice: return String(localized: "hub.notch.voice")+ case .focus: return String(localized: "hub.notch.focus")case .shortcuts: return String(localized: "hub.notch.shortcuts")default: return nil}diff --git a/NotchBuddy/Sources/App/FlowHubMochis.swift b/NotchBuddy/Sources/App/FlowHubMochis.swiftindex 09cb13d6..f2be419c 100644--- a/NotchBuddy/Sources/App/FlowHubMochis.swift+++ b/NotchBuddy/Sources/App/FlowHubMochis.swift@@ -262,6 +262,8 @@ struct HubHeroTheme {return .init(color: Color(hex: "#7C5CFF"), cast: [m("#7C5CFF", 54, 0.15), m("#22D3EE", 46, 0.55), m("#F7B32B", 42, 0.95)])case .voice:return .init(color: Color(hex: "#F97316"), cast: [m("#F97316", 60, 0.3), m("#F5F6F8", 48, 0.85, outfit: .roundGlasses)])+ case .focus:+ return .init(color: Color(hex: "#A78BFA"), cast: [m("#A78BFA", 58, 0.25, state: .working, roams: false), m("#F5F6F8", 46, 0.8, state: .sleeping, roams: false)])case .shortcuts:return .init(color: Color(hex: "#6366F1"), cast: [m("#6366F1", 56, 0.2, outfit: .sunglasses), m("#F5F6F8", 46, 0.8)])}diff --git a/NotchBuddy/Sources/App/FocusSession.swift b/NotchBuddy/Sources/App/FocusSession.swiftnew file mode 100644index 00000000..a08beed9--- /dev/null+++ b/NotchBuddy/Sources/App/FocusSession.swift@@ -0,0 +1,174 @@+import AppKit+import Foundation++/// A Focus session: a timer in the island (25 minutes by default), Mochi with his headphones on,+/// and Coucou keeping quiet until it ends. A permission request or a question from an agent still+/// comes through: an agent must never wait on a timer. Then a short break, and back to normal.+///+/// One timer for the end of the session, nothing ticking in between: the island draws the time+/// left only while it is on screen.+@MainActor+final class FocusSession: ObservableObject {+ static let shared = FocusSession()++ enum Phase: Equatable { case off, focus, rest }++ @Published private(set) var phase: Phase = .off+ /// When the session (or the break) ends.+ @Published private(set) var endsAt: Date? = nil+ /// Alerts held back during the session (finished or failed turns).+ @Published private(set) var held = 0++ @Published var minutes: Int {+ didSet { UserDefaults.standard.set(minutes, forKey: Self.minutesKey) }+ }+ @Published var breakMinutes: Int {+ didSet { UserDefaults.standard.set(breakMinutes, forKey: Self.breakKey) }+ }+ /// Shortcuts (the macOS app) run when a session starts and ends, to turn a Focus of macOS on+ /// and off: an app can't do that by itself. Empty: none.+ @Published var shortcutOn: String {+ didSet { UserDefaults.standard.set(shortcutOn, forKey: Self.shortcutOnKey) }+ }+ @Published var shortcutOff: String {+ didSet { UserDefaults.standard.set(shortcutOff, forKey: Self.shortcutOffKey) }+ }++ static let minutesKey = "focusMinutes"+ static let breakKey = "focusBreakMinutes"+ static let shortcutOnKey = "focusShortcutOn"+ static let shortcutOffKey = "focusShortcutOff"+ private static let doneKey = "focusDoneByDay"++ /// The sounds that still play during a session: what an agent waiting on you makes.+ static let soundsDuringFocus: Set<String> = ["approval", "question", "approve"]++ private var work: DispatchWorkItem?++ private init() {+ let ud = UserDefaults.standard+ minutes = max(1, ud.object(forKey: Self.minutesKey) as? Int ?? 25)+ breakMinutes = max(0, ud.object(forKey: Self.breakKey) as? Int ?? 5)+ shortcutOn = ud.string(forKey: Self.shortcutOnKey) ?? ""+ shortcutOff = ud.string(forKey: Self.shortcutOffKey) ?? ""+ }++ /// Coucou keeps quiet: no sounds, the island no longer opens by itself.+ var isQuiet: Bool { phase == .focus }++ // MARK: - Starting and stopping++ func start(minutes requested: Int? = nil) {+ let length = min(240, max(1, requested ?? minutes))+ SoundEngine.shared.play("tick")+ NotificationCenter.default.post(name: .triggerEmote, object: BotEmote.happy)+ phase = .focus+ held = 0+ let end = Date().addingTimeInterval(TimeInterval(length * 60))+ endsAt = end+ schedule(at: end) { [weak self] in self?.finishFocus() }+ runShortcut(shortcutOn)+ }++ /// Ends the session or the break now.+ func stop() {+ work?.cancel()+ work = nil+ if phase == .focus { runShortcut(shortcutOff) }+ phase = .off+ endsAt = nil+ SoundEngine.shared.play("close")+ }++ /// The island's Focus button: start, or stop what is running.+ func toggle() {+ if phase == .off { start() } else { stop() }+ }++ /// An alert that would have opened the island, kept for the end of the session.+ func noteHeld() { held += 1 }++ private func finishFocus() {+ runShortcut(shortcutOff)+ countDone()+ if breakMinutes > 0 {+ phase = .rest+ let end = Date().addingTimeInterval(TimeInterval(breakMinutes * 60))+ endsAt = end+ schedule(at: end) { [weak self] in self?.finishBreak() }+ } else {+ phase = .off+ endsAt = nil+ }+ SoundEngine.shared.play("finish")+ NotificationCenter.default.post(name: .triggerEmote, object: BotEmote.proud)+ NotificationCenter.default.post(name: .hookReveal, object: nil)+ }++ private func finishBreak() {+ phase = .off+ endsAt = nil+ held = 0+ SoundEngine.shared.play("pop")+ NotificationCenter.default.post(name: .triggerEmote, object: BotEmote.wink)+ NotificationCenter.default.post(name: .hookReveal, object: nil)+ }++ private func schedule(at date: Date, _ action: @escaping @MainActor () -> Void) {+ work?.cancel()+ let item = DispatchWorkItem { MainActor.assumeIsolated { action() } }+ work = item+ DispatchQueue.main.asyncAfter(deadline: .now() + max(0, date.timeIntervalSinceNow), execute: item)+ }++ // MARK: - Reading it++ /// "18:42": the time left, rounded up to the second.+ func remainingText(at now: Date) -> String {+ guard let end = endsAt else { return "" }+ let left = max(0, Int(end.timeIntervalSince(now).rounded(.up)))+ return Self.clock(left)+ }++ /// 0…1: how much of the session or break is done.+ func progress(at now: Date) -> Double {+ guard let end = endsAt else { return 0 }+ let total = Double((phase == .rest ? breakMinutes : minutes) * 60)+ guard total > 0 else { return 0 }+ return min(1, max(0, 1 - end.timeIntervalSince(now) / total))+ }++ static func clock(_ seconds: Int) -> String {+ let h = seconds / 3600, m = (seconds % 3600) / 60, s = seconds % 60+ return h > 0 ? String(format: "%d:%02d:%02d", h, m, s) : String(format: "%d:%02d", m, s)+ }++ /// Sessions finished today.+ var doneToday: Int {+ let byDay = UserDefaults.standard.dictionary(forKey: Self.doneKey) as? [String: Int] ?? [:]+ return byDay[ProjectTime.dayKey(Date())] ?? 0+ }++ private func countDone() {+ var byDay = UserDefaults.standard.dictionary(forKey: Self.doneKey) as? [String: Int] ?? [:]+ let today = ProjectTime.dayKey(Date())+ byDay = byDay.filter { $0.key >= ProjectTime.dayKey(Date().addingTimeInterval(-30 * 86400)) }+ byDay[today, default: 0] += 1+ UserDefaults.standard.set(byDay, forKey: Self.doneKey)+ }++ // MARK: - macOS Focus through Shortcuts++ private func runShortcut(_ name: String) {+ #if !APPSTORE+ let trimmed = name.trimmingCharacters(in: .whitespacesAndNewlines)+ guard !trimmed.isEmpty else { return }+ let task = Process()+ task.executableURL = URL(fileURLWithPath: "/usr/bin/shortcuts")+ task.arguments = ["run", trimmed]+ task.standardOutput = FileHandle.nullDevice+ task.standardError = FileHandle.nullDevice+ do { try task.run() } catch { appendAppLog("nb.log", "[Focus] shortcut \(trimmed) failed: \(error)") }+ #endif+ }+}diff --git a/NotchBuddy/Sources/App/FocusSettingsView.swift b/NotchBuddy/Sources/App/FocusSettingsView.swiftnew file mode 100644index 00000000..52f04e90--- /dev/null+++ b/NotchBuddy/Sources/App/FocusSettingsView.swift@@ -0,0 +1,172 @@+import SwiftUI++/// Settings → Focus: the session's length, macOS Focus through Shortcuts, and the time spent+/// on each project.+struct FocusSettingsView: View {+ @ObservedObject private var focus = FocusSession.shared+ @ObservedObject private var time = ProjectTime.shared+ @State private var period: Period = .today++ enum Period: String, CaseIterable, Identifiable {+ case today, week+ var id: String { rawValue }+ var label: String {+ self == .today ? String(localized: "focus.today") : String(localized: "focus.week")+ }+ var start: Date {+ let today = Calendar.current.startOfDay(for: Date())+ return self == .today ? today : (Calendar.current.date(byAdding: .day, value: -6, to: today) ?? today)+ }+ }++ var body: some View {+ GroupBox(String(localized: "Focus")) {+ VStack(alignment: .leading, spacing: 10) {+ Text("focus.about")+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ .fixedSize(horizontal: false, vertical: true)+ HStack(spacing: 8) {+ Text("focus.length")+ Stepper(value: $focus.minutes, in: 5...180, step: 5) {+ Text(String(format: String(localized: "focus.minutes %lld"), focus.minutes))+ .monospacedDigit()+ }+ .fixedSize()+ }+ HStack(spacing: 8) {+ Text("focus.break")+ Stepper(value: $focus.breakMinutes, in: 0...30) {+ Text(focus.breakMinutes == 0 ? String(localized: "focus.no-break")+ : String(format: String(localized: "focus.minutes %lld"), focus.breakMinutes))+ .monospacedDigit()+ }+ .fixedSize()+ }+ HStack(spacing: 10) {+ Button(focus.phase == .off ? String(localized: "focus.start") : String(localized: "focus.stop")) {+ focus.toggle()+ }+ .buttonStyle(.borderedProminent)+ TimelineView(.periodic(from: .now, by: 1)) { timeline in+ Text(verbatim: status(at: timeline.date))+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ .monospacedDigit()+ }+ }+ Text(String(format: String(localized: "focus.shortcut-hint %@"),+ ShortcutLogic.displayString(for: ShortcutLogic.hotKey(for: .focusToggle))))+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ }+ .padding(6)+ }++ #if !APPSTORE+ GroupBox(String(localized: "focus.macos")) {+ VStack(alignment: .leading, spacing: 10) {+ Text("focus.macos-about")+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ .fixedSize(horizontal: false, vertical: true)+ HStack(spacing: 8) {+ Text("focus.shortcut-on")+ .frame(width: 120, alignment: .leading)+ TextField(String(localized: "focus.shortcut-placeholder"), text: $focus.shortcutOn)+ .textFieldStyle(.roundedBorder)+ .frame(maxWidth: 260)+ }+ HStack(spacing: 8) {+ Text("focus.shortcut-off")+ .frame(width: 120, alignment: .leading)+ TextField(String(localized: "focus.shortcut-placeholder"), text: $focus.shortcutOff)+ .textFieldStyle(.roundedBorder)+ .frame(maxWidth: 260)+ }+ Button(String(localized: "focus.open-shortcuts")) {+ if let url = URL(string: "shortcuts://") { NSWorkspace.shared.open(url) }+ }+ }+ .padding(6)+ }+ #endif++ GroupBox(String(localized: "focus.projects")) {+ VStack(alignment: .leading, spacing: 10) {+ Toggle(String(localized: "focus.track"), isOn: Binding(get: { time.enabled }, set: { time.enabled = $0 }))+ Text("focus.track-about")+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ .fixedSize(horizontal: false, vertical: true)+ if time.enabled {+ Picker("", selection: $period) {+ ForEach(Period.allCases) { Text($0.label).tag($0) }+ }+ .pickerStyle(.segmented)+ .labelsHidden()+ .fixedSize()+ ProjectTimeBars(rows: time.totals(since: period.start))+ Button(String(localized: "Clear history")) { time.clear() }+ }+ }+ .padding(6)+ }+ }++ private func status(at now: Date) -> String {+ switch focus.phase {+ case .off:+ return String(format: String(localized: "focus.done-today %lld"), focus.doneToday)+ case .focus:+ return String(format: String(localized: "focus.left %@"), focus.remainingText(at: now))+ case .rest:+ return String(format: String(localized: "focus.break-left %@"), focus.remainingText(at: now))+ }+ }+}++/// The projects you spent the most time on, with a bar each.+private struct ProjectTimeBars: View {+ let rows: [(project: String, seconds: Double)]++ var body: some View {+ let top = Array(rows.prefix(8))+ let most = max(1, top.first?.seconds ?? 1)+ if top.isEmpty {+ Text("focus.no-time")+ .font(.system(size: 12))+ .foregroundColor(.secondary)+ }+ ForEach(top, id: \.project) { row in+ VStack(alignment: .leading, spacing: 4) {+ HStack {+ Text(verbatim: row.project)+ .font(.system(size: 12, weight: .medium))+ .lineLimit(1)+ Spacer()+ Text(verbatim: Self.duration(row.seconds))+ .font(.system(size: 12))+ .foregroundColor(.secondary)+ .monospacedDigit()+ }+ GeometryReader { geo in+ ZStack(alignment: .leading) {+ Capsule().fill(Color.primary.opacity(0.08))+ Capsule().fill(Color(hex: "#A78BFA"))+ .frame(width: max(4, geo.size.width * row.seconds / most))+ }+ }+ .frame(height: 6)+ }+ .frame(maxWidth: 420)+ }+ }++ /// "3 h 12" or "18 min".+ static func duration(_ seconds: Double) -> String {+ let minutes = Int((seconds / 60).rounded())+ if minutes < 60 { return String(format: String(localized: "focus.min %lld"), minutes) }+ return String(format: String(localized: "focus.hours %lld %lld"), minutes / 60, minutes % 60)+ }+}diff --git a/NotchBuddy/Sources/App/HookServer.swift b/NotchBuddy/Sources/App/HookServer.swiftindex 3d6c37b0..3841430f 100644--- a/NotchBuddy/Sources/App/HookServer.swift+++ b/NotchBuddy/Sources/App/HookServer.swift@@ -708,6 +708,11 @@ final class HookServer: @unchecked Sendable {@MainActorprivate func expandIfNeeded(to view: IslandView) {let state = AppState.shared+ // Focus session: only a permission request or a question opens the island.+ if FocusSession.shared.isQuiet && view != .approval && view != .question {+ if view == .finished || view == .error { FocusSession.shared.noteHeld() }+ return+ }let isAlert: Boolswitch view {case .approval, .question, .finished, .error, .confused: isAlert = truediff --git a/NotchBuddy/Sources/App/IslandFocusViews.swift b/NotchBuddy/Sources/App/IslandFocusViews.swiftnew file mode 100644index 00000000..ccfc2d0a--- /dev/null+++ b/NotchBuddy/Sources/App/IslandFocusViews.swift@@ -0,0 +1,145 @@+import SwiftUI++// MARK: - How the Mac is doing (under the island)++/// A small line under the island while the pointer is on Mochi, when the Mac makes him react:+/// "CPU 94 % · node, Google Chrome", "Your Mac is hot", "Battery 14 %".+struct VitalsHoverLine: View {+ let islandW: CGFloat+ let islandH: CGFloat+ @ObservedObject private var vitals = MachineVitals.shared++ var body: some View {+ let show = vitals.hovered && vitals.summary != nil+ ZStack {+ if show, let text = vitals.summary {+ HStack(spacing: 6) {+ Circle()+ .fill(dotColor)+ .frame(width: 6, height: 6)+ Text(verbatim: text)+ .font(.system(size: 11, weight: .semibold))+ .foregroundColor(Color(hex: "#E1E3E6"))+ .lineLimit(1)+ .fixedSize()+ }+ .padding(.horizontal, 10)+ .padding(.vertical, 5)+ .background(Capsule().fill(Color.black.opacity(0.92)))+ .overlay(Capsule().stroke(Color.white.opacity(0.12), lineWidth: 1))+ .transition(.opacity.combined(with: .offset(y: -4)))+ }+ }+ .animation(.easeOut(duration: 0.18), value: show)+ .position(x: islandW / 2, y: islandH + 18)+ .allowsHitTesting(false)+ }++ private var dotColor: Color {+ let m = vitals.mood+ if m.hot > 0 { return Color(hex: "#FF6B4A") }+ if m.busy > 0 { return Color(hex: "#3B9EFF") }+ if m.full > 0 { return Color(hex: "#A78BFA") }+ return Color(hex: "#F5A524")+ }+}++// MARK: - Focus in the compact island++/// The compact island's right side: the time left of a Focus session (or its break) in place+/// of the small Mochis of the pills.+struct CompactFocusOrGrid: View {+ @ObservedObject var state: AppState+ let islandW: CGFloat+ let islandH: CGFloat+ @ObservedObject private var focus = FocusSession.shared++ var body: some View {+ if focus.phase == .off {+ CompactMiniGrid(state: state)+ .scaleEffect(IslandRestingLayout(width: islandW, height: islandH).miniGridScale)+ .position(x: islandW - 40, y: islandH / 2)+ .transition(.opacity)+ } else {+ TimelineView(.periodic(from: .now, by: 1)) { timeline in+ Text(verbatim: focus.remainingText(at: timeline.date))+ .font(.system(size: 11, weight: .semibold, design: .rounded))+ .monospacedDigit()+ .foregroundColor(FocusColors.tint(focus.phase))+ .fixedSize()+ }+ .position(x: islandW - 38, y: islandH / 2)+ .transition(.opacity)+ }+ }+}++enum FocusColors {+ /// Violet during a session, green during the break.+ static func base(_ phase: FocusSession.Phase) -> Color {+ phase == .rest ? Color(hex: "#34D399") : Color(hex: "#A78BFA")+ }+ static func tint(_ phase: FocusSession.Phase) -> Color {+ phase == .rest ? Color(hex: "#6EE7B7") : Color(hex: "#C4B5FD")+ }+}++// MARK: - Focus in the island's header++/// The header's timer: a click starts a Focus session; while it runs, the time left, and a click+/// asks "Stop?" (a second click stops it).+struct FocusHeaderButton: View {+ @ObservedObject private var focus = FocusSession.shared+ @State private var hovered = false+ @State private var confirmStop = false++ var body: some View {+ Button(action: tap) {+ if focus.phase == .off {+ Image(systemName: "timer")+ .font(.system(size: 14))+ .foregroundColor(hovered ? Color(hex: "#F5F6F8") : Color(hex: "#8E939C"))+ } else {+ TimelineView(.periodic(from: .now, by: 1)) { timeline in+ let color = FocusColors.base(focus.phase)+ HStack(spacing: 4) {+ Image(systemName: focus.phase == .focus ? "headphones" : "cup.and.saucer.fill")+ .font(.system(size: 9, weight: .bold))+ Text(verbatim: confirmStop ? String(localized: "focus.stop?")+ : focus.remainingText(at: timeline.date))+ .font(.system(size: 10, weight: .semibold))+ .monospacedDigit()+ .fixedSize()+ }+ .foregroundColor(FocusColors.tint(focus.phase))+ .padding(.horizontal, 8)+ .padding(.vertical, 4)+ .background(Capsule().fill(color.opacity(hovered || confirmStop ? 0.26 : 0.16)))+ .overlay(Capsule().stroke(color.opacity(0.55), lineWidth: 1))+ }+ }+ }+ .buttonStyle(.plain)+ .onHover { hovered = $0 }+ .help(focus.phase == .off+ ? String(format: String(localized: "focus.start-help %lld"), focus.minutes)+ : String(localized: "focus.stop-help"))+ }++ private func tap() {+ if focus.phase == .off {+ focus.start()+ return+ }+ if confirmStop {+ focus.stop()+ confirmStop = false+ } else {+ confirmStop = true+ Task { @MainActor in+ try? await Task.sleep(for: .seconds(3))+ confirmStop = false+ }+ }+ }+}diff --git a/NotchBuddy/Sources/App/IslandRootView.swift b/NotchBuddy/Sources/App/IslandRootView.swiftindex ffe8c2cf..3a12fdc8 100644--- a/NotchBuddy/Sources/App/IslandRootView.swift+++ b/NotchBuddy/Sources/App/IslandRootView.swift@@ -107,6 +107,9 @@ struct IslandContainer: View {CountdownBar(state: state, islandW: islandWidth)+ // Under the island while the pointer is on Mochi: how the Mac is doing.+ VitalsHoverLine(islandW: islandWidth, islandH: islandHeight)+if demoEngine.isActive {Text(verbatim: "DEMO").font(.system(size: 8, weight: .bold, design: .monospaced))@@ -122,10 +125,8 @@ struct IslandContainer: View {Group {if state.mode == .compact {- CompactMiniGrid(state: state)- .scaleEffect(IslandRestingLayout(width: islandWidth, height: islandHeight).miniGridScale)- .position(x: islandWidth - 40, y: islandHeight / 2)- .transition(.opacity)+ // A Focus session shows its time left in place of the pills.+ CompactFocusOrGrid(state: state, islandW: islandWidth, islandH: islandHeight)}}.animation(.easeInOut(duration: 0.25), value: state.mode == .compact)@@ -560,6 +561,9 @@ struct IslandHeader: View {}#endifHStack(spacing: 14) {+ // Focus: start a session, or the time left of the one running.+ FocusHeaderButton()+Button(action: {withAnimation(.spring(response: 0.3, dampingFraction: 0.8)) {state.view = .settingsdiff --git a/NotchBuddy/Sources/App/IslandStateMachine.swift b/NotchBuddy/Sources/App/IslandStateMachine.swiftindex 762e01c3..e1bc6bbf 100644--- a/NotchBuddy/Sources/App/IslandStateMachine.swift+++ b/NotchBuddy/Sources/App/IslandStateMachine.swift@@ -20,6 +20,9 @@ final class IslandStateMachine {/// When non-nil and returns true, timers and mouse-leave never auto-collapse or hide the island.var isHeldOpen: (() -> Bool)?+ /// When non-nil and returns true, the compact island does not hide by itself (a Focus+ /// session shows its timer there).+ var keepsPetit: (() -> Bool)?/// home → petit delay (seconds), kept in sync with the auto-close preference.var homeToPetitDelay: TimeInterval = 15 {@@ -206,7 +209,8 @@ final class IslandStateMachine {private func schedulePetitHide() {petitHideWork?.cancel()let item = DispatchWorkItem { [weak self] in- guard let self, self.state == .petit, !(self.isHeldOpen?() ?? false) else { return }+ guard let self, self.state == .petit, !(self.isHeldOpen?() ?? false),+ !(self.keepsPetit?() ?? false) else { return }self.transition(to: .hidden)}petitHideWork = itemdiff --git a/NotchBuddy/Sources/App/IslandViewContent.swift b/NotchBuddy/Sources/App/IslandViewContent.swiftindex d62e1c99..2a7652e6 100644--- a/NotchBuddy/Sources/App/IslandViewContent.swift+++ b/NotchBuddy/Sources/App/IslandViewContent.swift@@ -39,6 +39,12 @@ struct IslandViewContent: View {#elseEmptyView()#endif+ case .capture:+ #if !APPSTORE+ CaptureCardView()+ #else+ EmptyView()+ #endif}}}diff --git a/NotchBuddy/Sources/App/IslandWindowController.swift b/NotchBuddy/Sources/App/IslandWindowController.swiftindex 9cf3f68d..798877ea 100644--- a/NotchBuddy/Sources/App/IslandWindowController.swift+++ b/NotchBuddy/Sources/App/IslandWindowController.swift@@ -15,6 +15,7 @@ final class IslandWindowController: NSWindowController {private var frameTimer: Timer?private var keyMonitor: Any?private var viewSubscription: AnyCancellable?+ private var focusSubscription: AnyCancellable?private var displaySubscription: AnyCancellable?private var autoCloseSubscription: AnyCancellable?private var openOnHoverSubscription: AnyCancellable?@@ -327,6 +328,20 @@ final class IslandWindowController: NSWindowController {// An approval, or an email prepared by voice, stays open until I click.fsm.isHeldOpen = { AppState.shared.pendingApproval != nil || AppState.shared.voiceMailDraft != nil }+ // A Focus session keeps the compact island (and its timer) on screen until it ends.+ fsm.keepsPetit = { FocusSession.shared.phase != .off }+ focusSubscription = FocusSession.shared.$phase+ .removeDuplicates()+ .receive(on: DispatchQueue.main)+ .sink { [weak self] phase in+ guard let self else { return }+ if phase != .off {+ self.fsm.reveal()+ } else if self.fsm.state == .petit && !self.wasInIsland {+ self.fsm.mouseLeft()+ }+ }+// Voice: wake phrase detected → open listening island#if !APPSTORENotificationCenter.default.addObserver(@@ -488,6 +503,9 @@ final class IslandWindowController: NSWindowController {if overBot && !botHovering { botHoverIn(mousePos: NSEvent.mouseLocation) }if !overBot && botHovering { botHoverOut() }botHovering = overBot+ // The pointer on Mochi (or on the resting island): the line about the Mac shows under it.+ let vitalsHover = (state.mode == .compact && inIsland) || overBot+ if MachineVitals.shared.hovered != vitalsHover { MachineVitals.shared.hovered = vitalsHover }if botHovering {let m = NSEvent.mouseLocationlet dist = hypot(m.x - botHoverStartPos.x, m.y - botHoverStartPos.y)@@ -709,6 +727,14 @@ final class IslandWindowController: NSWindowController {VoiceSpeaker.shared.stop()VoiceEngine.shared.startListeningDirectly()#endif++ case .focusToggle:+ FocusSession.shared.toggle()++ case .captureScreen:+ #if !APPSTORE+ ScreenCapture.shared.begin()+ #endif}}@@ -863,13 +889,13 @@ final class IslandWindowController: NSWindowController {// Hook server compact reveal (non-alert work events: session start, tool use, etc.)NotificationCenter.default.addObserver(forName: .hookReveal, object: nil, queue: .main) { [weak self] _ in- guard let self else { return }+ guard let self, !FocusSession.shared.isQuiet else { return }self.fsm.reveal()}// Music started playing: reveal silently (no peek sound)NotificationCenter.default.addObserver(forName: .musicReveal, object: nil, queue: .main) { [weak self] _ in- guard let self else { return }+ guard let self, !FocusSession.shared.isQuiet else { return }self.silentNextReveal = trueself.fsm.reveal()self.silentNextReveal = falsediff --git a/NotchBuddy/Sources/App/MachineVitals.swift b/NotchBuddy/Sources/App/MachineVitals.swiftnew file mode 100644index 00000000..928e95e2--- /dev/null+++ b/NotchBuddy/Sources/App/MachineVitals.swift@@ -0,0 +1,234 @@+import AppKit+import Combine+import Darwin+import IOKit.ps++/// How the Mac is doing, as Mochi shows it: a busy processor makes him sweat, a warm Mac+/// flushes him, short memory puffs him up, a low battery makes him tired, then asleep.+///+/// It only reads while Mochi is on screen (the island showing, or Mochi on the desktop), every+/// few seconds: a hidden island costs nothing. Everything stays on the Mac.+@MainActor+final class MachineVitals: ObservableObject {+ static let shared = MachineVitals()++ static let enabledKey = "mochiFeelsTheMac"++ /// What Mochi shows, read by his canvases every frame.+ @Published private(set) var mood = MochiMood.calm+ /// The line shown under the island while the pointer is on Mochi ("CPU 94 % · node, Chrome").+ @Published private(set) var summary: String? = nil+ /// The pointer is on Mochi (set by the island's poll).+ @Published var hovered = false++ /// Off in Settings → General: Mochi no longer reacts to the Mac.+ var enabled: Bool {+ get { UserDefaults.standard.object(forKey: Self.enabledKey) as? Bool ?? true }+ set {+ UserDefaults.standard.set(newValue, forKey: Self.enabledKey)+ objectWillChange.send()+ refreshRunning()+ }+ }++ private var timer: Timer?+ private var subscriptions: Set<AnyCancellable> = []+ private var memoryPressure: DispatchSourceMemoryPressure?+ private var memoryLevel: CGFloat = 0+ private var lastTicks: (busy: UInt64, total: UInt64)?+ private var cpu: Double = 0+ private var busySamples = 0+ private var lastProcessTimes: [pid_t: UInt64] = [:]+ private var topProcesses: [String] = []+ private var battery: (percent: Int, onPower: Bool)? = nil++ private init() {}++ /// Starts following whether Mochi is on screen. Called once at launch.+ func start() {+ let state = AppState.shared+ state.$mode.removeDuplicates().sink { [weak self] _ in+ Task { @MainActor in self?.refreshRunning() }+ }.store(in: &subscriptions)+ state.$mochiOnDesktop.removeDuplicates().sink { [weak self] _ in+ Task { @MainActor in self?.refreshRunning() }+ }.store(in: &subscriptions)+ NotificationCenter.default.publisher(for: ProcessInfo.thermalStateDidChangeNotification)+ .sink { [weak self] _ in Task { @MainActor in self?.sample() } }+ .store(in: &subscriptions)+ refreshRunning()+ }++ private var onScreen: Bool {+ AppState.shared.mode != .hidden || AppState.shared.mochiOnDesktop+ }++ private func refreshRunning() {+ let run = enabled && onScreen+ if run, timer == nil {+ lastTicks = nil+ lastProcessTimes = [:]+ watchMemory()+ sample()+ let t = Timer(timeInterval: 3, repeats: true) { [weak self] _ in+ Task { @MainActor in self?.sample() }+ }+ t.tolerance = 1+ RunLoop.main.add(t, forMode: .common)+ timer = t+ } else if !run, timer != nil {+ timer?.invalidate()+ timer = nil+ memoryPressure?.cancel()+ memoryPressure = nil+ if !enabled { mood = .calm; summary = nil }+ }+ }++ // MARK: - Reading the Mac++ private func sample() {+ guard enabled else { return }+ if let ticks = Self.cpuTicks() {+ if let last = lastTicks, ticks.total > last.total {+ cpu = Double(ticks.busy - last.busy) / Double(ticks.total - last.total)+ }+ lastTicks = ticks+ }+ // Two readings in a row above 80 %: a short spike does not make him sweat.+ busySamples = cpu >= 0.8 ? busySamples + 1 : 0+ let wasLow = (battery?.onPower == false) && (battery?.percent ?? 100) < 20+ battery = Self.readBattery()+ let isLow = (battery?.onPower == false) && (battery?.percent ?? 100) < 20+ if wasLow && !isLow && battery?.onPower == true {+ // Plugged in while tired: he wakes up.+ NotificationCenter.default.post(name: .triggerEmote, object: BotEmote.happy)+ SoundEngine.shared.play("pop")+ }+ if busySamples >= 2 { topProcesses = topProcessNames() } else { lastProcessTimes = [:]; topProcesses = [] }++ var next = MochiMood()+ next.busy = busySamples >= 2 ? CGFloat(min(1, (cpu - 0.6) / 0.3)) : 0+ switch ProcessInfo.processInfo.thermalState {+ case .fair: next.hot = 0.4+ case .serious: next.hot = 0.8+ case .critical: next.hot = 1+ default: next.hot = 0+ }+ next.full = memoryLevel+ if let b = battery, !b.onPower {+ next.tired = b.percent < 20 ? 1 : 0+ next.asleep = b.percent < 10+ }+ if next != mood { mood = next }+ let line = Self.describe(next, cpu: cpu, battery: battery, top: topProcesses)+ if line != summary { summary = line }+ }++ private func watchMemory() {+ guard memoryPressure == nil else { return }+ let source = DispatchSource.makeMemoryPressureSource(eventMask: [.normal, .warning, .critical], queue: .main)+ source.setEventHandler { [weak self] in+ MainActor.assumeIsolated {+ guard let self, let event = self.memoryPressure?.data else { return }+ self.memoryLevel = event.contains(.critical) ? 1 : (event.contains(.warning) ? 0.6 : 0)+ self.sample()+ }+ }+ source.resume()+ memoryPressure = source+ }++ /// The words under the island, the most telling first.+ static func describe(_ mood: MochiMood, cpu: Double, battery: (percent: Int, onPower: Bool)?, top: [String]) -> String? {+ var parts: [String] = []+ if mood.busy > 0 {+ let pct = Int((cpu * 100).rounded())+ parts.append(top.isEmpty ? "CPU \(pct) %" : "CPU \(pct) % · \(top.prefix(2).joined(separator: ", "))")+ }+ if mood.hot >= 0.8 { parts.append(String(localized: "vitals.hot")) }+ else if mood.hot > 0 { parts.append(String(localized: "vitals.warm")) }+ if mood.full >= 1 { parts.append(String(localized: "vitals.memory-full")) }+ else if mood.full > 0 { parts.append(String(localized: "vitals.memory-short")) }+ if let b = battery, mood.tired > 0 || mood.asleep {+ parts.append(String(format: String(localized: "vitals.battery %lld"), b.percent))+ }+ return parts.isEmpty ? nil : parts.prefix(2).joined(separator: " · ")+ }++ /// All the processor time since boot: (busy, total) ticks over every core.+ private static func cpuTicks() -> (busy: UInt64, total: UInt64)? {+ var info = host_cpu_load_info()+ var count = mach_msg_type_number_t(MemoryLayout<host_cpu_load_info_data_t>.stride / MemoryLayout<integer_t>.stride)+ let result = withUnsafeMutablePointer(to: &info) {+ $0.withMemoryRebound(to: integer_t.self, capacity: Int(count)) {+ host_statistics(mach_host_self(), HOST_CPU_LOAD_INFO, $0, &count)+ }+ }+ guard result == KERN_SUCCESS else { return nil }+ let user = UInt64(info.cpu_ticks.0), system = UInt64(info.cpu_ticks.1)+ let idle = UInt64(info.cpu_ticks.2), nice = UInt64(info.cpu_ticks.3)+ return (user + system + nice, user + system + idle + nice)+ }++ /// The internal battery: its charge and whether the Mac is plugged in. Nil on a desktop Mac.+ private static func readBattery() -> (percent: Int, onPower: Bool)? {+ guard let blob = IOPSCopyPowerSourcesInfo()?.takeRetainedValue(),+ let list = IOPSCopyPowerSourcesList(blob)?.takeRetainedValue() else { return nil }+ for source in list as Array {+ guard let desc = IOPSGetPowerSourceDescription(blob, source as CFTypeRef)?.takeUnretainedValue() as? [String: Any],+ desc[kIOPSTypeKey] as? String == kIOPSInternalBatteryType,+ let current = desc[kIOPSCurrentCapacityKey] as? Int,+ let max = desc[kIOPSMaxCapacityKey] as? Int, max > 0 else { continue }+ let onPower = desc[kIOPSPowerSourceStateKey] as? String == kIOPSACPowerValue+ return (Int((Double(current) / Double(max) * 100).rounded()), onPower)+ }+ return nil+ }++ /// The apps using the processor the most since the last reading ("node", "Google Chrome").+ private func topProcessNames() -> [String] {+ let estimate = proc_listallpids(nil, 0)+ guard estimate > 0 else { return [] }+ var pids = [pid_t](repeating: 0, count: Int(estimate) + 64)+ let found = pids.withUnsafeMutableBytes { proc_listallpids($0.baseAddress, Int32($0.count)) }+ guard found > 0 else { return [] }+ var times: [pid_t: UInt64] = [:]+ var deltas: [(pid: pid_t, delta: UInt64)] = []+ let own = getpid()+ for pid in pids.prefix(Int(found)) where pid > 0 && pid != own {+ var usage = rusage_info_v2()+ let ok = withUnsafeMutablePointer(to: &usage) {+ $0.withMemoryRebound(to: rusage_info_t?.self, capacity: 1) {+ proc_pid_rusage(pid, RUSAGE_INFO_V2, $0)+ }+ }+ guard ok == 0 else { continue }+ let total = usage.ri_user_time + usage.ri_system_time+ times[pid] = total+ if let before = lastProcessTimes[pid], total > before { deltas.append((pid, total - before)) }+ }+ lastProcessTimes = times+ var names: [String] = []+ for entry in deltas.sorted(by: { $0.delta > $1.delta }) {+ let name = Self.displayName(pid: entry.pid)+ if !name.isEmpty, !names.contains(name) { names.append(name) }+ if names.count == 2 { break }+ }+ return names+ }++ /// "Google Chrome" for its helpers, the app's name when it has one, else the process name.+ private static func displayName(pid: pid_t) -> String {+ var name: String+ if let app = NSRunningApplication(processIdentifier: pid), let local = app.localizedName {+ name = local+ } else {+ var buffer = [CChar](repeating: 0, count: 256)+ proc_name(pid, &buffer, 256)+ name = String(cString: buffer)+ }+ if let range = name.range(of: " Helper") { name = String(name[..<range.lowerBound]) }+ return name+ }+}diff --git a/NotchBuddy/Sources/App/ProjectTime.swift b/NotchBuddy/Sources/App/ProjectTime.swiftnew file mode 100644index 00000000..7811ac0a--- /dev/null+++ b/NotchBuddy/Sources/App/ProjectTime.swift@@ -0,0 +1,196 @@+import AppKit+import ApplicationServices+import CoreGraphics++/// Time per project, like WakaTime but without anything leaving the Mac: while a code editor+/// (VS Code, Cursor, Xcode, Zed…) or a terminal running an agent is in front, its project gets+/// the time. Event-driven: Coucou looks when the app in front changes, never on a timer.+///+/// The project is the folder open in the editor (read from its window title) or the folder a+/// Claude Code session runs in. Kept 90 days in Application Support/NotchBuddy/projecttime.json.+@MainActor+final class ProjectTime: ObservableObject {+ static let shared = ProjectTime()++ static let enabledKey = "projectTimeEnabled"++ /// Seconds per project, per day ("2026-10-15" → ["landing": 4320]).+ @Published private(set) var days: [String: [String: Double]] = [:]++ var enabled: Bool {+ get { UserDefaults.standard.object(forKey: Self.enabledKey) as? Bool ?? true }+ set {+ UserDefaults.standard.set(newValue, forKey: Self.enabledKey)+ objectWillChange.send()+ if newValue { follow(NSWorkspace.shared.frontmostApplication) } else { close(at: Date()) }+ }+ }++ /// The project in front, and since when.+ private var current: (project: String, since: Date)?+ private var started = false++ private static let storageURL: URL = {+ let support = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0]+ return support.appendingPathComponent("NotchBuddy/projecttime.json")+ }()++ private init() { load() }++ func start() {+ guard !started else { return }+ started = true+ let ws = NSWorkspace.shared.notificationCenter+ ws.addObserver(forName: NSWorkspace.didActivateApplicationNotification, object: nil, queue: .main) { note in+ MainActor.assumeIsolated {+ ProjectTime.shared.follow(note.userInfo?[NSWorkspace.applicationUserInfoKey] as? NSRunningApplication)+ }+ }+ for name in [NSWorkspace.screensDidSleepNotification, NSWorkspace.willSleepNotification] {+ ws.addObserver(forName: name, object: nil, queue: .main) { _ in+ MainActor.assumeIsolated { ProjectTime.shared.close(at: Date()) }+ }+ }+ for name in [NSWorkspace.screensDidWakeNotification, NSWorkspace.didWakeNotification] {+ ws.addObserver(forName: name, object: nil, queue: .main) { _ in+ MainActor.assumeIsolated { ProjectTime.shared.follow(NSWorkspace.shared.frontmostApplication) }+ }+ }+ let dc = DistributedNotificationCenter.default()+ dc.addObserver(forName: NSNotification.Name("com.apple.screenIsLocked"), object: nil, queue: .main) { _ in+ MainActor.assumeIsolated { ProjectTime.shared.close(at: Date()) }+ }+ dc.addObserver(forName: NSNotification.Name("com.apple.screenIsUnlocked"), object: nil, queue: .main) { _ in+ MainActor.assumeIsolated { ProjectTime.shared.follow(NSWorkspace.shared.frontmostApplication) }+ }+ follow(NSWorkspace.shared.frontmostApplication)+ }++ /// Saves what is running (Coucou quits).+ func flush() { close(at: Date()) }++ // MARK: - Following the app in front++ private func follow(_ app: NSRunningApplication?) {+ let now = Date()+ close(at: now)+ guard enabled, let app, let project = Self.project(for: app) else { return }+ current = (project, now)+ }++ private func close(at end: Date) {+ guard let open = current else { return }+ current = nil+ var seconds = end.timeIntervalSince(open.since)+ // Away from the keyboard for more than 5 minutes: that part does not count.+ let idle = Self.secondsIdle()+ if idle > 300 { seconds -= idle }+ guard seconds > 5 else { return }+ let day = Self.dayKey(open.since)+ days[day, default: [:]][open.project, default: 0] += seconds+ save()+ }++ // MARK: - Reading it++ /// Seconds per project since `start` (today's start, the week's…), the one in front included.+ func totals(since start: Date) -> [(project: String, seconds: Double)] {+ let first = Self.dayKey(start)+ var sum: [String: Double] = [:]+ for (day, projects) in days where day >= first {+ for (project, seconds) in projects { sum[project, default: 0] += seconds }+ }+ if let open = current, open.since >= Calendar.current.startOfDay(for: start) {+ sum[open.project, default: 0] += Date().timeIntervalSince(open.since)+ }+ return sum.map { (project: $0.key, seconds: $0.value) }.sorted { $0.seconds > $1.seconds }+ }++ func clear() {+ current = nil+ days = [:]+ save()+ follow(NSWorkspace.shared.frontmostApplication)+ }++ static func dayKey(_ date: Date) -> String {+ let c = Calendar.current.dateComponents([.year, .month, .day], from: date)+ return String(format: "%04d-%02d-%02d", c.year ?? 0, c.month ?? 0, c.day ?? 0)+ }++ // MARK: - Which project++ /// Code editors, by bundle id prefix: the project comes from their window title.+ private static let editors = [+ "com.microsoft.VSCode", "com.todesktop.230313mzl4w4u92", "com.exafunction.windsurf",+ "dev.zed.Zed", "com.apple.dt.Xcode", "com.jetbrains.", "com.sublimetext.", "com.google.antigravity",+ "com.vscodium",+ ]++ static func project(for app: NSRunningApplication) -> String? {+ guard let id = app.bundleIdentifier else { return nil }+ if editors.contains(where: { id.hasPrefix($0) }) {+ let title = windowTitle(of: app) ?? ""+ return projectName(fromTitle: title, bundleId: id) ?? app.localizedName+ }+ if TerminalTarget.knownTerminals.contains(id) {+ // The terminal of an agent session: its folder.+ let sessions = AppState.shared.tasks.filter { !$0.isIntegration && $0.sessionCwd != nil }+ let own = sessions.first { $0.hostApp == id } ?? sessions.first+ if let cwd = own?.sessionCwd {+ let name = URL(fileURLWithPath: cwd).lastPathComponent+ return name.isEmpty ? nil : name+ }+ }+ return nil+ }++ /// "page.tsx — landing — Visual Studio Code" → "landing"; Xcode's "App — Foo.swift" → "App";+ /// JetBrains' "app – Main.kt" → "app".+ static func projectName(fromTitle title: String, bundleId: String) -> String? {+ let clean = title.trimmingCharacters(in: .whitespacesAndNewlines)+ guard !clean.isEmpty else { return nil }+ if bundleId == "com.apple.dt.Xcode" || bundleId.hasPrefix("com.jetbrains.") {+ let first = clean.components(separatedBy: bundleId.hasPrefix("com.jetbrains.") ? " – " : " — ").first ?? clean+ let name = first.trimmingCharacters(in: .whitespaces)+ return name.isEmpty ? nil : name+ }+ var parts = clean.components(separatedBy: " — ").map { $0.trimmingCharacters(in: .whitespaces) }+ if parts.count > 1 { parts.removeLast() } // the app's name+ let name = parts.last?.trimmingCharacters(in: CharacterSet(charactersIn: "●• ")) ?? ""+ return name.isEmpty ? nil : name+ }++ /// The title of the app's front window (Accessibility; nil without it).+ private static func windowTitle(of app: NSRunningApplication) -> String? {+ guard AXIsProcessTrusted() else { return nil }+ let element = AXUIElementCreateApplication(app.processIdentifier)+ var window: CFTypeRef?+ guard AXUIElementCopyAttributeValue(element, kAXFocusedWindowAttribute as CFString, &window) == .success,+ let window, CFGetTypeID(window) == AXUIElementGetTypeID() else { return nil }+ var title: CFTypeRef?+ AXUIElementCopyAttributeValue(window as! AXUIElement, kAXTitleAttribute as CFString, &title)+ return title as? String+ }++ private static func secondsIdle() -> Double {+ guard let any = CGEventType(rawValue: ~0) else { return 0 }+ return CGEventSource.secondsSinceLastEventType(.combinedSessionState, eventType: any)+ }++ // MARK: - Disk++ private func load() {+ guard let data = try? Data(contentsOf: Self.storageURL),+ let decoded = try? JSONDecoder().decode([String: [String: Double]].self, from: data) else { return }+ days = decoded+ }++ private func save() {+ let oldest = Self.dayKey(Date().addingTimeInterval(-90 * 86400))+ days = days.filter { $0.key >= oldest }+ let url = Self.storageURL+ try? FileManager.default.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true)+ if let data = try? JSONEncoder().encode(days) { try? data.write(to: url, options: .atomic) }+ }+}diff --git a/NotchBuddy/Sources/App/ScreenCapture.swift b/NotchBuddy/Sources/App/ScreenCapture.swiftnew file mode 100644index 00000000..325d7ff6--- /dev/null+++ b/NotchBuddy/Sources/App/ScreenCapture.swift@@ -0,0 +1,467 @@+#if !APPSTORE+import AppKit+import Carbon.HIToolbox+import SwiftUI++/// ⌃⌥X: capture a part of the screen (a bug in a page, an error, a mock-up), Mochi swallows it,+/// and the island offers what to do with it: paste it into the prompt you were typing in, copy+/// it, annotate it, or ask Claude about it in the island's chat.+///+/// With Flow: keep the capture on the island and hold the dictation key: "this button is off,+/// fix it". When you let go, the image and your words are pasted together where you type.+///+/// The selection is macOS's own (screencapture -i): drag a zone, Space for a window, Esc to+/// cancel. The image stays on the Mac (in the temporary folder); it only goes to Claude when you+/// paste it there or ask Claude about it.+@MainActor+final class ScreenCapture: ObservableObject {+ static let shared = ScreenCapture()++ /// The capture on the island, if any.+ @Published private(set) var url: URL? = nil+ @Published private(set) var image: NSImage? = nil+ /// The app in front when the capture was taken: the image goes back there.+ private(set) var target: NSRunningApplication? = nil+ private var takenAt: Date? = nil+ private var running = false+ private var annotation: NSWindow? = nil++ private static var folder: URL {+ FileManager.default.temporaryDirectory.appendingPathComponent("CoucouCaptures", isDirectory: true)+ }++ private init() {}++ // MARK: - Capturing++ func begin() {+ guard !running else { return }+ guard CGPreflightScreenCaptureAccess() else {+ // macOS asks once; then Coucou is to be allowed in Privacy → Screen Recording.+ _ = CGRequestScreenCaptureAccess()+ AppState.shared.noteMessage = String(localized: "capture.permission")+ NotificationCenter.default.post(name: .hookExpand, object: IslandView.note)+ return+ }+ let ours = Bundle.main.bundleIdentifier+ let front = NSWorkspace.shared.frontmostApplication+ target = front?.bundleIdentifier == ours ? AppState.shared.lastExternalApp : front+ // The island folds first: it must not be in the picture.+ if AppState.shared.mode == .expanded {+ NotificationCenter.default.post(name: .islandCollapse, object: nil)+ }+ try? FileManager.default.createDirectory(at: Self.folder, withIntermediateDirectories: true)+ let formatter = DateFormatter()+ formatter.locale = Locale(identifier: "en_US_POSIX")+ formatter.dateFormat = "yyyy-MM-dd 'at' HH.mm.ss"+ let stamp = formatter.string(from: Date())+ let file = Self.folder.appendingPathComponent("Capture \(stamp).png")+ let task = Process()+ task.executableURL = URL(fileURLWithPath: "/usr/sbin/screencapture")+ // -i: macOS's own selection; -x: no shutter sound (Mochi makes his own); -o: no window shadow.+ task.arguments = ["-i", "-x", "-o", file.path]+ task.terminationHandler = { _ in+ Task { @MainActor in ScreenCapture.shared.finished(file) }+ }+ do {+ running = true+ try task.run()+ } catch {+ running = false+ appendAppLog("nb.log", "[Capture] screencapture failed: \(error)")+ }+ }++ private func finished(_ file: URL) {+ running = false+ // Esc: no file, nothing happens.+ guard FileManager.default.fileExists(atPath: file.path), let picture = NSImage(contentsOf: file) else { return }+ show(file, picture)+ prune()+ }++ /// The capture lands on the island: Mochi swallows it.+ private func show(_ file: URL, _ picture: NSImage) {+ url = file+ image = picture+ takenAt = Date()+ SoundEngine.shared.play("gulp")+ NotificationCenter.default.post(name: .hookExpand, object: IslandView.capture)+ Task { @MainActor in+ try? await Task.sleep(for: .milliseconds(250))+ NotificationCenter.default.post(name: .botGulp, object: nil)+ }+ }++ /// Done with it: the card closes.+ func dismiss() {+ url = nil+ image = nil+ takenAt = nil+ if AppState.shared.view == .capture {+ NotificationCenter.default.post(name: .islandCollapse, object: nil)+ }+ }++ /// Keeps the last 20 captures.+ private func prune() {+ let fm = FileManager.default+ guard let files = try? fm.contentsOfDirectory(at: Self.folder, includingPropertiesForKeys: [.creationDateKey]) else { return }+ let sorted = files.sorted {+ let a = (try? $0.resourceValues(forKeys: [.creationDateKey]).creationDate) ?? .distantPast+ let b = (try? $1.resourceValues(forKeys: [.creationDateKey]).creationDate) ?? .distantPast+ return a > b+ }+ for old in sorted.dropFirst(20) where old != url { try? fm.removeItem(at: old) }+ }++ // MARK: - The island's buttons++ /// Into the prompt of the app you were in (⌘V, or ⌃V in a terminal, where Claude Code takes images).+ func pasteIntoPrompt() {+ guard let file = url, let data = try? Data(contentsOf: file) else { return }+ let app = target+ NotificationCenter.default.post(name: .islandCollapse, object: nil)+ Task { @MainActor in+ _ = app?.activate()+ try? await Task.sleep(for: .milliseconds(250))+ if CapturePaste.paste(png: data, image: image, into: app) {+ SoundEngine.shared.play("send")+ } else {+ AppState.shared.noteMessage = String(localized: "capture.copied")+ NotificationCenter.default.post(name: .hookExpand, object: IslandView.note)+ }+ dismiss()+ }+ }++ func copy() {+ guard let file = url, let data = try? Data(contentsOf: file) else { return }+ CapturePaste.put(png: data, image: image, transient: false)+ SoundEngine.shared.play("pop")+ dismiss()+ }++ /// The island's chat, with the capture attached.+ func askClaude() {+ guard let file = url else { return }+ let name = String(localized: "capture.name")+ AppState.shared.droppedFile = DroppedFile(url: file, name: name)+ AppState.shared.promptContext = .file(name: name, fileURL: file)+ withAnimation(.spring(response: 0.3, dampingFraction: 0.8)) {+ AppState.shared.view = .prompt+ }+ }++ // MARK: - With Flow++ /// A capture on the island, fresh and not used yet: the next dictation takes it with its words.+ var waitingForDictation: Bool {+ guard url != nil, let at = takenAt, Date().timeIntervalSince(at) < 180 else { return false }+ return AppState.shared.mode == .expanded && AppState.shared.view == .capture+ }++ /// Pastes the capture where you type, before the words of the dictation. True when pasted.+ func pasteForDictation() async -> Bool {+ guard waitingForDictation, let file = url, let data = try? Data(contentsOf: file) else { return false }+ let front = NSWorkspace.shared.frontmostApplication+ let pasted = CapturePaste.paste(png: data, image: image, into: front, restore: false)+ dismiss()+ // The app reads the image before the words arrive.+ try? await Task.sleep(for: .milliseconds(450))+ return pasted+ }++ // MARK: - Annotating++ func annotate() {+ guard let picture = image else { return }+ annotation?.close()+ let view = CaptureAnnotationView(image: picture) { [weak self] result in+ self?.finishAnnotation(result)+ }+ let maxW: CGFloat = 1100, maxH: CGFloat = 720+ let size = picture.size+ let scale = min(1, min(maxW / max(1, size.width), maxH / max(1, size.height)))+ let content = NSSize(width: max(420, size.width * scale), height: size.height * scale + 56)+ let win = NSWindow(contentRect: NSRect(origin: .zero, size: content),+ styleMask: [.titled, .closable, .fullSizeContentView], backing: .buffered, defer: false)+ win.title = String(localized: "capture.annotate")+ win.titlebarAppearsTransparent = true+ win.appearance = NSAppearance(named: .darkAqua)+ win.backgroundColor = .black+ win.isReleasedWhenClosed = false+ win.contentView = NSHostingView(rootView: view)+ win.level = .floating+ win.center()+ annotation = win+ NotificationCenter.default.post(name: .islandCollapse, object: nil)+ NSApp.activate(ignoringOtherApps: true)+ win.makeKeyAndOrderFront(nil)+ }++ private func finishAnnotation(_ result: NSImage?) {+ annotation?.close()+ annotation = nil+ guard let result, let png = CapturePaste.pngData(result) else {+ if url != nil { NotificationCenter.default.post(name: .hookExpand, object: IslandView.capture) }+ return+ }+ let file = Self.folder.appendingPathComponent((url?.deletingPathExtension().lastPathComponent ?? "Capture") + " annotated.png")+ do {+ try png.write(to: file, options: .atomic)+ } catch {+ appendAppLog("nb.log", "[Capture] annotated image not saved: \(error)")+ return+ }+ _ = target?.activate()+ show(file, result)+ }+}++// MARK: - Pasting an image++enum CapturePaste {+ /// The terminals where Claude Code takes an image with ⌃V.+ static func isTerminal(_ app: NSRunningApplication?) -> Bool {+ guard let id = app?.bundleIdentifier else { return false }+ return TerminalTarget.knownTerminals.contains(id)+ }++ @MainActor static func put(png: Data, image: NSImage?, transient: Bool) {+ let board = NSPasteboard.general+ board.clearContents()+ var types: [NSPasteboard.PasteboardType] = [.png]+ let tiff = image?.tiffRepresentation+ if tiff != nil { types.append(.tiff) }+ if transient { types += [FlowPaste.transientType, FlowPaste.autoGeneratedType] }+ board.declareTypes(types, owner: nil)+ board.setData(png, forType: .png)+ if let tiff { board.setData(tiff, forType: .tiff) }+ if transient {+ board.setData(Data(), forType: FlowPaste.transientType)+ board.setData(Data(), forType: FlowPaste.autoGeneratedType)+ }+ }++ /// Puts the image on the clipboard and sends the paste keys to the app in front. False without+ /// the Accessibility permission (the image then stays on the clipboard).+ @MainActor static func paste(png: Data, image: NSImage?, into app: NSRunningApplication?, restore: Bool = true) -> Bool {+ let board = NSPasteboard.general+ let saved = restore ? snapshot(board) : []+ put(png: png, image: image, transient: true)+ guard AXIsProcessTrusted() else { return false }+ let source = CGEventSource(stateID: .combinedSessionState)+ let terminal = isTerminal(app)+ let key = terminal ? CGKeyCode(kVK_ANSI_V) : FlowPaste.vKeyCode()+ let flags: CGEventFlags = terminal ? .maskControl : .maskCommand+ let down = CGEvent(keyboardEventSource: source, virtualKey: key, keyDown: true)+ let up = CGEvent(keyboardEventSource: source, virtualKey: key, keyDown: false)+ down?.flags = flags+ up?.flags = flags+ down?.post(tap: .cghidEventTap)+ up?.post(tap: .cghidEventTap)+ guard restore else { return true }+ // Claude Code in a terminal reads the clipboard itself, a little later: give it time,+ // then put back what was there, unless something else was copied meanwhile.+ let count = board.changeCount+ Task { @MainActor in+ try? await Task.sleep(for: .milliseconds(1500))+ guard board.changeCount == count else { return }+ board.clearContents()+ guard !saved.isEmpty else { return }+ board.writeObjects(saved.map { entry in+ let item = NSPasteboardItem()+ for (type, data) in entry { item.setData(data, forType: type) }+ return item+ })+ }+ return true+ }++ @MainActor private static func snapshot(_ board: NSPasteboard) -> [[NSPasteboard.PasteboardType: Data]] {+ (board.pasteboardItems ?? []).map { item in+ var out: [NSPasteboard.PasteboardType: Data] = [:]+ for type in item.types { if let data = item.data(forType: type) { out[type] = data } }+ return out+ }+ }++ static func pngData(_ image: NSImage) -> Data? {+ guard let cg = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else { return nil }+ return NSBitmapImageRep(cgImage: cg).representation(using: .png, properties: [:])+ }+}++// MARK: - Annotation window++/// Arrows, boxes and a pen over the capture, then Done.+struct CaptureAnnotationView: View {+ let image: NSImage+ let onDone: @MainActor (NSImage?) -> Void++ enum Tool: CaseIterable { case arrow, box, pen }++ struct Mark {+ var tool: Tool+ var color: Int+ /// In the image's own proportions: (0, 0) top left, (1, 1) bottom right.+ var points: [CGPoint]+ }++ static let colors: [NSColor] = [+ NSColor(red: 1, green: 0.27, blue: 0.23, alpha: 1),+ NSColor(red: 1, green: 0.8, blue: 0.0, alpha: 1),+ NSColor(red: 0.23, green: 0.62, blue: 1, alpha: 1),+ NSColor.white,+ ]++ @State private var marks: [Mark] = []+ @State private var drawing: Mark? = nil+ @State private var tool: Tool = .arrow+ @State private var color = 0++ var body: some View {+ VStack(spacing: 0) {+ toolbar+ GeometryReader { geo in+ let fit = Self.fitted(image.size, in: geo.size)+ ZStack(alignment: .topLeading) {+ Image(nsImage: image)+ .resizable()+ .frame(width: fit.width, height: fit.height)+ Canvas { ctx, size in+ for mark in marks + (drawing.map { [$0] } ?? []) {+ Self.draw(mark, in: &ctx, size: size, lineWidth: 3)+ }+ }+ .frame(width: fit.width, height: fit.height)+ .contentShape(Rectangle())+ .gesture(DragGesture(minimumDistance: 0)+ .onChanged { g in+ let p = CGPoint(x: min(1, max(0, g.location.x / fit.width)),+ y: min(1, max(0, g.location.y / fit.height)))+ if drawing == nil {+ drawing = Mark(tool: tool, color: color, points: [p, p])+ } else if tool == .pen {+ drawing?.points.append(p)+ } else {+ drawing?.points[1] = p+ }+ }+ .onEnded { _ in+ if let mark = drawing { marks.append(mark) }+ drawing = nil+ })+ }+ .frame(width: geo.size.width, height: geo.size.height)+ }+ }+ .background(Color.black)+ .preferredColorScheme(.dark)+ }++ private var toolbar: some View {+ HStack(spacing: 10) {+ ForEach(Array(Tool.allCases.enumerated()), id: \.offset) { _, t in+ Button { tool = t } label: {+ Image(systemName: t == .arrow ? "arrow.up.right" : (t == .box ? "rectangle" : "pencil.tip"))+ .font(.system(size: 13, weight: .semibold))+ .frame(width: 30, height: 26)+ .background(RoundedRectangle(cornerRadius: 7).fill(Color.white.opacity(tool == t ? 0.16 : 0.05)))+ }+ .buttonStyle(.plain)+ }+ Divider().frame(height: 18)+ ForEach(0..<Self.colors.count, id: \.self) { i in+ Button { color = i } label: {+ Circle()+ .fill(Color(nsColor: Self.colors[i]))+ .frame(width: 16, height: 16)+ .overlay(Circle().stroke(Color.white.opacity(color == i ? 0.9 : 0), lineWidth: 2).padding(-3))+ }+ .buttonStyle(.plain)+ }+ Divider().frame(height: 18)+ Button { if !marks.isEmpty { marks.removeLast() } } label: {+ Image(systemName: "arrow.uturn.backward")+ .font(.system(size: 13, weight: .semibold))+ .frame(width: 30, height: 26)+ }+ .buttonStyle(.plain)+ .keyboardShortcut("z", modifiers: .command)+ .disabled(marks.isEmpty)+ Spacer()+ Button(String(localized: "Cancel")) { onDone(nil) }+ .keyboardShortcut(.cancelAction)+ Button(String(localized: "capture.done")) { onDone(render()) }+ .keyboardShortcut(.defaultAction)+ .buttonStyle(.borderedProminent)+ .tint(Color(hex: "#FB923C"))+ }+ .foregroundColor(Color(hex: "#F5F6F8"))+ .padding(.leading, 82) // clear of the window's buttons+ .padding(.trailing, 14)+ .frame(height: 56)+ }++ static func fitted(_ image: CGSize, in box: CGSize) -> CGSize {+ guard image.width > 0, image.height > 0 else { return box }+ let s = min(box.width / image.width, box.height / image.height)+ return CGSize(width: image.width * s, height: image.height * s)+ }++ /// One mark, in a canvas of `size` (y down).+ static func draw(_ mark: Mark, in ctx: inout GraphicsContext, size: CGSize, lineWidth: CGFloat) {+ let pts = mark.points.map { CGPoint(x: $0.x * size.width, y: $0.y * size.height) }+ guard let first = pts.first, let last = pts.last else { return }+ let shading = GraphicsContext.Shading.color(Color(nsColor: colors[mark.color]))+ let style = StrokeStyle(lineWidth: lineWidth, lineCap: .round, lineJoin: .round)+ switch mark.tool {+ case .pen:+ var p = Path()+ p.addLines(pts)+ ctx.stroke(p, with: shading, style: style)+ case .box:+ let rect = CGRect(x: min(first.x, last.x), y: min(first.y, last.y),+ width: abs(last.x - first.x), height: abs(last.y - first.y))+ ctx.stroke(Path(roundedRect: rect, cornerRadius: lineWidth * 1.5), with: shading, style: style)+ case .arrow:+ ctx.stroke(arrow(from: first, to: last, head: lineWidth * 5), with: shading, style: style)+ }+ }++ static func arrow(from a: CGPoint, to b: CGPoint, head: CGFloat) -> Path {+ var p = Path()+ p.move(to: a)+ p.addLine(to: b)+ let angle = atan2(b.y - a.y, b.x - a.x)+ guard hypot(b.x - a.x, b.y - a.y) > head * 0.5 else { return p }+ for side in [-1.0, 1.0] as [CGFloat] {+ let wing = angle + .pi + side * .pi / 7+ p.move(to: b)+ p.addLine(to: CGPoint(x: b.x + cos(wing) * head, y: b.y + sin(wing) * head))+ }+ return p+ }++ /// The capture with its marks, at the capture's full size.+ @MainActor private func render() -> NSImage? {+ guard !marks.isEmpty else { return image }+ guard let cg = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else { return nil }+ let size = CGSize(width: cg.width, height: cg.height)+ let marks = self.marks+ let view = Canvas { ctx, s in+ ctx.draw(Image(decorative: cg, scale: 1), in: CGRect(origin: .zero, size: s))+ for mark in marks {+ Self.draw(mark, in: &ctx, size: s, lineWidth: max(3, s.width / 300))+ }+ }+ .frame(width: size.width, height: size.height)+ let renderer = ImageRenderer(content: view)+ renderer.scale = 1+ guard let out = renderer.cgImage else { return nil }+ return NSImage(cgImage: out, size: image.size)+ }+}+#endifdiff --git a/NotchBuddy/Sources/App/SettingsView.swift b/NotchBuddy/Sources/App/SettingsView.swiftindex b7f379d6..05899af1 100644--- a/NotchBuddy/Sources/App/SettingsView.swift+++ b/NotchBuddy/Sources/App/SettingsView.swift@@ -193,6 +193,7 @@ struct SettingsView: View {#if !APPSTORESettingsSidebarRow(title: "Voice", icon: "mic.fill", color: "#F97316").tag("voice")#endif+ SettingsSidebarRow(title: "Focus", icon: "headphones", color: "#A78BFA").tag("focus")SettingsSidebarRow(title: "Shortcuts", icon: "keyboard.fill", color: "#6366F1").tag("shortcuts")}.listStyle(.sidebar)@@ -268,6 +269,7 @@ struct SettingsView: View {case "integrations": return String(localized: "Integrations")case "voice": return String(localized: "Voice")case "shortcuts": return String(localized: "Shortcuts")+ case "focus": return String(localized: "Focus")default: return String(localized: "General")}}@@ -282,6 +284,7 @@ struct SettingsView: View {case "voice": voiceSection#endifcase "shortcuts": ShortcutsSettingsView()+ case "focus": FocusSettingsView()default: generalSection}}@@ -389,6 +392,19 @@ struct SettingsView: View {}}+ GroupBox(String(localized: "vitals.title")) {+ VStack(alignment: .leading, spacing: 10) {+ Toggle(String(localized: "vitals.toggle"), isOn: Binding(+ get: { MachineVitals.shared.enabled },+ set: { MachineVitals.shared.enabled = $0 }))+ Text("vitals.about")+ .font(.system(size: 11))+ .foregroundColor(.secondary)+ .fixedSize(horizontal: false, vertical: true)+ }+ .padding(6)+ }+GroupBox("Hotkey") {VStack(alignment: .leading, spacing: 10) {Toggle("Show island with shortcut", isOn: $state.hotkeyEnabled)diff --git a/NotchBuddy/Sources/App/ShortcutLogic.swift b/NotchBuddy/Sources/App/ShortcutLogic.swiftindex 16aafdd4..2de2d2a3 100644--- a/NotchBuddy/Sources/App/ShortcutLogic.swift+++ b/NotchBuddy/Sources/App/ShortcutLogic.swift@@ -19,6 +19,8 @@ enum ShortcutAction: String, CaseIterable, Sendable {case desktopToggle = "desktopToggle" // ⌃⌥D — send Mochi to desktop / bring backcase wardrobeToggle = "wardrobeToggle" // ⌃⌥G — open / close wardrobecase talkToCoucou = "talkToCoucou" // (unset) — start listening without wake phrase (non-AppStore)+ case focusToggle = "focusToggle" // ⌃⌥F — start / stop a Focus session+ case captureScreen = "captureScreen" // ⌃⌥X — capture a part of the screen for Claude (non-AppStore)// MARK: UserDefaults keys@@ -50,12 +52,14 @@ enum ShortcutAction: String, CaseIterable, Sendable {case .desktopToggle: return String(localized: "shortcut.desktop-toggle")case .wardrobeToggle: return String(localized: "shortcut.wardrobe")case .talkToCoucou: return String(localized: "shortcut.talk-to-coucou")+ case .focusToggle: return String(localized: "shortcut.focus")+ case .captureScreen: return String(localized: "shortcut.capture")}}/// Whether this action should be omitted from App Store builds.var isAppStoreOnly: Bool { false }- var isNonAppStore: Bool { self == .attachFrontWindow || self == .talkToCoucou }+ var isNonAppStore: Bool { self == .attachFrontWindow || self == .talkToCoucou || self == .captureScreen }/// Whether the shortcut is enabled by default./// `toggleIsland` and `talkToCoucou` are off by default; all others are on.@@ -107,6 +111,8 @@ enum ShortcutLogic {.desktopToggle: ShortcutSpec(keyCode: 2, nsFlags: ShortcutSpec.ctrlOpt), // ⌃⌥D.wardrobeToggle: ShortcutSpec(keyCode: 5, nsFlags: ShortcutSpec.ctrlOpt), // ⌃⌥G.talkToCoucou: ShortcutSpec(keyCode: 9, nsFlags: ShortcutSpec.ctrlOpt), // ⌃⌥V (disabled by default)+ .focusToggle: ShortcutSpec(keyCode: 3, nsFlags: ShortcutSpec.ctrlOpt), // ⌃⌥F+ .captureScreen: ShortcutSpec(keyCode: 7, nsFlags: ShortcutSpec.ctrlOpt), // ⌃⌥X]// MARK: - Load / save (UserDefaults)diff --git a/NotchBuddy/Sources/App/SoundEngine.swift b/NotchBuddy/Sources/App/SoundEngine.swiftindex 1794e706..a294d04d 100644--- a/NotchBuddy/Sources/App/SoundEngine.swift+++ b/NotchBuddy/Sources/App/SoundEngine.swift@@ -104,6 +104,8 @@ final class SoundEngine {func play(_ name: String) {guard enabled && AppState.shared.soundEnabled else { return }+ // A Focus session: only what an agent waiting on you makes.+ if FocusSession.shared.isQuiet && !FocusSession.soundsDuringFocus.contains(name) { return }guard let pool = players[name] else { return }// Find a player that is not currently playinglet player = pool.first { !$0.isPlaying } ?? pool[0]diff --git a/NotchBuddy/Sources/App/Voice/ClaudeVoiceBrain.swift b/NotchBuddy/Sources/App/Voice/ClaudeVoiceBrain.swiftindex 1cca2404..1ac7f6bb 100644--- a/NotchBuddy/Sources/App/Voice/ClaudeVoiceBrain.swift+++ b/NotchBuddy/Sources/App/Voice/ClaudeVoiceBrain.swift@@ -7,7 +7,7 @@ import Foundation// the phrase parser or the on-device model: Claude understands any wording, keeps the// thread of the conversation and calls Coucou's tools to act.//-// Tools: pills, music, service_info (Stripe, GitHub, agents…), open_app, prepare_email+// Tools: pills, music, service_info (Stripe, GitHub, agents…), open_app, prepare_email, focus// (the island's mail card opens filled in, the user clicks Send) and Anthropic's// web_search. The conversation lives in memory only and is forgotten with the rest of// the voice context (90 s after the last turn). Nothing is sent, approved or deleted@@ -125,7 +125,7 @@ final class ClaudeVoiceBrain {in one or two short sentences, no markdown, no lists, no emojis, no links.Act with the tools instead of describing: pills, music, service_info for the user's own data \(Stripe sales, GitHub, Vercel, Resend, n8n, Notion, Cal.com, agent sessions like Claude Code, \- plan usage, music), open_app, prepare_email, and web_search for anything current \+ plan usage, music), open_app, prepare_email, focus (a Focus session timer), and web_search for anything current \(weather, news, scores, prices, facts you are not sure of). Never invent the user's data.Email: gather the recipient, the subject and what to say (write the text yourself from what \the user wants to say, in the language they used), asking for what is missing one short \@@ -205,6 +205,18 @@ final class ClaudeVoiceBrain {"required": ["recipient", "subject", "body"],],],+ [+ "name": "focus",+ "description": "Start, stop or check a Focus session: a timer in the notch, Mochi with headphones on, Coucou quiet until it ends (permission requests still come through), then a short break.",+ "input_schema": [+ "type": "object",+ "properties": [+ "action": ["type": "string", "enum": ["start", "stop", "status"]],+ "minutes": ["type": "integer", "description": "Length of the session for start (default: the user's setting)."],+ ],+ "required": ["action"],+ ],+ ],webSearchTool,]@@ -293,6 +305,25 @@ final class ClaudeVoiceBrain {case "prepare_email":return await prepareEmail(input)+ case "focus":+ let focus = FocusSession.shared+ switch input["action"] as? String ?? "status" {+ case "start":+ let minutes = input["minutes"] as? Int+ focus.start(minutes: minutes)+ return ("Focus session started for \(minutes ?? focus.minutes) minutes. Coucou stays quiet until it ends.", true)+ case "stop":+ guard focus.phase != .off else { return ("No Focus session is running.", false) }+ focus.stop()+ return ("Focus session stopped.", true)+ default:+ switch focus.phase {+ case .off: return ("No Focus session. \(focus.doneToday) finished today.", false)+ case .focus: return ("Focus session running, \(focus.remainingText(at: Date())) left. \(focus.held) alerts held back.", false)+ case .rest: return ("On a break, \(focus.remainingText(at: Date())) left.", false)+ }+ }+default:return ("unknown tool \(tool)", false)}diff --git a/NotchBuddy/Sources/CoucouKit/BotEngine.swift b/NotchBuddy/Sources/CoucouKit/BotEngine.swiftindex d0852c44..a69e36ce 100644--- a/NotchBuddy/Sources/CoucouKit/BotEngine.swift+++ b/NotchBuddy/Sources/CoucouKit/BotEngine.swift@@ -276,6 +276,19 @@ final class BotEngine: ObservableObject {var isDancing: Bool = falsevar dancingLevel: CGFloat = 0 // 0→1 over 0.3s, 1→0 over 0.5s+ // How the Mac feels (MochiMood.swift): the target is set every frame on the Mac, the+ // levels ease towards it.+ var moodTarget = MochiMood.calm+ var moodBusy: CGFloat = 0+ var moodHot: CGFloat = 0+ var moodFull: CGFloat = 0+ var moodTired: CGFloat = 0+ var nextMoodSweat: Double = 0+ var nextMoodYawn: Double = 0+ // Focus headphones: 1 while a Focus session runs.+ var headphonesTarget: CGFloat = 0+ var headphones: CGFloat = 0+// Mini wandering look (random, ignores mouse)var miniLookTarget: CGPoint = .zerovar miniLookNextTime: Double = 0@@ -989,6 +1002,9 @@ final class BotEngine: ObservableObject {doMiniBehaviorLoop()}+ // The Mac's mood (sweat, puffed up, tired) adjusts the targets above.+ updateMood(dt: dt, now: now, t: t)+// Smooth looklet kLook = CGFloat(1 - pow(0.0025, dt))let kGen = CGFloat(1 - pow(0.0008, dt))@@ -1109,8 +1125,11 @@ final class BotEngine: ObservableObject {drawBody(ctx: &ctx, path: bodyPath, R: R, rx: rx, ry: ry,pumpkinColors: outfit == .pumpkin && !isMini)+ // A warm Mac flushes him (MochiMood.swift).+ drawMoodTint(ctx: &ctx, path: bodyPath, rx: rx, ry: ry)+// Blush — always shows a floor proportional to tint (prototype behaviour)- let blushVal = max(blush, tint * 0.5) * (1 - morph)+ let blushVal = max(blush, tint * 0.5, moodHot * 0.85) * (1 - morph)if blushVal > 0.01 {drawBlush(ctx: &ctx, path: bodyPath, rx: rx, ry: ry, R: R, blush: blushVal)}@@ -1285,6 +1304,9 @@ final class BotEngine: ObservableObject {drawBadge(context: context, size: size, badge: badge, R: R, rx: rx, ry: ry, cx: cx, cy: cy)}+ // Heat waves and the Focus headphones (MochiMood.swift)+ drawMoodExtras(context: context, R: R, rx: rx, ry: ry, cx: cx, cy: cy)+// ParticlesdrawParticles(context: context, size: size, R: R, cx: cx, cy: cy)}diff --git a/NotchBuddy/Sources/CoucouKit/IslandTypes.swift b/NotchBuddy/Sources/CoucouKit/IslandTypes.swiftindex 2921802d..5efd0efa 100644--- a/NotchBuddy/Sources/CoucouKit/IslandTypes.swift+++ b/NotchBuddy/Sources/CoucouKit/IslandTypes.swift@@ -14,6 +14,7 @@ enum IslandView: String, CaseIterable {case searching, result, note, settings, greeting, wardrobe, recapcase listening // voice wake detected — "À l'écoute…" with live transcriptcase voiceResult // voice command executed — "✓ Musique lancée" for ~2 s+ case capture // a screen capture just taken (⌃⌥X): paste, copy, annotate, ask Claude}// MARK: - Bot State@@ -237,6 +238,8 @@ enum IslandConst {.listening: ViewLayout(height: 160, botX: 68, botY: nil, botDiameter: 58, agentMode: .none),// Voice result: same layout as listening — Mochi on left, ✓/✗ on right.voiceResult: ViewLayout(height: 160, botX: 68, botY: nil, botDiameter: 58, agentMode: .none),+ // Screen capture: Mochi on the left (he just swallowed it), the image and what to do with it+ .capture: ViewLayout(height: 160, botX: 58, botY: nil, botDiameter: 52, agentMode: .none),]// Project colors — keyed by lowercase display name or slugdiff --git a/NotchBuddy/Sources/CoucouKit/MochiMood.swift b/NotchBuddy/Sources/CoucouKit/MochiMood.swiftnew file mode 100644index 00000000..80615391--- /dev/null+++ b/NotchBuddy/Sources/CoucouKit/MochiMood.swift@@ -0,0 +1,154 @@+import QuartzCore+import SwiftUI++/// How the Mac feels, as Mochi shows it. Each level runs from 0 (not at all) to 1.+/// The Mac reads it (MachineVitals); the iPhone never sets it, so Mochi stays calm there.+struct MochiMood: Equatable, Sendable {+ /// The processor is at full load: Mochi sweats and breathes fast.+ var busy: CGFloat = 0+ /// The Mac is warm: Mochi flushes red, with heat waves above his head.+ var hot: CGFloat = 0+ /// Memory is short: Mochi puffs up, like after a big meal.+ var full: CGFloat = 0+ /// The battery is low: heavy eyelids, a yawn now and then.+ var tired: CGFloat = 0+ /// The battery is nearly empty: Mochi sleeps.+ var asleep = false++ static let calm = MochiMood()+}++// MARK: - Mochi's moods and the Focus headphones++extension BotEngine {+ /// States where the Mac's mood shows: Mochi is not asking for anything.+ private var moodShows: Bool {+ switch state {+ case .idle, .working, .thinking, .searching, .finished: return true+ default: return false+ }+ }++ /// Eases the mood levels towards `moodTarget` and plays their small animations.+ /// Called from `update` before the look and the body scale are smoothed.+ func updateMood(dt: Double, now: Double, t: CGFloat) {+ guard !isMini else { return }+ let shows = moodShows+ let calmState = state == .idle || state == .finished+ let target = moodTarget+ let k = CGFloat(1 - pow(0.25, dt))+ moodBusy += ((shows ? target.busy : 0) - moodBusy) * k+ moodHot += ((shows ? target.hot : 0) - moodHot) * k+ moodFull += ((shows ? target.full : 0) - moodFull) * k+ moodTired += ((calmState ? target.tired : 0) - moodTired) * k+ let sleeping = calmState && target.asleep+ headphones += (headphonesTarget - headphones) * CGFloat(1 - pow(0.02, dt))++ // Busy: quick, short breaths and a drop of sweat every second or so.+ if moodBusy > 0.02, !locks.contains("sy"), !locks.contains("sx") {+ let pant = sin(t * 7.5) * 0.028 * moodBusy+ tgSy += pant+ tgSx -= pant * 0.6+ }+ // Full memory: puffed up.+ if moodFull > 0.02 {+ tgSx *= 1 + 0.07 * moodFull+ tgSy *= 1 - 0.035 * moodFull+ }+ if now > nextMoodSweat {+ if moodBusy > 0.5 || moodHot > 0.6 {+ emit(.sweat, count: 1)+ nextMoodSweat = now + (moodBusy > 0.5 ? 0.9 : 1.6) + Double.random(in: 0...0.5)+ } else {+ nextMoodSweat = now + 0.5+ }+ }++ // Low battery: heavy eyes, the odd yawn; nearly empty: asleep with his z's.+ let ownEye = eyeOverride == nil || eyeOverride == .tired || eyeOverride == .closed+ if sleeping {+ if ownEye { eyeOverride = .closed; eyeOverrideUntil = now + 0.4 }+ tgYaw = 0+ tgPitch = -0.14+ if now > nextMoodYawn {+ emit(.z, count: 1)+ nextMoodYawn = now + 1.6+ }+ } else if moodTired > 0.5 {+ if ownEye { eyeOverride = .tired; eyeOverrideUntil = now + 0.4 }+ tgPitch -= 0.06 * moodTired+ if now > nextMoodYawn {+ if nextMoodYawn > 0 { triggerEmote(.yawn, silent: true) }+ nextMoodYawn = now + 24 + Double.random(in: 0...12)+ }+ }+ }++ /// Red cheeks and a flushed body while the Mac is warm (inside the body's transform).+ func drawMoodTint(ctx: inout GraphicsContext, path: Path, rx: CGFloat, ry: CGFloat) {+ guard moodHot > 0.01, morph < 0.5, !isMini else { return }+ let a = Double(moodHot) * (1 - Double(morph) * 2)+ ctx.fill(path, with: .linearGradient(+ Gradient(stops: [+ .init(color: Color(red: 1, green: 0.36, blue: 0.24).opacity(0.42 * a), location: 0),+ .init(color: Color(red: 1, green: 0.36, blue: 0.24).opacity(0), location: 1),+ ]),+ startPoint: CGPoint(x: 0, y: ry),+ endPoint: CGPoint(x: 0, y: -ry * 0.6)+ ))+ }++ /// What goes over Mochi in world space: heat waves, and the Focus headphones.+ func drawMoodExtras(context: GraphicsContext, R: CGFloat, rx: CGFloat, ry: CGFloat, cx: CGFloat, cy: CGFloat) {+ guard !isMini, morph < 0.3 else { return }+ let now = CGFloat(CACurrentMediaTime() - t0)++ // Heat waves: three wavy lines rising above the head.+ if moodHot > 0.5 {+ let a = Double((moodHot - 0.5) * 2)+ for i in 0..<3 {+ let x0 = cx + CGFloat(i - 1) * R * 0.42+ let phase = now * 3 + CGFloat(i) * 1.7+ let rise = (now * 0.6 + CGFloat(i) * 0.33).truncatingRemainder(dividingBy: 1)+ var wave = Path()+ let top = cy - ry * 1.18 - R * 0.55 * rise+ let len = R * 0.5+ for s in 0...12 {+ let f = CGFloat(s) / 12+ let p = CGPoint(x: x0 + sin(phase + f * 6) * R * 0.07, y: top - f * len)+ if s == 0 { wave.move(to: p) } else { wave.addLine(to: p) }+ }+ var c = context+ c.opacity = a * Double(sin(rise * .pi))+ c.stroke(wave, with: .color(Color(red: 1, green: 0.55, blue: 0.3)),+ style: StrokeStyle(lineWidth: max(1, R * 0.07), lineCap: .round))+ }+ }++ // Focus headphones: a band over the head and a cup on each side.+ guard headphones > 0.01 else { return }+ var c = context+ c.opacity = Double(min(1, headphones * 1.4))+ c.translateBy(x: cx, y: cy - (1 - headphones) * R * 0.8)+ if tilt != 0 { c.rotate(by: .radians(tilt)) }+ c.scaleBy(x: sx, y: sy)+ let shift = sin(yaw) * rx * 0.12+ let dark = Color(red: 0.16, green: 0.17, blue: 0.21)+ let accent = Color(red: 0.655, green: 0.545, blue: 0.98) // #A78BFA+ var band = Path()+ band.move(to: CGPoint(x: -rx * 0.97 + shift, y: -ry * 0.12))+ band.addQuadCurve(to: CGPoint(x: rx * 0.97 + shift, y: -ry * 0.12),+ control: CGPoint(x: shift, y: -ry * 1.95))+ c.stroke(band, with: .color(dark), style: StrokeStyle(lineWidth: R * 0.14, lineCap: .round))+ c.stroke(band, with: .color(Color.white.opacity(0.18)), style: StrokeStyle(lineWidth: R * 0.04, lineCap: .round))+ for side in [-1.0, 1.0] as [CGFloat] {+ let w = R * 0.32, h = R * 0.62+ let x = side * rx * 0.99 + shift - w / 2+ let rect = CGRect(x: x, y: -ry * 0.12 - h * 0.28, width: w, height: h)+ let cup = Path(roundedRect: rect, cornerRadius: w * 0.45)+ c.fill(cup, with: .color(dark))+ let pad = Path(roundedRect: rect.insetBy(dx: w * 0.22, dy: h * 0.16), cornerRadius: w * 0.3)+ c.fill(pad, with: .color(accent.opacity(0.9)))+ }+ }+}