26 lines
630 B
Swift
26 lines
630 B
Swift
import SwiftUI
|
|
|
|
@main
|
|
struct MacMonitorApp: App {
|
|
@State private var store = SystemTelemetryStore.shared
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
ContentView()
|
|
}
|
|
.windowStyle(.titleBar)
|
|
.windowToolbarStyle(.unified)
|
|
.defaultSize(width: 960, height: 640)
|
|
|
|
MenuBarExtra {
|
|
QuickGlancePopoverView(store: store)
|
|
} label: {
|
|
MenuBarStatusView(
|
|
cpuLoad: store.cpuLoad.totalLoad,
|
|
memoryPercent: store.memory.utilizationPercentage
|
|
)
|
|
}
|
|
.menuBarExtraStyle(.window)
|
|
}
|
|
}
|