Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/CodexBar/PreferencesGeneralPane.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ struct GeneralPane: View {
.foregroundStyle(.secondary)
}
}
PreferenceToggleRow(
title: L("refresh_on_open_title"),
subtitle: L("refresh_on_open_subtitle"),
binding: self.$settings.refreshAllProvidersOnMenuOpen)
PreferenceToggleRow(
title: L("check_provider_status_title"),
subtitle: L("check_provider_status_subtitle"),
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "وتيرة التحديث";
"refresh_cadence_subtitle" = "كم مرة CodexBar استطلاعات في الخلفية.";
"manual_refresh_hint" = "التحديث التلقائي مغلق؛ استخدم أمر التحديث في القائمة.";
"refresh_on_open_title" = "التحديث عند فتح القائمة";
"refresh_on_open_subtitle" = "جلب أحدث بيانات الاستخدام لكل مزوّد في كل مرة تفتح فيها القائمة.";
"check_provider_status_title" = "تحقق من حالة المزود";
"check_provider_status_subtitle" = "استطلاعات OpenAI/Claude صفحات الحالة و Google مساحة العمل Gemini/Antigravity، وتظهر الحوادث في الأيقونة والقائمة.";
"session_quota_notifications_title" = "إشعارات حصص الجلسة";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@
"refresh_cadence_title" = "Freqüència d'actualització";
"refresh_cadence_subtitle" = "Amb quina freqüència el CodexBar consulta els proveïdors en segon pla.";
"manual_refresh_hint" = "L'actualització automàtica està desactivada; feu servir l'ordre Actualitza del menú.";
"refresh_on_open_title" = "Actualitza en obrir el menú";
"refresh_on_open_subtitle" = "Obté l'ús més recent de cada proveïdor cada vegada que obres el menú.";
"check_provider_status_title" = "Comproveu l'estat del proveïdor";
"check_provider_status_subtitle" = "Consulta les pàgines d'estat d'OpenAI/Claude i Google Workspace per a Gemini/Antigravity, mostrant incidències a la icona i al menú.";
"session_quota_notifications_title" = "Notificacions de quota de sessió";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "Aktualisierungsintervall";
"refresh_cadence_subtitle" = "Wie oft CodexBar Anbieter im Hintergrund abfragt.";
"manual_refresh_hint" = "Auto-Aktualisierung ist aus; nutze im Menü den Befehl „Aktualisieren“.";
"refresh_on_open_title" = "Beim Öffnen des Menüs aktualisieren";
"refresh_on_open_subtitle" = "Bei jedem Öffnen des Menüs die aktuelle Nutzung aller Anbieter abrufen.";
"check_provider_status_title" = "Anbieterstatus prüfen";
"check_provider_status_subtitle" = "Prüft OpenAI/Claude-Statusseiten und Google Workspace für Gemini/Antigravity und zeigt Vorfälle in Icon und Menü.";
"session_quota_notifications_title" = "Sitzungs-Quota-Benachrichtigungen";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "Refresh cadence";
"refresh_cadence_subtitle" = "How often CodexBar polls providers in the background.";
"manual_refresh_hint" = "Auto-refresh is off; use the menu's Refresh command.";
"refresh_on_open_title" = "Refresh when the menu opens";
"refresh_on_open_subtitle" = "Fetch the latest usage for every provider each time you open the menu.";
"check_provider_status_title" = "Check provider status";
"check_provider_status_subtitle" = "Polls OpenAI/Claude status pages and Google Workspace for Gemini/Antigravity, surfacing incidents in the icon and menu.";
"session_quota_notifications_title" = "Session quota notifications";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@
"refresh_cadence_title" = "Frecuencia de actualización";
"refresh_cadence_subtitle" = "Con qué frecuencia CodexBar consulta a los proveedores en segundo plano.";
"manual_refresh_hint" = "La actualización automática está desactivada; usa el comando Actualizar del menú.";
"refresh_on_open_title" = "Actualizar al abrir el menú";
"refresh_on_open_subtitle" = "Obtén el uso más reciente de cada proveedor cada vez que abres el menú.";
"check_provider_status_title" = "Comprobar estado del proveedor";
"check_provider_status_subtitle" = "Consulta las páginas de estado de OpenAI/Claude y Google Workspace para Gemini/Antigravity, mostrando incidencias en el icono y el menú.";
"session_quota_notifications_title" = "Notificaciones de cuota de sesión";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/fa.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "کادانس تازه سازی";
"refresh_cadence_subtitle" = "چند وقت یکبار CodexBar ارائه دهندگان نظرسنجی در پس زمینه انجام می دهند.";
"manual_refresh_hint" = "تازه سازی خودکار خاموش است؛ از فرمان تازه سازی منو استفاده کنید.";
"refresh_on_open_title" = "بازخوانی هنگام باز کردن منو";
"refresh_on_open_subtitle" = "هر بار که منو را باز می‌کنید، آخرین میزان مصرف هر ارائه‌دهنده دریافت می‌شود.";
"check_provider_status_title" = "وضعیت ارائه دهنده را بررسی کنید";
"check_provider_status_subtitle" = "نظرسنجی ها OpenAI/Claude صفحات وضعیت و Google Workspace برای Gemini/Antigravity که حوادث را در آیکون و منو نمایش می دهد.";
"session_quota_notifications_title" = "اعلان های سهمیه نشست";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "Fréquence d'actualisation";
"refresh_cadence_subtitle" = "Définit la fréquence à laquelle CodexBar interroge les fournisseurs en arrière-plan.";
"manual_refresh_hint" = "L'actualisation automatique est désactivée ; utilisez la commande Actualiser du menu.";
"refresh_on_open_title" = "Actualiser à l'ouverture du menu";
"refresh_on_open_subtitle" = "Récupère l'utilisation la plus récente de chaque fournisseur à chaque ouverture du menu.";
"check_provider_status_title" = "Vérifier l'état des fournisseurs";
"check_provider_status_subtitle" = "Interroge les pages d'état OpenAI/Claude et Google Workspace pour Gemini/Antigravity, et affiche les incidents dans l'icône et le menu.";
"session_quota_notifications_title" = "Notifications de quota de session";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@
"refresh_cadence_title" = "Frekuensi penyegaran";
"refresh_cadence_subtitle" = "Seberapa sering CodexBar memeriksa penyedia di latar belakang.";
"manual_refresh_hint" = "Penyegaran otomatis nonaktif; gunakan perintah Segarkan di menu.";
"refresh_on_open_title" = "Segarkan saat menu dibuka";
"refresh_on_open_subtitle" = "Ambil penggunaan terbaru untuk setiap penyedia setiap kali Anda membuka menu.";
"check_provider_status_title" = "Periksa status penyedia";
"check_provider_status_subtitle" = "Memeriksa halaman status OpenAI/Claude dan Google Workspace untuk Gemini/Antigravity, menampilkan insiden di ikon dan menu.";
"session_quota_notifications_title" = "Notifikasi kuota sesi";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@
"refresh_cadence_title" = "Frequenza aggiornamento";
"refresh_cadence_subtitle" = "Con quale frequenza CodexBar interroga i provider in background.";
"manual_refresh_hint" = "Aggiornamento automatico disattivato; usa il comando Aggiorna nel menu.";
"refresh_on_open_title" = "Aggiorna all'apertura del menu";
"refresh_on_open_subtitle" = "Recupera l'utilizzo più recente di ogni provider ogni volta che apri il menu.";
"check_provider_status_title" = "Controlla stato provider";
"check_provider_status_subtitle" = "Controlla le pagine di stato OpenAI/Claude e Google Workspace per Gemini/Antigravity, mostrando incidenti in icona e menu.";
"session_quota_notifications_title" = "Notifiche quota sessione";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@
"refresh_cadence_title" = "更新間隔";
"refresh_cadence_subtitle" = "CodexBar がバックグラウンドでプロバイダをポーリングする頻度です。";
"manual_refresh_hint" = "自動更新はオフです。メニューの「更新」コマンドを使用してください。";
"refresh_on_open_title" = "メニューを開いたときに更新";
"refresh_on_open_subtitle" = "メニューを開くたびに、すべてのプロバイダーの最新の使用状況を取得します。";
"check_provider_status_title" = "プロバイダのステータスを確認";
"check_provider_status_subtitle" = "OpenAI/Claude のステータスページと Gemini/Antigravity 用の Google Workspace をポーリングし、障害情報をアイコンとメニューに表示します。";
"session_quota_notifications_title" = "セッションクォータ通知";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@
"refresh_cadence_title" = "새로 고침 주기";
"refresh_cadence_subtitle" = "CodexBar가 백그라운드에서 공급자를 폴링하는 빈도입니다.";
"manual_refresh_hint" = "자동 새로 고침이 꺼져 있습니다. 메뉴의 새로 고침 명령을 사용하세요.";
"refresh_on_open_title" = "메뉴를 열 때 새로 고침";
"refresh_on_open_subtitle" = "메뉴를 열 때마다 모든 공급자의 최신 사용량을 가져옵니다.";
"check_provider_status_title" = "공급자 상태 확인";
"check_provider_status_subtitle" = "OpenAI/Claude 상태 페이지와 Gemini/Antigravity용 Google Workspace를 폴링하여 아이콘과 메뉴에 문제를 표시합니다.";
"session_quota_notifications_title" = "세션 할당량 알림";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "Cadans vernieuwen";
"refresh_cadence_subtitle" = "Hoe vaak CodexBar providers op de achtergrond ondervraagt.";
"manual_refresh_hint" = "Automatisch vernieuwen is uitgeschakeld; gebruik de opdracht Vernieuwen van het menu.";
"refresh_on_open_title" = "Vernieuwen bij openen van menu";
"refresh_on_open_subtitle" = "Haalt bij elke keer dat je het menu opent het meest recente gebruik van elke provider op.";
"check_provider_status_title" = "Controleer de status van de provider";
"check_provider_status_subtitle" = "Polls van OpenAI/Claude-statuspagina's en Google Workspace voor Gemini/Antigravity, waarbij incidenten in het pictogram en het menu worden weergegeven.";
"session_quota_notifications_title" = "Meldingen over sessiequota";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@
"refresh_cadence_title" = "Częstotliwość odświeżania";
"refresh_cadence_subtitle" = "Jak często CodexBar odpyta dostawców w tle.";
"manual_refresh_hint" = "Auto-odświeżanie jest wyłączone; użyj polecenia Odśwież w menu.";
"refresh_on_open_title" = "Odśwież po otwarciu menu";
"refresh_on_open_subtitle" = "Pobiera najnowsze zużycie każdego dostawcy przy każdym otwarciu menu.";
"check_provider_status_title" = "Sprawdzaj status dostawców";
"check_provider_status_subtitle" = "Sprawdza status OpenAI/Claude oraz Google Workspace dla Gemini/Antigravity i pokazuje incydenty na ikonie i w menu.";
"session_quota_notifications_title" = "Powiadomienia o limicie sesji";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@
"refresh_cadence_title" = "Cadência de atualização";
"refresh_cadence_subtitle" = "Frequência com que o CodexBar consulta provedores em segundo plano.";
"manual_refresh_hint" = "A atualização automática está desativada; use Atualizar no menu.";
"refresh_on_open_title" = "Atualizar ao abrir o menu";
"refresh_on_open_subtitle" = "Busca o uso mais recente de cada provedor sempre que você abre o menu.";
"check_provider_status_title" = "Verificar status dos provedores";
"check_provider_status_subtitle" = "Consulta páginas de status da OpenAI/Claude e o Google Workspace para Gemini/Antigravity, exibindo incidentes no ícone e no menu.";
"session_quota_notifications_title" = "Notificações de cota de sessão";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "Uppdateringsintervall";
"refresh_cadence_subtitle" = "Hur ofta CodexBar kontrollerar leverantörer i bakgrunden.";
"manual_refresh_hint" = "Automatisk uppdatering är avstängd. Använd Uppdatera i menyn.";
"refresh_on_open_title" = "Uppdatera när menyn öppnas";
"refresh_on_open_subtitle" = "Hämtar den senaste användningen för varje leverantör varje gång du öppnar menyn.";
"check_provider_status_title" = "Kontrollera leverantörsstatus";
"check_provider_status_subtitle" = "Kontrollerar OpenAI/Claude-statussidor och Google Workspace för Gemini/Antigravity och visar incidenter i ikonen och menyn.";
"session_quota_notifications_title" = "Aviseringar för sessionskvot";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/th.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "จังหวะการรีเฟรช";
"refresh_cadence_subtitle" = "ความถี่ในการ CodexBar ผู้ให้บริการโพลในเบื้องหลัง";
"manual_refresh_hint" = "การรีเฟรชอัตโนมัติปิดอยู่ ใช้คําสั่งรีเฟรชของเมนู";
"refresh_on_open_title" = "รีเฟรชเมื่อเปิดเมนู";
"refresh_on_open_subtitle" = "ดึงข้อมูลการใช้งานล่าสุดของผู้ให้บริการทุกรายทุกครั้งที่คุณเปิดเมนู";
"check_provider_status_title" = "ตรวจสอบสถานะผู้ให้บริการ";
"check_provider_status_subtitle" = "โพล OpenAI/Claude หน้าสถานะและ Google Workspace for Gemini/Antigravity โดยแสดงเหตุการณ์ในไอคอนและเมนู";
"session_quota_notifications_title" = "การแจ้งเตือนโควต้าเซสชัน";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "Yenileme sıklığı";
"refresh_cadence_subtitle" = "CodexBar'ın arka planda sağlayıcıları ne sıklıkla sorgulayacağı.";
"manual_refresh_hint" = "Otomatik yenileme kapalı; menüdeki Yenile komutunu kullanın.";
"refresh_on_open_title" = "Menü açıldığında yenile";
"refresh_on_open_subtitle" = "Menüyü her açtığınızda her sağlayıcının en güncel kullanımını getirir.";
"check_provider_status_title" = "Sağlayıcı durumunu denetle";
"check_provider_status_subtitle" = "OpenAI/Claude durum sayfalarını ve Google Workspace'i (Gemini/Antigravity) sorgular, olayları simge ve menüde gösterir.";
"session_quota_notifications_title" = "Oturum kota bildirimleri";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@
"refresh_cadence_title" = "Оновити каденцію";
"refresh_cadence_subtitle" = "Як часто CodexBar опитує постачальників у фоновому режимі.";
"manual_refresh_hint" = "Автооновлення вимкнено; скористайтеся командою меню «Оновити».";
"refresh_on_open_title" = "Оновлювати при відкритті меню";
"refresh_on_open_subtitle" = "Отримує найновіші дані про використання для кожного провайдера щоразу, коли ви відкриваєте меню.";
"check_provider_status_title" = "Перевірте статус провайдера";
"check_provider_status_subtitle" = "Опитує сторінки статусу OpenAI/Claude і Google Workspace для Gemini/Antigravity, виявляючи інциденти в значку та меню.";
"session_quota_notifications_title" = "Сповіщення про квоту сеансу";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/vi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@
"refresh_cadence_title" = "Nhịp làm mới";
"refresh_cadence_subtitle" = "Tần suất CodexBar thăm dò ý kiến ​​các nhà cung cấp trong nền.";
"manual_refresh_hint" = "Tính năng tự động làm mới bị tắt; sử dụng lệnh Làm mới của menu.";
"refresh_on_open_title" = "Làm mới khi mở menu";
"refresh_on_open_subtitle" = "Tải mức sử dụng mới nhất của mọi nhà cung cấp mỗi khi bạn mở menu.";
"check_provider_status_title" = "Kiểm tra Nhà cung cấp trạng thái";
"check_provider_status_subtitle" = "Thăm dò ý kiến ​​OpenAI / Claude các trang trạng thái và Google Không gian làm việc dành cho Gemini /AntiGravity, phát hiện các sự cố trong biểu tượng và menu.";
"session_quota_notifications_title" = "Thông báo về phiên Hạn mức";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@
"refresh_cadence_title" = "刷新频率";
"refresh_cadence_subtitle" = "CodexBar 在后台轮询提供商的频率。";
"manual_refresh_hint" = "自动刷新已关闭;请使用菜单中的“刷新”命令。";
"refresh_on_open_title" = "打开菜单时刷新";
"refresh_on_open_subtitle" = "每次打开菜单时获取每个提供商的最新用量。";
"check_provider_status_title" = "检查提供商状态";
"check_provider_status_subtitle" = "轮询 OpenAI/Claude 状态页面和 Google Workspace 的 Gemini/Antigravity,在图标和菜单中显示故障信息。";
"session_quota_notifications_title" = "会话配额通知";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CodexBar/Resources/zh-Hant.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@
"refresh_cadence_title" = "重新整理頻率";
"refresh_cadence_subtitle" = "CodexBar 在背景輪詢提供者的頻率。";
"manual_refresh_hint" = "自動重新整理已關閉;請使用選單中的「重新整理」指令。";
"refresh_on_open_title" = "開啟選單時重新整理";
"refresh_on_open_subtitle" = "每次開啟選單時擷取每個供應商的最新用量。";
"check_provider_status_title" = "檢查提供者狀態";
"check_provider_status_subtitle" = "輪詢 OpenAI/Claude 狀態頁面和 Google Workspace 的 Gemini/Antigravity,並在圖示和選單中顯示服務異常資訊。";
"session_quota_notifications_title" = "工作階段配額通知";
Expand Down
10 changes: 10 additions & 0 deletions Sources/CodexBar/SettingsStore+Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ extension SettingsStore {
}
}

