import AIDEKit import SwiftUI /// The time in the status bar: a sample plugin for AIDE. final class ClockPlugin: AIDEPlugin { func activate(_ scope: PluginScope) { scope.statusItem("time") { ClockItem() } } } struct ClockItem: View { var body: some View { TimelineView(.everyMinute) { context in Label(context.date.formatted(date: .omitted, time: .shortened), systemImage: "clock") .labelStyle(.titleAndIcon) .font(.caption) .monospacedDigit() } } } @_cdecl("aide_plugin_create") public func aidePluginCreate() -> UnsafeMutableRawPointer { PluginEntry.export { ClockPlugin() } }