Logo
Explore Help
Sign In
cottongin/luxe-macos-tray-notifier
1
0
Fork 0
You've already forked luxe-macos-tray-notifier
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
d30850d0e3282bbd01a415057127564882d17e2d
luxe-macos-tray-notifier/Sources/LuxeNotifier/LuxeNotifierApp.swift

20 lines
505 B
Swift
Raw Normal View History

Add luxe Notifier: macOS menu bar app that tells you when luxe needs you A luxe hook runs luxe-notify, which sends one JSON line over a Unix socket to a SwiftUI menu bar app. The app shows a banner, keeps a badge count and history, and brings the terminal forward when you click a banner. Notifies on approvals (PermissionRequested), question prompts (BeforeToolUse, matched to the question tool), errors, and turns that run at least --min-seconds (default 30, timed from BeforeAgentStart to AgentEnd). The menu warns when macOS has notifications blocked for the app. The app writes status.txt beside its socket for debugging. Known limits are in README.md and PLAN.md: a crowded menu bar can hide the icon, and the first test build after a change can fail with a TestingMacros error under Command Line Tools, which make test retries once.
2026-10-24 22:41:42 -04:00
import SwiftUI
@main
struct LuxeNotifierApp: App {
@StateObject private var state = AppState()
var body: some Scene {
MenuBarExtra {
MenuContent(state: state)
} label: {
HStack(spacing: 2) {
Image(systemName: state.unseenCount > 0 ? "bell.badge.fill" : "bell")
if state.unseenCount > 0 { Text("\(state.unseenCount)") }
}
.task { state.start() }
}
.menuBarExtraStyle(.window)
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 177ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API