/// When enabled, opening the menu refreshes usage for every enabled provider (on top of the
/// periodic refresh clock, which is left untouched). See `scheduleOpenMenuRefresh`.
var refreshAllProvidersOnMenuOpen: Bool {
get { self.defaultsState.refreshAllProvidersOnMenuOpen }
set {
self.defaultsState.refreshAllProvidersOnMenuOpen = newValue
self.userDefaults.set(newValue, forKey: "refreshAllProvidersOnMenuOpen")
}
}

var launchAtLogin: Bool {
get { self.defaultsState.launchAtLogin }
set {
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/SettingsStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ extension SettingsStore {
if Self.isRunningTests, refreshDefault == nil {
userDefaults.set(refreshFrequency.rawValue, forKey: "refreshFrequency")
}
let refreshAllProvidersOnMenuOpen = userDefaults.object(
forKey: "refreshAllProvidersOnMenuOpen") as? Bool ?? false
let launchAtLogin = userDefaults.object(forKey: "launchAtLogin") as? Bool ?? false
let debugMenuEnabled = userDefaults.object(forKey: "debugMenuEnabled") as? Bool ?? false
let debugDisableKeychainAccess = Self.loadDebugDisableKeychainAccess(userDefaults: userDefaults)
Expand Down Expand Up @@ -419,6 +421,7 @@ extension SettingsStore {
let appLanguageRaw = userDefaults.string(forKey: "appLanguage")
return SettingsDefaultsState(
refreshFrequency: refreshFrequency,
refreshAllProvidersOnMenuOpen: refreshAllProvidersOnMenuOpen,
launchAtLogin: launchAtLogin,
debugMenuEnabled: debugMenuEnabled,
debugDisableKeychainAccess: debugDisableKeychainAccess,
Expand Down
1 change: 1 addition & 0 deletions Sources/CodexBar/SettingsStoreState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation

struct SettingsDefaultsState {
var refreshFrequency: RefreshFrequency
var refreshAllProvidersOnMenuOpen: Bool
var launchAtLogin: Bool
var debugMenuEnabled: Bool
var debugDisableKeychainAccess: Bool
Expand Down
Loading