Sources/OrgstarWidgets/OrgstarWidgets.swift

cf1c2de361bd33dc4f739537ae53e36a30076444
orgstar/Sources/OrgstarWidgets/OrgstarWidgets.swift

37 lines · 1017 bytes

 1import AppIntents
 2import OrgApp
 3import SwiftUI
 4import WidgetKit
 5
 6/// The agenda and habits on the Home Screen and the Lock Screen, capture and the clock in
 7/// Control Center, and the running clock's Live Activity; on the Mac, the agenda and habits on
 8/// the desktop and in Notification Center.
 9@main
10struct OrgstarWidgets: WidgetBundle {
11    #if APPSTORE
12    /// The App Store app writes the widgets' data to the app group's container.
13    init() {
14        AgendaSnapshot.useGroupContainer = true
15    }
16    #endif
17
18    var body: some Widget {
19        TodayWidget()
20        HabitsWidget()
21        UpNextWidget()
22        FlashcardWidget()
23        #if os(iOS)
24        CaptureWidget()
25        ClockActivityWidget()
26        CaptureControl()
27        ClockControl()
28        #endif
29    }
30}
31
32#if os(iOS)
33/// The App Intents OrgApp declares: the Live Activity's Clock Out button.
34struct OrgstarWidgetIntents: AppIntentsPackage {
35    static var includedPackages: [any AppIntentsPackage.Type] { [OrgAppIntents.self] }
36}
37#endif
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form