Agenda fixes; hide folders by menu or Focus filter !356

merged merged by cmc on 2026-10-16 17:52 UTC · krz/orgstar:agenda-fixes-and-folders into main

29 files changed, +551 −57

Layout: unified · split

Sources/OrgApp/AgendaModel.swift +24 −4
@@ -36,6 +36,10 @@ public final class AgendaModel {
36 public var startOnWeekday: Int? = 1 36 public var startOnWeekday: Int? = 1
37 /// Files below the top level of each folder are agenda files too. 37 /// Files below the top level of each folder are agenda files too.
38 public var includeSubfolders = false 38 public var includeSubfolders = false
39 /// Files other agenda files archive to are left out.
40 public var excludeArchives = OrgPreferences.agendaExcludeArchives()
41 /// Files in these folders (root paths) are left out; see `HiddenFolders`.
42 public var hiddenFolders: Set<String> = []
39 /// `org-agenda-files`: when not empty, the agenda reads these instead of the folders' files. 43 /// `org-agenda-files`: when not empty, the agenda reads these instead of the folders' files.
40 public var agendaFiles = OrgPreferences.agendaFiles() 44 public var agendaFiles = OrgPreferences.agendaFiles()
41 public var options = AgendaOptions() 45 public var options = AgendaOptions()
@@ -66,7 +70,10 @@ public final class AgendaModel {
66 70
67 /// Org files directly in each folder (or below it, with `includeSubfolders`), by path, as 71 /// Org files directly in each folder (or below it, with `includeSubfolders`), by path, as
68 /// Emacs lists a directory in `org-agenda-files`. 72 /// Emacs lists a directory in `org-agenda-files`.
69 public var files: [String] { workspace.agendaFilePaths(list: agendaFiles, includeSubfolders: includeSubfolders) } 73 public var files: [String] {
74 let paths = workspace.agendaFilePaths(list: agendaFiles, includeSubfolders: includeSubfolders)
75 return hiddenFolders.isEmpty ? paths : paths.filter { !HiddenFolders.hides(hiddenFolders, path: $0) }
76 }
70 77
71 /// Recomputes the days. `open` is the open buffers' text by path. 78 /// Recomputes the days. `open` is the open buffers' text by path.
72 public func refresh(open: [String: String], now: Date = Date(), calendar: Calendar = .current) async { 79 public func refresh(open: [String: String], now: Date = Date(), calendar: Calendar = .current) async {
@@ -137,10 +144,17 @@ public final class AgendaModel {
137 isComputing = false 144 isComputing = false
138 } 145 }
139 146
140 /// Reminders for the timed entries of the next `days` days. 147 /// Reminders for the timed entries of the next `days` days, each with the folder it is in.
141 public func reminders(open: [String: String], now: Date = Date(), calendar: Calendar = .current, days: Int = 7, lead: Int = 12) async -> [Reminder] { 148 public func reminders(open: [String: String], now: Date = Date(), calendar: Calendar = .current, days: Int = 7, lead: Int = 12) async -> [Reminder] {
142 let all = await sources(open: open) 149 let all = await sources(open: open)
143 return await Task.detached { Reminders.upcoming(all, now: now, calendar: calendar, days: days, lead: lead) }.value 150 let roots = workspace.rootPaths
151 return await Task.detached {
152 Reminders.upcoming(all, now: now, calendar: calendar, days: days, lead: lead).map { reminder in
153 var reminder = reminder
154 reminder.folder = roots.first { HiddenFolders.hides([$0], path: reminder.path) }
155 return reminder
156 }
157 }.value
144 } 158 }
145 159
146 /// The habits of the agenda files, file by file. 160 /// The habits of the agenda files, file by file.
@@ -207,7 +221,13 @@ public final class AgendaModel {
207 cache.open[source.path] = (defaults, blocking, source.source) 221 cache.open[source.path] = (defaults, blocking, source.source)
208 } 222 }
209 } 223 }
210 return loaded.map(\.source) 224 var sources = loaded.map(\.source)
225 if excludeArchives {
226 let location = OrgPreferences.options().archiveLocation ?? "%s_archive::"
227 let archives = Set(sources.flatMap { $0.archiveFiles(location: location) })
228 sources.removeAll { archives.contains($0.path) }
229 }
230 return sources
211 } 231 }
212 232
213 /// The days as rows with the events, empty days hidden unless `showAllDates`; see 233 /// The days as rows with the events, empty days hidden unless `showAllDates`; see
Sources/OrgApp/HiddenFolders.swift added +40
@@ -0,0 +1,40 @@
1import Foundation
2import Observation
3
4/// The folders the agenda leaves out on this device, by root path: the ones hidden from the
5/// agenda's folder menu and the ones the active Focus filter hides. A folder either hides is
6/// hidden. Reminders stay on for both; the Focus filter mutes its folders' through the
7/// system, by each notification's `filterCriteria`.
8@MainActor
9@Observable
10public final class HiddenFolders {
11 public static let shared = HiddenFolders()
12
13 /// Hidden from the agenda's folder menu.
14 public var manual: Set<String> { didSet { defaults.set(manual.sorted(), forKey: Self.manualKey) } }
15 /// Hidden by the active Focus filter.
16 public var focus: Set<String> { didSet { defaults.set(focus.sorted(), forKey: Self.focusKey) } }
17
18 public var all: Set<String> { manual.union(focus) }
19
20 static let manualKey = "agendaHiddenFolders"
21 static let focusKey = "agendaFocusHiddenFolders"
22 @ObservationIgnored private let defaults: UserDefaults
23
24 public init(defaults: UserDefaults = .standard) {
25 self.defaults = defaults
26 manual = Set(defaults.stringArray(forKey: Self.manualKey) ?? [])
27 focus = Set(defaults.stringArray(forKey: Self.focusKey) ?? [])
28 }
29
30 /// `path` is one of `folders` or inside one.
31 public nonisolated static func hides(_ folders: Set<String>, path: String) -> Bool {
32 folders.contains { path == $0 || path.hasPrefix($0.hasSuffix("/") ? $0 : $0 + "/") }
33 }
34
35 /// For a Focus filter's app context: notifications whose `filterCriteria` (their folder) is
36 /// not one of `folders`.
37 public nonisolated static func notificationPredicate(hiding folders: Set<String>) -> NSPredicate {
38 NSPredicate(format: "NOT (SELF IN %@)", folders.sorted())
39 }
40}
Sources/OrgApp/OrgPreferences.swift +2
@@ -95,6 +95,8 @@ public enum OrgPreferences {
95 return words == ["t"] || words.isEmpty ? [] : Set(words) 95 return words == ["t"] || words.isEmpty ? [] : Set(words)
96 } 96 }
97 public static func agendaSubfolders(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSubfolders", defaults) } 97 public static func agendaSubfolders(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSubfolders", defaults) }
98 /// The agenda leaves out the files other agenda files archive to.
99 public static func agendaExcludeArchives(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaExcludeArchives", defaults) }
98 /// `org-agenda-show-all-dates`: days without entries show. 100 /// `org-agenda-show-all-dates`: days without entries show.
99 public static func agendaShowAllDates(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaShowAllDates", defaults) } 101 public static func agendaShowAllDates(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaShowAllDates", defaults) }
100 public static func agendaSkipScheduledIfDone(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSkipScheduledIfDone", defaults) } 102 public static func agendaSkipScheduledIfDone(_ defaults: UserDefaults = .standard) -> Bool { bool("agendaSkipScheduledIfDone", defaults) }
Sources/OrgApp/ReminderScheduler.swift +1
@@ -99,6 +99,7 @@ public struct SystemReminderCenter: ReminderCenter {
99 content.body = reminder.body 99 content.body = reminder.body
100 content.sound = .default 100 content.sound = .default
101 content.userInfo = ["path": reminder.path, "offset": reminder.offset] 101 content.userInfo = ["path": reminder.path, "offset": reminder.offset]
102 if let folder = reminder.folder { content.filterCriteria = folder }
102 let components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: reminder.fireDate) 103 let components = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute, .second], from: reminder.fireDate)
103 let trigger = UNCalendarNotificationTrigger(dateMatching: components, repeats: false) 104 let trigger = UNCalendarNotificationTrigger(dateMatching: components, repeats: false)
104 try await UNUserNotificationCenter.current().add(UNNotificationRequest(identifier: reminder.id, content: content, trigger: trigger)) 105 try await UNUserNotificationCenter.current().add(UNNotificationRequest(identifier: reminder.id, content: content, trigger: trigger))
Sources/OrgApp/UserConfig.swift +2
@@ -348,6 +348,8 @@ public enum UserConfig {
348 comment: "folder names never listed or searched, separated by spaces", legacy: ""), 348 comment: "folder names never listed or searched, separated by spaces", legacy: ""),
349 Setting(section: "orgstar", key: "agenda-include-subfolders", defaultsKey: "agendaSubfolders", kind: .bool, fallback: .bool(false), 349 Setting(section: "orgstar", key: "agenda-include-subfolders", defaultsKey: "agendaSubfolders", kind: .bool, fallback: .bool(false),
350 comment: "the agenda reads org files in subfolders too", legacy: "agenda.include-subfolders"), 350 comment: "the agenda reads org files in subfolders too", legacy: "agenda.include-subfolders"),
351 Setting(section: "orgstar", key: "agenda-exclude-archives", defaultsKey: "agendaExcludeArchives", kind: .bool, fallback: .bool(false),
352 comment: "the agenda leaves out files that other agenda files archive to (#+ARCHIVE:, org-archive-location)", legacy: ""),
351 Setting(section: "orgstar", key: "reminders", defaultsKey: "reminders", kind: .bool, fallback: .bool(true), 353 Setting(section: "orgstar", key: "reminders", defaultsKey: "reminders", kind: .bool, fallback: .bool(true),
352 comment: "notify before timed entries", legacy: "agenda.reminders"), 354 comment: "notify before timed entries", legacy: "agenda.reminders"),
353 Setting(section: "orgstar", key: "calendar-events", defaultsKey: "calendarEvents", kind: .bool, fallback: .bool(false), 355 Setting(section: "orgstar", key: "calendar-events", defaultsKey: "calendarEvents", kind: .bool, fallback: .bool(false),
Sources/OrgApp/WorkspaceModel.swift +9 −1
@@ -64,13 +64,21 @@ public final class WorkspaceModel {
64 } 64 }
65 65
66 /// `~/Library/Application Support/Orgstar`, or `ORGSTAR_DATA_DIR` when set (for development). 66 /// `~/Library/Application Support/Orgstar`, or `ORGSTAR_DATA_DIR` when set (for development).
67 public static var defaultDirectory: URL { 67 public nonisolated static var defaultDirectory: URL {
68 if let override = ProcessInfo.processInfo.environment["ORGSTAR_DATA_DIR"] { 68 if let override = ProcessInfo.processInfo.environment["ORGSTAR_DATA_DIR"] {
69 return URL(fileURLWithPath: override) 69 return URL(fileURLWithPath: override)
70 } 70 }
71 return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0].appendingPathComponent("Orgstar") 71 return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0].appendingPathComponent("Orgstar")
72 } 72 }
73 73
74 /// The resolved paths of the roots saved in `directory`, without opening the index: for
75 /// App Intents, which may run before the app's models.
76 public nonisolated static func savedRootPaths(in directory: URL = defaultDirectory) -> [String] {
77 guard let data = try? Data(contentsOf: directory.appendingPathComponent("roots.json")),
78 let roots = try? JSONDecoder().decode([WorkspaceRoot].self, from: data) else { return [] }
79 return roots.compactMap { try? $0.resolve().url.path }.sorted()
80 }
81
74 // MARK: - Roots 82 // MARK: - Roots
75 83
76 public func addRoot(_ url: URL) async throws { 84 public func addRoot(_ url: URL) async throws {
Sources/OrgCore/Agenda/AgendaSource.swift +15
@@ -101,6 +101,12 @@ public struct AgendaSource: Sendable {
101 101
102 let headings: [Heading] 102 let headings: [Heading]
103 103
104 /// The other files this one archives to, as `org-all-archive-files` names them, with
105 /// `location` (`org-archive-location`) when the file sets none.
106 public func archiveFiles(location: String) -> [String] {
107 ([archiveKeyword ?? location] + archiveProperties).compactMap { Archive.archiveFile($0, sourcePath: path) }.filter { $0 != path }
108 }
109
104 /// The file's habits not done and not in skipped trees: their titles, heading offsets and 110 /// The file's habits not done and not in skipped trees: their titles, heading offsets and
105 /// what their consistency graphs are drawn from. 111 /// what their consistency graphs are drawn from.
106 public var habits: [(title: String, offset: Int, habit: Habit)] { 112 public var habits: [(title: String, offset: Int, habit: Habit)] {
@@ -121,6 +127,9 @@ public struct AgendaSource: Sendable {
121 let firstDone: [String: String] 127 let firstDone: [String: String]
122 /// The file's text, for the search view. 128 /// The file's text, for the search view.
123 public let text: String 129 public let text: String
130 /// The archive locations the file names: its `#+ARCHIVE:`, then each `:ARCHIVE:` property's.
131 let archiveKeyword: String?
132 let archiveProperties: [String]
124 let priorities: Priorities 133 let priorities: Priorities
125 134
126 /// `checksBlocking` false leaves every heading unblocked, for when neither enforce 135 /// `checksBlocking` false leaves every heading unblocked, for when neither enforce
@@ -159,6 +168,7 @@ public struct AgendaSource: Sendable {
159 func sectionStamps(_ index: Int) -> [String] { stampsByHeading[index] ?? [] } 168 func sectionStamps(_ index: Int) -> [String] { stampsByHeading[index] ?? [] }
160 169
161 var keywordCategory = SetupFile.keywords(tree.settings.setupKeywords).last { $0.key == "CATEGORY" }?.value.trimmingCharacters(in: .whitespaces) 170 var keywordCategory = SetupFile.keywords(tree.settings.setupKeywords).last { $0.key == "CATEGORY" }?.value.trimmingCharacters(in: .whitespaces)
171 var archiveKeyword: String?
162 var srcBodies: [Range<Int>] = [] 172 var srcBodies: [Range<Int>] = []
163 var planningLines: [Range<Int>] = [] 173 var planningLines: [Range<Int>] = []
164 var timestampNodes: [Int] = [] 174 var timestampNodes: [Int] = []
@@ -170,6 +180,8 @@ public struct AgendaSource: Sendable {
170 let line = child.text.trimmingCharacters(in: .whitespacesAndNewlines) 180 let line = child.text.trimmingCharacters(in: .whitespacesAndNewlines)
171 if line.uppercased().hasPrefix("#+CATEGORY:") { 181 if line.uppercased().hasPrefix("#+CATEGORY:") {
172 keywordCategory = line.dropFirst("#+CATEGORY:".count).trimmingCharacters(in: .whitespaces) 182 keywordCategory = line.dropFirst("#+CATEGORY:".count).trimmingCharacters(in: .whitespaces)
183 } else if archiveKeyword == nil, line.uppercased().hasPrefix("#+ARCHIVE:") {
184 archiveKeyword = line.dropFirst("#+ARCHIVE:".count).trimmingCharacters(in: .whitespaces)
173 } 185 }
174 case .block: 186 case .block:
175 if DocumentModel.isSrcBlock(child) { 187 if DocumentModel.isSrcBlock(child) {
@@ -289,6 +301,9 @@ public struct AgendaSource: Sendable {
289 )) 301 ))
290 } 302 }
291 self.headings = headings 303 self.headings = headings
304 self.archiveKeyword = archiveKeyword
305 ?? SetupFile.keywords(tree.settings.setupKeywords).last { $0.key == "ARCHIVE" }?.value.trimmingCharacters(in: .whitespaces)
306 archiveProperties = (model.property("ARCHIVE", of: nil).map { [$0.value] } ?? []) + headings.compactMap { $0.properties["ARCHIVE"] }
292 307
293 let starts = model.headings.map(\.headingRange.lowerBound) 308 let starts = model.headings.map(\.headingRange.lowerBound)
294 func heading(at offset: Int) -> Int? { 309 func heading(at offset: Int) -> Int? {
Sources/OrgCore/Agenda/Reminders.swift +7 −4
@@ -10,6 +10,8 @@ public struct Reminder: Sendable, Equatable {
10 public let body: String 10 public let body: String
11 public let path: String 11 public let path: String
12 public let offset: Int 12 public let offset: Int
13 /// The folder the entry's file is in, for Focus filters to mute.
14 public var folder: String?
13 15
14 public init(id: String, fireDate: Date, eventDate: Date, title: String, body: String, path: String, offset: Int) { 16 public init(id: String, fireDate: Date, eventDate: Date, title: String, body: String, path: String, offset: Int) {
15 self.id = id 17 self.id = id
@@ -43,11 +45,12 @@ public enum Reminders {
43 event > now else { continue } 45 event > now else { continue }
44 let fire = max(event.addingTimeInterval(-Double((item.warntime ?? lead) * 60)), now.addingTimeInterval(1)) 46 let fire = max(event.addingTimeInterval(-Double((item.warntime ?? lead) * 60)), now.addingTimeInterval(1))
45 let clockText = String(format: "%d:%02d", time / 100, time % 100) 47 let clockText = String(format: "%d:%02d", time / 100, time % 100)
46 let title = item.text.trimmingCharacters(in: .whitespaces) 48 // `Scheduled:` reads `Scheduled` beside the time.
47 let leader = item.extra.trimmingCharacters(in: .whitespaces) 49 var leader = item.extra.trimmingCharacters(in: .whitespaces)
50 if leader.hasSuffix(":") { leader.removeLast() }
48 reminders.append(Reminder( 51 reminders.append(Reminder(
49 id: "orgstar.\(path)|\(item.headingLine ?? title)|\(day.day)|\(time)|\(item.kind.rawValue)", 52 id: "orgstar.\(path)|\(item.headingLine ?? item.text.trimmingCharacters(in: .whitespaces))|\(day.day)|\(time)|\(item.kind.rawValue)",
50 fireDate: fire, eventDate: event, title: title, 53 fireDate: fire, eventDate: event, title: item.title,
51 body: ([clockText] + (leader.isEmpty ? [] : [leader]) + [item.category]).joined(separator: " · "), 54 body: ([clockText] + (leader.isEmpty ? [] : [leader]) + [item.category]).joined(separator: " · "),
52 path: path, offset: item.markerOffset ?? item.headingOffset ?? 0 55 path: path, offset: item.markerOffset ?? item.headingOffset ?? 0
53 )) 56 ))
Sources/Orgstar/AgendaView+Toolbar.swift +36
@@ -63,6 +63,7 @@ extension AgendaView {
63 } 63 }
64 } 64 }
65 } 65 }
66 if workspace.rootPaths.count > 1 || hidesFolders { foldersMenu }
66 Menu { 67 Menu {
67 Button("Filter…") { askFilter("/") } 68 Button("Filter…") { askFilter("/") }
68 Button("By Tag…") { askFilter("\\") } 69 Button("By Tag…") { askFilter("\\") }
@@ -81,6 +82,41 @@ extension AgendaView {
81 } 82 }
82 } 83 }
83 84
85 /// Shows or hides each folder's files; folders the Focus hides stay hidden.
86 private var foldersMenu: some View {
87 let hidden = HiddenFolders.shared
88 return Menu {
89 Button("All Folders") { hidden.manual = [] }
90 .disabled(hidden.manual.isEmpty)
91 Divider()
92 ForEach(workspace.rootPaths, id: \.self) { root in
93 Toggle((root as NSString).lastPathComponent, isOn: Binding {
94 !hidden.all.contains(root)
95 } set: { shown in
96 if shown { hidden.manual.remove(root) } else { hidden.manual.insert(root) }
97 })
98 .disabled(hidden.focus.contains(root))
99 }
100 if !hidden.focus.isDisjoint(with: workspace.rootPaths) {
101 Divider()
102 Text("Dimmed folders are hidden by the current Focus.")
103 }
104 } label: {
105 Label("Folders", systemImage: hidesFolders ? "folder.fill" : "folder")
106 }
107 .help("The folders the agenda shows")
108 }
109
110 /// Some folder is hidden.
111 var hidesFolders: Bool { !HiddenFolders.shared.all.isDisjoint(with: workspace.rootPaths) }
112
113 /// The folders shown, by name, while some are hidden.
114 var shownFolders: String? {
115 guard hidesFolders else { return nil }
116 let shown = workspace.rootPaths.filter { !HiddenFolders.shared.all.contains($0) }
117 return shown.isEmpty ? "No folders" : shown.map { ($0 as NSString).lastPathComponent }.joined(separator: ", ")
118 }
119
84 /// The span shown, as the window's title: `Week of 5 Oct 2026`. 120 /// The span shown, as the window's title: `Week of 5 Oct 2026`.
85 var title: String { 121 var title: String {
86 guard isAgenda else { return viewName.replacingOccurrences(of: "…", with: "") } 122 guard isAgenda else { return viewName.replacingOccurrences(of: "…", with: "") }
Sources/Orgstar/AgendaView.swift +43 −12
@@ -141,6 +141,7 @@ struct AgendaView: View {
141 var startOffset: Int 141 var startOffset: Int
142 var startOnWeekday: String 142 var startOnWeekday: String
143 var includeSubfolders: Bool 143 var includeSubfolders: Bool
144 var hidden: Set<String>
144 var prefix: [String] 145 var prefix: [String]
145 var settings: [String] 146 var settings: [String]
146 var logMode: Bool 147 var logMode: Bool
@@ -156,7 +157,7 @@ struct AgendaView: View {
156 /// they redraw only it. 157 /// they redraw only it.
157 private var refreshKey: RefreshKey { 158 private var refreshKey: RefreshKey {
158 RefreshKey( 159 RefreshKey(
159 mode: agenda.mode, start: agenda.start, span: span, startOffset: startOffset, startOnWeekday: startOnWeekday, includeSubfolders: includeSubfolders, prefix: [prefixAgenda, prefixTodo, prefixTags], 160 mode: agenda.mode, start: agenda.start, span: span, startOffset: startOffset, startOnWeekday: startOnWeekday, includeSubfolders: includeSubfolders, hidden: HiddenFolders.shared.all, prefix: [prefixAgenda, prefixTodo, prefixTags],
160 settings: [sortAgenda, sortTodo, sortTags, sortSearch, gridWhen, gridTimes, "\(useTimeGrid) \(showCurrentTime)", stuckMatch, stuckTodo, stuckTags, stuckRegexp, agendaFileList], 161 settings: [sortAgenda, sortTodo, sortTags, sortSearch, gridWhen, gridTimes, "\(useTimeGrid) \(showCurrentTime)", stuckMatch, stuckTodo, stuckTags, stuckRegexp, agendaFileList],
161 logMode: logMode, 162 logMode: logMode,
162 calendars: (calendarEventsOn ? [calendarNames] : []) + (remindersOn ? ["reminders", reminderListNames] : []), files: 0, changed: nil, edits: 0, path: nil, tick: tick 163 calendars: (calendarEventsOn ? [calendarNames] : []) + (remindersOn ? ["reminders", reminderListNames] : []), files: 0, changed: nil, edits: 0, path: nil, tick: tick
@@ -168,6 +169,8 @@ struct AgendaView: View {
168 agenda.startOffset = startOffset 169 agenda.startOffset = startOffset
169 agenda.startOnWeekday = Int(startOnWeekday) 170 agenda.startOnWeekday = Int(startOnWeekday)
170 agenda.includeSubfolders = includeSubfolders 171 agenda.includeSubfolders = includeSubfolders
172 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
173 agenda.hiddenFolders = HiddenFolders.shared.all
171 agenda.agendaFiles = OrgPreferences.agendaFiles() 174 agenda.agendaFiles = OrgPreferences.agendaFiles()
172 agenda.options.prefixFormat = ["agenda": prefixAgenda, "todo": prefixTodo, "tags": prefixTags] 175 agenda.options.prefixFormat = ["agenda": prefixAgenda, "todo": prefixTodo, "tags": prefixTags]
173 agenda.options.logMode = logMode 176 agenda.options.logMode = logMode
@@ -229,11 +232,20 @@ struct AgendaView: View {
229 232
230 // MARK: - Lines 233 // MARK: - Lines
231 234
232 /// A selectable line: its selection id, the row, and the day it is on. 235 /// A selectable line: its selection id, the row, and the day it is on. `key`, the view's
236 /// identity, follows the row where `id` follows its place; nil uses `id`.
233 struct Line { 237 struct Line {
234 let id: String 238 let id: String
235 let row: AgendaRow 239 let row: AgendaRow
236 let day: Int 240 let day: Int
241 var key: String?
242
243 var viewID: String { key ?? id }
244 }
245
246 /// A day row's view identity.
247 static func key(_ row: AgendaRow, day: Int, prefix: String, overdue: Bool = false) -> String {
248 "\(prefix)\(day):\(overdue ? "o" : "")\(row.id)"
237 } 249 }
238 250
239 private var groups: [AgendaDayGroup] { 251 private var groups: [AgendaDayGroup] {
@@ -260,11 +272,19 @@ struct AgendaView: View {
260 272
261 private func dayLines(_ groups: [AgendaDayGroup], prefix: String) -> [Line] { 273 private func dayLines(_ groups: [AgendaDayGroup], prefix: String) -> [Line] {
262 groups.flatMap { group in 274 groups.flatMap { group in
263 (overdueShown ? group.overdue.enumerated().map { Line(id: "\(prefix)\(group.day):o\($0.offset)", row: $0.element, day: group.day) } : []) 275 (overdueShown ? group.overdue.enumerated().map { dayLine(group, $0.offset, prefix: prefix, overdue: true) } : [])
264 + group.rows.enumerated().map { Line(id: "\(prefix)\(group.day):\($0.offset)", row: $0.element, day: group.day) } 276 + group.rows.indices.map { dayLine(group, $0, prefix: prefix) }
265 } 277 }
266 } 278 }
267 279
280 private func dayLine(_ group: AgendaDayGroup, _ index: Int, prefix: String, overdue: Bool = false) -> Line {
281 let row = overdue ? group.overdue[index] : group.rows[index]
282 return Line(
283 id: "\(prefix)\(group.day):\(overdue ? "o" : "")\(index)", row: row, day: group.day,
284 key: Self.key(row, day: group.day, prefix: prefix, overdue: overdue)
285 )
286 }
287
268 func line(_ id: String) -> Line? { lines(groups).first { $0.id == id } } 288 func line(_ id: String) -> Line? { lines(groups).first { $0.id == id } }
269 289
270 var body: some View { 290 var body: some View {
@@ -311,7 +331,7 @@ struct AgendaView: View {
311 .padding(.bottom, 12) 331 .padding(.bottom, 12)
312 } 332 }
313 .onChange(of: selection) { 333 .onChange(of: selection) {
314 if let selection { proxy.scrollTo(selection) } 334 if let selection { proxy.scrollTo(line(selection)?.viewID ?? selection) }
315 } 335 }
316 .onChange(of: agenda.days.first?.day) { 336 .onChange(of: agenda.days.first?.day) {
317 if groups.contains(where: \.isToday) { proxy.scrollTo("day\(agenda.today)", anchor: .top) } 337 if groups.contains(where: \.isToday) { proxy.scrollTo("day\(agenda.today)", anchor: .top) }
@@ -335,8 +355,10 @@ struct AgendaView: View {
335 } 355 }
336 .toolbar { toolbar } 356 .toolbar { toolbar }
337 .overlay { 357 .overlay {
338 if agenda.files.isEmpty { 358 if agenda.files.isEmpty, !hidesFolders {
339 ContentUnavailableView("No agenda files", systemImage: "calendar", description: Text("The agenda reads the org files at the top of each folder you add.")) 359 ContentUnavailableView("No agenda files", systemImage: "calendar", description: Text("The agenda reads the org files at the top of each folder you add."))
360 } else if agenda.files.isEmpty {
361 ContentUnavailableView("All folders hidden", systemImage: "folder", description: Text("Show a folder from the Folders menu."))
340 } 362 }
341 } 363 }
342 .sheet(item: $eventRequest) { request in 364 .sheet(item: $eventRequest) { request in
@@ -394,7 +416,7 @@ struct AgendaView: View {
394 } 416 }
395 } 417 }
396 .navigationTitle(title) 418 .navigationTitle(title)
397 .navigationSubtitle(isAgenda && viewName != AgendaViewLoader.builtIn[0].name ? viewName : "") 419 .navigationSubtitle(([isAgenda && viewName != AgendaViewLoader.builtIn[0].name ? viewName : ""] + [shownFolders ?? ""]).filter { !$0.isEmpty }.joined(separator: " · "))
398 .onChange(of: viewName) { applyView() } 420 .onChange(of: viewName) { applyView() }
399 .onChange(of: commands.agendaRequest?.start, initial: true) { showRequestedDays() } 421 .onChange(of: commands.agendaRequest?.start, initial: true) { showRequestedDays() }
400 .onChange(of: commands.agendaRequest?.days) { showRequestedDays() } 422 .onChange(of: commands.agendaRequest?.days) { showRequestedDays() }
@@ -420,8 +442,8 @@ struct AgendaView: View {
420 if group.isToday, !group.overdue.isEmpty { 442 if group.isToday, !group.overdue.isEmpty {
421 overdueHeader(count: group.overdue.count) 443 overdueHeader(count: group.overdue.count)
422 if overdueShown { 444 if overdueShown {
423 ForEach(Array(group.overdue.enumerated()), id: \.element.id) { index, row in 445 ForEach(Array(group.overdue.enumerated()), id: \.element.id) { index, _ in
424 rowView(Line(id: "\(prefix)\(group.day):o\(index)", row: row, day: group.day)) 446 rowView(dayLine(group, index, prefix: prefix, overdue: true))
425 } 447 }
426 Divider().padding(.leading, 16).padding(.vertical, 4) 448 Divider().padding(.leading, 16).padding(.vertical, 4)
427 } 449 }
@@ -433,9 +455,18 @@ struct AgendaView: View {
433 .padding(.horizontal, 16) 455 .padding(.horizontal, 16)
434 .padding(.vertical, 10) 456 .padding(.vertical, 10)
435 } 457 }
436 ForEach(Array(group.lines(now: Self.hhmm(now)).enumerated()), id: \.offset) { _, line in 458 // Identified by row, not place, so a refresh that moves rows doesn't reuse one row's view
459 // for another.
460 let lines = group.lines(now: Self.hhmm(now)).map { line in
461 switch line {
462 case .row(let index): (Self.key(group.rows[index], day: group.day, prefix: prefix), line)
463 case .grid(let time): ("grid\(time)", line)
464 case .now: ("now", line)
465 }
466 }
467 ForEach(lines, id: \.0) { _, line in
437 switch line { 468 switch line {
438 case .row(let index): rowView(Line(id: "\(prefix)\(group.day):\(index)", row: group.rows[index], day: group.day)) 469 case .row(let index): rowView(dayLine(group, index, prefix: prefix))
439 case .grid(let time): gridLine(time) 470 case .grid(let time): gridLine(time)
440 case .now: nowLine 471 case .now: nowLine
441 } 472 }
@@ -540,7 +571,7 @@ struct AgendaView: View {
540 row: line.row, day: line.day, showsGutter: showsGutter, selected: selection == line.id, hovered: hovered == line.id, 571 row: line.row, day: line.day, showsGutter: showsGutter, selected: selection == line.id, hovered: hovered == line.id,
541 marked: line.row.item.flatMap(EntryRef.init).map(marked.contains) ?? false 572 marked: line.row.item.flatMap(EntryRef.init).map(marked.contains) ?? false
542 ) 573 )
543 .id(line.id) 574 .id(line.viewID)
544 .contentShape(Rectangle()) 575 .contentShape(Rectangle())
545 .onHover { inside in 576 .onHover { inside in
546 if inside { hovered = line.id } else if hovered == line.id { hovered = nil } 577 if inside { hovered = line.id } else if hovered == line.id { hovered = nil }
Sources/Orgstar/BoardView.swift +1
@@ -79,6 +79,7 @@ struct BoardView: View {
79 .navigationTitle(kanban ? "Kanban" : "Entries") 79 .navigationTitle(kanban ? "Kanban" : "Entries")
80 .task(id: RefreshKey(match: match, subfolders: includeSubfolders, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, path: session.path, tick: tick)) { 80 .task(id: RefreshKey(match: match, subfolders: includeSubfolders, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, path: session.path, tick: tick)) {
81 agenda.includeSubfolders = includeSubfolders 81 agenda.includeSubfolders = includeSubfolders
82 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
82 agenda.agendaFiles = OrgPreferences.agendaFiles() 83 agenda.agendaFiles = OrgPreferences.agendaFiles()
83 let open = session.openTexts 84 let open = session.openTexts
84 let result = await agenda.board(open: open, match: match) 85 let result = await agenda.board(open: open, match: match)
Sources/Orgstar/ContentView.swift +6 −1
@@ -459,7 +459,7 @@ struct ContentView: View {
459 Text(workspace.lastError ?? session.lastError ?? "") 459 Text(workspace.lastError ?? session.lastError ?? "")
460 } 460 }
461 .task(id: ReminderKey( 461 .task(id: ReminderKey(
462 enabled: remindersEnabled, lead: reminderLead, subfolders: agendaSubfolders, files: workspace.files.count, 462 enabled: remindersEnabled, lead: reminderLead, subfolders: agendaSubfolders, hidden: HiddenFolders.shared.all, files: workspace.files.count,
463 changed: workspace.changedFile?.version, edits: session.editVersion, hour: hour, theme: theme 463 changed: workspace.changedFile?.version, edits: session.editVersion, hour: hour, theme: theme
464 )) { 464 )) {
465 await updateReminders() 465 await updateReminders()
@@ -909,6 +909,8 @@ struct ContentView: View {
909 var enabled: Bool 909 var enabled: Bool
910 var lead: Int 910 var lead: Int
911 var subfolders: Bool 911 var subfolders: Bool
912 /// The widgets leave out hidden folders.
913 var hidden: Set<String>
912 var files: Int 914 var files: Int
913 var changed: Int? 915 var changed: Int?
914 var edits: Int 916 var edits: Int
@@ -929,6 +931,7 @@ struct ContentView: View {
929 let agenda = reminderAgenda ?? AgendaModel(workspace: workspace) 931 let agenda = reminderAgenda ?? AgendaModel(workspace: workspace)
930 reminderAgenda = agenda 932 reminderAgenda = agenda
931 agenda.includeSubfolders = agendaSubfolders 933 agenda.includeSubfolders = agendaSubfolders
934 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
932 let open = session.openTexts 935 let open = session.openTexts
933 let reminders = await agenda.reminders(open: open, lead: reminderLead) 936 let reminders = await agenda.reminders(open: open, lead: reminderLead)
934 guard !Task.isCancelled else { return } 937 guard !Task.isCancelled else { return }
@@ -944,6 +947,8 @@ struct ContentView: View {
944 days.mode = .agenda(span: AgendaSnapshot.dayCount, startOffset: 0) 947 days.mode = .agenda(span: AgendaSnapshot.dayCount, startOffset: 0)
945 days.startOnWeekday = nil 948 days.startOnWeekday = nil
946 days.includeSubfolders = agendaSubfolders 949 days.includeSubfolders = agendaSubfolders
950 days.excludeArchives = OrgPreferences.agendaExcludeArchives()
951 days.hiddenFolders = HiddenFolders.shared.all
947 days.agendaFiles = OrgPreferences.agendaFiles() 952 days.agendaFiles = OrgPreferences.agendaFiles()
948 days.options = OrgPreferences.agendaOptions(days.options) 953 days.options = OrgPreferences.agendaOptions(days.options)
949 days.options.logMode = false 954 days.options.logMode = false
Sources/Orgstar/FocusFilter.swift added +44
@@ -0,0 +1,44 @@
1import AppIntents
2import OrgApp
3
4/// A folder the user added, by its path.
5struct FolderEntity: AppEntity {
6 static let typeDisplayRepresentation: TypeDisplayRepresentation = "Folder"
7 static let defaultQuery = Query()
8
9 var id: String
10
11 var displayRepresentation: DisplayRepresentation {
12 DisplayRepresentation(title: "\((id as NSString).lastPathComponent)", subtitle: "\(id)")
13 }
14
15 struct Query: EntityQuery {
16 func entities(for identifiers: [String]) async throws -> [FolderEntity] { identifiers.map(FolderEntity.init) }
17 func suggestedEntities() async throws -> [FolderEntity] { WorkspaceModel.savedRootPaths().map(FolderEntity.init) }
18 }
19}
20
21/// While a Focus with this filter is on, the agenda and widgets leave out its folders and
22/// their reminders are muted. The system performs it again with no folders when the Focus ends.
23struct AgendaFocusFilter: SetFocusFilterIntent {
24 static let title: LocalizedStringResource = "Hide Folders"
25 static let description = IntentDescription("Leaves folders out of the agenda and widgets, and mutes their reminders, while this Focus is on.")
26
27 @Parameter(title: "Folders", default: [])
28 var folders: [FolderEntity]
29
30 var displayRepresentation: DisplayRepresentation {
31 let names = folders.map { ($0.id as NSString).lastPathComponent }.joined(separator: ", ")
32 return DisplayRepresentation(title: names.isEmpty ? "No folders hidden" : "Hide \(names)")
33 }
34
35 var appContext: FocusFilterAppContext {
36 FocusFilterAppContext(notificationFilterPredicate: HiddenFolders.notificationPredicate(hiding: Set(folders.map(\.id))))
37 }
38
39 @MainActor
40 func perform() async throws -> some IntentResult {
41 HiddenFolders.shared.focus = Set(folders.map(\.id))
42 return .result()
43 }
44}
Sources/OrgstarMobile/AgendaScreen.swift +37 −1
@@ -90,6 +90,7 @@ struct AgendaScreen: View, Equatable {
90 var span: Int 90 var span: Int
91 var startOffset: Int 91 var startOffset: Int
92 var subfolders: Bool 92 var subfolders: Bool
93 var hidden: Set<String>
93 var settings: Int 94 var settings: Int
94 var logMode: Bool 95 var logMode: Bool
95 } 96 }
@@ -151,6 +152,7 @@ struct AgendaScreen: View, Equatable {
151 // The now line is shorter than a row. 152 // The now line is shorter than a row.
152 .environment(\.defaultMinListRowHeight, 16) 153 .environment(\.defaultMinListRowHeight, 16)
153 .navigationTitle(title) 154 .navigationTitle(title)
155 .navigationSubtitle(shownFolders ?? "")
154 .navigationBarTitleDisplayMode(.inline) 156 .navigationBarTitleDisplayMode(.inline)
155 .sensoryFeedback(.success, trigger: done) 157 .sensoryFeedback(.success, trigger: done)
156 .sensoryFeedback(.impact(weight: .light), trigger: moved) 158 .sensoryFeedback(.impact(weight: .light), trigger: moved)
@@ -212,6 +214,9 @@ struct AgendaScreen: View, Equatable {
212 Label("Views", systemImage: "list.bullet.rectangle") 214 Label("Views", systemImage: "list.bullet.rectangle")
213 } 215 }
214 } 216 }
217 if workspace.rootPaths.count > 1 || shownFolders != nil {
218 ToolbarItem(placement: .topBarTrailing) { foldersMenu }
219 }
215 } 220 }
216 .fullScreenCover(isPresented: $showingBoard) { 221 .fullScreenCover(isPresented: $showingBoard) {
217 BoardScreen(workspace: workspace, session: session) { showingBoard = false } 222 BoardScreen(workspace: workspace, session: session) { showingBoard = false }
@@ -318,6 +323,36 @@ struct AgendaScreen: View, Equatable {
318 .background { Refresher(workspace: workspace, session: session, agenda: agenda, model: model, tick: tick, logMode: logMode) } 323 .background { Refresher(workspace: workspace, session: session, agenda: agenda, model: model, tick: tick, logMode: logMode) }
319 } 324 }
320 325
326 /// Shows or hides each folder's files; folders the Focus hides stay hidden.
327 private var foldersMenu: some View {
328 let hidden = HiddenFolders.shared
329 let hides = !hidden.all.isDisjoint(with: workspace.rootPaths)
330 return Menu {
331 Button("All Folders", systemImage: "folder") { hidden.manual = [] }
332 .disabled(hidden.manual.isEmpty)
333 Section(hidden.focus.isDisjoint(with: workspace.rootPaths) ? "" : "Dimmed folders are hidden by the current Focus.") {
334 ForEach(workspace.rootPaths, id: \.self) { root in
335 Toggle((root as NSString).lastPathComponent, isOn: Binding {
336 !hidden.all.contains(root)
337 } set: { shown in
338 if shown { hidden.manual.remove(root) } else { hidden.manual.insert(root) }
339 })
340 .disabled(hidden.focus.contains(root))
341 }
342 }
343 } label: {
344 Label("Folders", systemImage: hides ? "folder.fill" : "folder")
345 }
346 }
347
348 /// The folders shown, by name, while some are hidden.
349 private var shownFolders: String? {
350 let hidden = HiddenFolders.shared.all
351 guard !hidden.isDisjoint(with: workspace.rootPaths) else { return nil }
352 let shown = workspace.rootPaths.filter { !hidden.contains($0) }
353 return shown.isEmpty ? "No folders" : shown.map { ($0 as NSString).lastPathComponent }.joined(separator: ", ")
354 }
355
321 /// Refreshes the agenda when files, edits or settings change. Its own view, so that what it 356 /// Refreshes the agenda when files, edits or settings change. Its own view, so that what it
322 /// watches redraws only it, not the whole list. 357 /// watches redraws only it, not the whole list.
323 private struct Refresher: View { 358 private struct Refresher: View {
@@ -332,11 +367,12 @@ struct AgendaScreen: View, Equatable {
332 Color.clear 367 Color.clear
333 .task(id: Key(files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, tick: tick, 368 .task(id: Key(files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, tick: tick,
334 mode: agenda.mode, start: agenda.start, span: agenda.span, startOffset: agenda.startOffset, 369 mode: agenda.mode, start: agenda.start, span: agenda.span, startOffset: agenda.startOffset,
335 subfolders: agenda.includeSubfolders, settings: model.settingsVersion, logMode: logMode)) { 370 subfolders: agenda.includeSubfolders, hidden: HiddenFolders.shared.all, settings: model.settingsVersion, logMode: logMode)) {
336 // Changes come in bursts (a folder scan, typing); a newer one cancels this wait. 371 // Changes come in bursts (a folder scan, typing); a newer one cancels this wait.
337 try? await Task.sleep(for: .milliseconds(150)) 372 try? await Task.sleep(for: .milliseconds(150))
338 guard !Task.isCancelled else { return } 373 guard !Task.isCancelled else { return }
339 agenda.options.logMode = logMode 374 agenda.options.logMode = logMode
375 agenda.hiddenFolders = HiddenFolders.shared.all
340 await agenda.refresh(open: session.openTexts) 376 await agenda.refresh(open: session.openTexts)
341 } 377 }
342 } 378 }
Sources/OrgstarMobile/BoardScreen.swift +1
@@ -94,6 +94,7 @@ struct BoardScreen: View {
94 .task(id: RefreshKey(match: match, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, 94 .task(id: RefreshKey(match: match, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion,
95 tick: tick, settings: model.settingsVersion)) { 95 tick: tick, settings: model.settingsVersion)) {
96 agenda.includeSubfolders = OrgPreferences.agendaSubfolders() 96 agenda.includeSubfolders = OrgPreferences.agendaSubfolders()
97 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
97 agenda.agendaFiles = OrgPreferences.agendaFiles() 98 agenda.agendaFiles = OrgPreferences.agendaFiles()
98 let result = await agenda.board(open: session.openTexts, match: match) 99 let result = await agenda.board(open: session.openTexts, match: match)
99 entries = result.entries 100 entries = result.entries
Sources/OrgstarMobile/FocusFilter.swift added +48
@@ -0,0 +1,48 @@
1#if os(iOS)
2import AppIntents
3import OrgApp
4
5/// A folder the user added, by its path.
6struct FolderEntity: AppEntity {
7 static let typeDisplayRepresentation: TypeDisplayRepresentation = "Folder"
8 static let defaultQuery = Query()
9
10 var id: String
11
12 var displayRepresentation: DisplayRepresentation {
13 DisplayRepresentation(title: "\((id as NSString).lastPathComponent)", subtitle: "\(id)")
14 }
15
16 struct Query: EntityQuery {
17 func entities(for identifiers: [String]) async throws -> [FolderEntity] { identifiers.map(FolderEntity.init) }
18 func suggestedEntities() async throws -> [FolderEntity] { WorkspaceModel.savedRootPaths().map(FolderEntity.init) }
19 }
20}
21
22/// While a Focus with this filter is on, the agenda and widgets leave out its folders and
23/// their reminders are muted. The system performs it again with no folders when the Focus ends.
24struct AgendaFocusFilter: SetFocusFilterIntent {
25 static let title: LocalizedStringResource = "Hide Folders"
26 static let description = IntentDescription("Leaves folders out of the agenda and widgets, and mutes their reminders, while this Focus is on.")
27
28 @Parameter(title: "Folders", default: [])
29 var folders: [FolderEntity]
30
31 var displayRepresentation: DisplayRepresentation {
32 let names = folders.map { ($0.id as NSString).lastPathComponent }.joined(separator: ", ")
33 return DisplayRepresentation(title: names.isEmpty ? "No folders hidden" : "Hide \(names)")
34 }
35
36 var appContext: FocusFilterAppContext {
37 FocusFilterAppContext(notificationFilterPredicate: HiddenFolders.notificationPredicate(hiding: Set(folders.map(\.id))))
38 }
39
40 @MainActor
41 func perform() async throws -> some IntentResult {
42 HiddenFolders.shared.focus = Set(folders.map(\.id))
43 // The app may be in the background, where the widgets would wait for it to come back.
44 await MobileModel.shared.updateWidgets()
45 return .result()
46 }
47}
48#endif
Sources/OrgstarMobile/MobileModel.swift +3
@@ -153,6 +153,7 @@ final class MobileModel {
153 agenda.startOffset = OrgPreferences.agendaStartOffset() 153 agenda.startOffset = OrgPreferences.agendaStartOffset()
154 agenda.startOnWeekday = OrgPreferences.agendaStartOnWeekday() 154 agenda.startOnWeekday = OrgPreferences.agendaStartOnWeekday()
155 agenda.includeSubfolders = OrgPreferences.agendaSubfolders() 155 agenda.includeSubfolders = OrgPreferences.agendaSubfolders()
156 agenda.excludeArchives = OrgPreferences.agendaExcludeArchives()
156 agenda.agendaFiles = OrgPreferences.agendaFiles() 157 agenda.agendaFiles = OrgPreferences.agendaFiles()
157 agenda.options = OrgPreferences.agendaOptions(agenda.options) 158 agenda.options = OrgPreferences.agendaOptions(agenda.options)
158 agenda.calendarEvents = OrgPreferences.calendarEvents() ? calendarEvents : nil 159 agenda.calendarEvents = OrgPreferences.calendarEvents() ? calendarEvents : nil
@@ -294,8 +295,10 @@ final class MobileModel {
294 let days = AgendaModel(workspace: workspace, cache: agenda?.cache ?? AgendaSourceCache()) 295 let days = AgendaModel(workspace: workspace, cache: agenda?.cache ?? AgendaSourceCache())
295 days.mode = .agenda(span: AgendaSnapshot.dayCount, startOffset: 0) 296 days.mode = .agenda(span: AgendaSnapshot.dayCount, startOffset: 0)
296 days.startOnWeekday = nil 297 days.startOnWeekday = nil
298 days.hiddenFolders = HiddenFolders.shared.all
297 if let agenda { 299 if let agenda {
298 days.includeSubfolders = agenda.includeSubfolders 300 days.includeSubfolders = agenda.includeSubfolders
301 days.excludeArchives = agenda.excludeArchives
299 days.options = agenda.options 302 days.options = agenda.options
300 days.options.logMode = false 303 days.options.logMode = false
301 days.calendarEvents = agenda.calendarEvents 304 days.calendarEvents = agenda.calendarEvents
Sources/OrgstarMobile/OrgstarMobileApp.swift +3 −1
@@ -136,7 +136,7 @@ struct RootView: View {
136 var body: some View { 136 var body: some View {
137 Color.clear 137 Color.clear
138 // Reminders follow the files, the settings, coming back to the app and the hour. 138 // Reminders follow the files, the settings, coming back to the app and the hour.
139 .task(id: ReminderKey(files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion, 139 .task(id: ReminderKey(hidden: HiddenFolders.shared.all, files: workspace.files.count, changed: workspace.changedFile?.version, edits: session.editVersion,
140 settings: model.settingsVersion, active: active, hour: hour)) { 140 settings: model.settingsVersion, active: active, hour: hour)) {
141 guard active else { return } 141 guard active else { return }
142 try? await Task.sleep(for: .seconds(1)) 142 try? await Task.sleep(for: .seconds(1))
@@ -160,6 +160,8 @@ struct RootView: View {
160 } 160 }
161 161
162 private struct ReminderKey: Equatable { 162 private struct ReminderKey: Equatable {
163 /// The widgets leave out hidden folders.
164 var hidden: Set<String>
163 var files: Int 165 var files: Int
164 var changed: Int? 166 var changed: Int?
165 var edits: Int 167 var edits: Int
Sources/OrgstarMobile/SettingsScreen.swift +8 −1
@@ -41,7 +41,7 @@ struct SettingsScreen: View {
41 } footer: { 41 } footer: {
42 Text("A folder with config.toml and capture.toml, such as a synced copy of ~/.config/orgstar from your Mac. Changes to them apply as they sync.") 42 Text("A folder with config.toml and capture.toml, such as a synced copy of ~/.config/orgstar from your Mac. Changes to them apply as they sync.")
43 } 43 }
44 Section("Agenda") { 44 Section {
45 let _ = model.settingsVersion 45 let _ = model.settingsVersion
46 Toggle("Show days without entries", isOn: Binding { 46 Toggle("Show days without entries", isOn: Binding {
47 OrgPreferences.agendaShowAllDates() 47 OrgPreferences.agendaShowAllDates()
@@ -49,6 +49,9 @@ struct SettingsScreen: View {
49 Toggle("Habits only today", isOn: Binding { 49 Toggle("Habits only today", isOn: Binding {
50 OrgPreferences.habitsOnlyForToday() 50 OrgPreferences.habitsOnlyForToday()
51 } set: { model.set("habitsOnlyForToday", to: .bool($0)) }) 51 } set: { model.set("habitsOnlyForToday", to: .bool($0)) })
52 Toggle("Exclude archived tasks", isOn: Binding {
53 OrgPreferences.agendaExcludeArchives()
54 } set: { model.set("agendaExcludeArchives", to: .bool($0)) })
52 Picker("Blocked entries", selection: Binding { 55 Picker("Blocked entries", selection: Binding {
53 UserDefaults.standard.string(forKey: "agendaDimBlockedTasks") ?? "t" 56 UserDefaults.standard.string(forKey: "agendaDimBlockedTasks") ?? "t"
54 } set: { model.set("agendaDimBlockedTasks", to: .string($0)) }) { 57 } set: { model.set("agendaDimBlockedTasks", to: .string($0)) }) {
@@ -56,6 +59,10 @@ struct SettingsScreen: View {
56 Text("Hidden").tag("invisible") 59 Text("Hidden").tag("invisible")
57 Text("Shown as usual").tag("nil") 60 Text("Shown as usual").tag("nil")
58 } 61 }
62 } header: {
63 Text("Agenda")
64 } footer: {
65 Text("Archive files are the ones your agenda files archive to, named by #+ARCHIVE:, an :ARCHIVE: property or org-archive-location.")
59 } 66 }
60 Section { 67 Section {
61 let _ = model.settingsVersion 68 let _ = model.settingsVersion
Tests/OrgAppTests/AppTests.swift +63
@@ -630,6 +630,69 @@ struct AgendaModelTests {
630 await agenda.refresh(open: [:], now: wednesday, calendar: utc) 630 await agenda.refresh(open: [:], now: wednesday, calendar: utc)
631 #expect(agenda.days.first?.day == Days.absolute(year: 2026, month: 10, day: 7)) 631 #expect(agenda.days.first?.day == Days.absolute(year: 2026, month: 10, day: 7))
632 } 632 }
633
634 @Test func leavesOutArchiveFiles() async throws {
635 let notes = try Folder()
636 try notes.write("todo.org", "#+ARCHIVE: todo_archive.org::* %s\n* TODO Live\nSCHEDULED: <2026-10-05 Mon>\n")
637 try notes.write("todo_archive.org", "* DONE Old\nSCHEDULED: <2026-10-05 Mon>\n")
638 try notes.write("work.org", "* Project\n:PROPERTIES:\n:ARCHIVE: done/work.org::\n:END:\n** TODO Task\nSCHEDULED: <2026-10-05 Mon>\n")
639 try notes.write("self.org", "#+ARCHIVE: ::* Archived\n* TODO Mine\nSCHEDULED: <2026-10-05 Mon>\n")
640 try notes.write("done/work.org", "* DONE Older\nSCHEDULED: <2026-10-05 Mon>\n")
641 let model = try WorkspaceModel(directory: nil)
642 try await model.addRoot(notes.url)
643 let agenda = AgendaModel(workspace: model)
644 agenda.includeSubfolders = true
645 agenda.span = 1
646 var utc = Calendar(identifier: .gregorian)
647 utc.timeZone = TimeZone(identifier: "UTC")!
648 let now = try #require(utc.date(from: DateComponents(year: 2026, month: 10, day: 5, hour: 9)))
649
650 agenda.excludeArchives = false
651 await agenda.refresh(open: [:], now: now, calendar: utc)
652 #expect(Set(agenda.days[0].items.map(\.text)) == ["TODO Live", "DONE Old", "TODO Task", "TODO Mine", "DONE Older"])
653 agenda.excludeArchives = true
654 await agenda.refresh(open: [:], now: now, calendar: utc)
655 #expect(Set(agenda.days[0].items.map(\.text)) == ["TODO Live", "TODO Task", "TODO Mine"])
656 }
657
658 @Test func leavesOutHiddenFoldersAndTagsReminders() async throws {
659 let work = try Folder()
660 let home = try Folder()
661 try work.write("work.org", "* TODO Report\nSCHEDULED: <2026-10-05 Mon 14:00>\n")
662 try home.write("home.org", "* TODO Groceries\nSCHEDULED: <2026-10-05 Mon 15:00>\n")
663 let model = try WorkspaceModel(directory: nil)
664 try await model.addRoot(work.url)
665 try await model.addRoot(home.url)
666 let workRoot = try #require(model.files.first { $0.name == "work.org" }?.root)
667 let agenda = AgendaModel(workspace: model)
668 agenda.span = 1
669 var utc = Calendar(identifier: .gregorian)
670 utc.timeZone = TimeZone(identifier: "UTC")!
671 let now = try #require(utc.date(from: DateComponents(year: 2026, month: 10, day: 5, hour: 9)))
672
673 agenda.hiddenFolders = [workRoot]
674 await agenda.refresh(open: [:], now: now, calendar: utc)
675 #expect(agenda.days[0].items.filter { $0.path != nil }.map(\.title) == ["Groceries"])
676
677 // Reminders keep hidden folders' entries and carry their folder for Focus filters.
678 let reminders = await AgendaModel(workspace: model).reminders(open: [:], now: now, calendar: utc)
679 #expect(Set(reminders.map(\.title)) == ["Report", "Groceries"])
680 #expect(reminders.first { $0.title == "Report" }?.folder == workRoot)
681 }
682
683 @Test func hiddenFoldersPersistAndMatchPaths() {
684 let defaults = UserDefaults(suiteName: "hidden-\(UUID().uuidString)")!
685 let folders = HiddenFolders(defaults: defaults)
686 folders.manual = ["/a"]
687 folders.focus = ["/b"]
688 let reloaded = HiddenFolders(defaults: defaults)
689 #expect(reloaded.all == ["/a", "/b"])
690 #expect(HiddenFolders.hides(["/a"], path: "/a/x.org"))
691 #expect(!HiddenFolders.hides(["/a"], path: "/ab/x.org"))
692 let predicate = HiddenFolders.notificationPredicate(hiding: ["/a"])
693 #expect(!predicate.evaluate(with: "/a"))
694 #expect(predicate.evaluate(with: "/b"))
695 }
633} 696}
634 697
635@MainActor 698@MainActor
Tests/OrgCoreTests/AgendaTests.swift +4 −4
@@ -411,7 +411,7 @@ struct ReminderTests {
411 411
412 @Test func timedEntriesWithTheirWarnings() { 412 @Test func timedEntriesWithTheirWarnings() {
413 let text = """ 413 let text = """
414 * TODO Call 414 * TODO [#A] Call [1/2]
415 SCHEDULED: <2026-10-05 Mon 14:00> 415 SCHEDULED: <2026-10-05 Mon 14:00>
416 * Meeting 416 * Meeting
417 :PROPERTIES: 417 :PROPERTIES:
@@ -432,14 +432,14 @@ struct ReminderTests {
432 let source = AgendaSource(path: "/n/a.org", text: text) 432 let source = AgendaSource(path: "/n/a.org", text: text)
433 let now = Self.date(5, 9, 30) 433 let now = Self.date(5, 9, 30)
434 let reminders = Reminders.upcoming([source], now: now, calendar: Self.utc) 434 let reminders = Reminders.upcoming([source], now: now, calendar: Self.utc)
435 #expect(reminders.map(\.title) == ["Soon", "TODO Call", "Meeting", "TODO Report due"]) 435 #expect(reminders.map(\.title) == ["Soon", "Call", "Meeting", "Report due"])
436 #expect(reminders[0].fireDate == now.addingTimeInterval(1)) 436 #expect(reminders[0].fireDate == now.addingTimeInterval(1))
437 #expect(reminders[1].fireDate == Self.date(5, 13, 48)) 437 #expect(reminders[1].fireDate == Self.date(5, 13, 48))
438 #expect(reminders[1].body == "14:00 · Scheduled: · a") 438 #expect(reminders[1].body == "14:00 · Scheduled · a")
439 #expect(reminders[2].fireDate == Self.date(6, 9, 30)) 439 #expect(reminders[2].fireDate == Self.date(6, 9, 30))
440 #expect(reminders[3].eventDate == Self.date(7, 17, 0)) 440 #expect(reminders[3].eventDate == Self.date(7, 17, 0))
441 #expect(Reminders.upcoming([source], now: now, calendar: Self.utc, limit: 2).count == 2) 441 #expect(Reminders.upcoming([source], now: now, calendar: Self.utc, limit: 2).count == 2)
442 #expect(Reminders.upcoming([source], now: now, calendar: Self.utc, days: 1).map(\.title) == ["Soon", "TODO Call"]) 442 #expect(Reminders.upcoming([source], now: now, calendar: Self.utc, days: 1).map(\.title) == ["Soon", "Call"])
443 } 443 }
444 444
445 @Test func repeatsFillTheWeek() { 445 @Test func repeatsFillTheWeek() {
docs/manual/guide/07-agenda.org +13
@@ -31,6 +31,13 @@ To include files in subfolders as well, turn on Settings ▸ Agenda ▸ Include
31agenda-include-subfolders = true 31agenda-include-subfolders = true
32#+END_SRC 32#+END_SRC
33 33
34To leave out archive files, the files your agenda files archive to by their =#+ARCHIVE:= keyword, an =:ARCHIVE:= property or =org-archive-location=, turn on Settings ▸ Agenda ▸ Exclude archived tasks on iOS, or set this in =config.toml=:
35
36#+BEGIN_SRC toml
37[orgstar]
38agenda-exclude-archives = true
39#+END_SRC
40
34To read a list of files instead, as =org-agenda-files= does, set =org-agenda-files= in =config.toml=, entries separated by =\n=: 41To read a list of files instead, as =org-agenda-files= does, set =org-agenda-files= in =config.toml=, entries separated by =\n=:
35 42
36#+BEGIN_SRC toml 43#+BEGIN_SRC toml
@@ -57,6 +64,12 @@ An entry's category is the nearest =CATEGORY= property on it or an ancestor, els
57 64
58If no agenda file exists, the window says so. 65If no agenda file exists, the window says so.
59 66
67** Hiding folders
68
69With more than one folder, the Folders menu in the agenda's toolbar shows or hides each folder's files; All Folders shows them all again. While some are hidden, the shown folders' names appear under the title. The choice is kept on each device, and it applies to the agenda, the widgets, the Apple Watch and the iOS icon's badge. Reminders still fire for hidden folders.
70
71To hide folders with a Focus, add orgstar's Hide Folders filter to the Focus in System Settings ▸ Focus (Settings ▸ Focus on iOS) and choose the folders. While the Focus is on, those folders are hidden as well as the ones you hid from the menu, where they show dimmed, and their reminders are muted. When the Focus ends they show again.
72
60* The day, week and month view 73* The day, week and month view
61 74
62The default view is =org-agenda-list=: a run of days, each under a header with its date, such as =Monday 5 October= (with the year when it isn't the current year). Today, tomorrow and yesterday are named before the date: =Today · Thursday 8 October=. Today's header is in the =agenda-today= color and days before today are grey. Each header stays at the top of the window while you scroll through its day. 75The default view is =org-agenda-list=: a run of days, each under a header with its date, such as =Monday 5 October= (with the year when it isn't the current year). Today, tomorrow and yesterday are named before the date: =Today · Thursday 8 October=. Today's header is in the =agenda-today= color and days before today are grey. Each header stays at the top of the window while you scroll through its day.
docs/manual/guide/13-configuration.org +1
@@ -392,6 +392,7 @@ Any other key in =[theme]= is a color; see Themes below.
392| =show-hidden-files= | boolean | =true= | List dotfiles and dot folders in your folders. | 392| =show-hidden-files= | boolean | =true= | List dotfiles and dot folders in your folders. |
393| =ignored-folders= | string | see below | Folder names never listed or searched, separated by spaces. | 393| =ignored-folders= | string | see below | Folder names never listed or searched, separated by spaces. |
394| =agenda-include-subfolders= | boolean | =false= | The agenda reads org files in subfolders too. | 394| =agenda-include-subfolders= | boolean | =false= | The agenda reads org files in subfolders too. |
395| =agenda-exclude-archives= | boolean | =false= | The agenda leaves out files that other agenda files archive to. |
395| =reminders= | boolean | =true= | Notify before timed entries. | 396| =reminders= | boolean | =true= | Notify before timed entries. |
396| =calendar-events= | boolean | =false= | Show events from Calendar in the agenda. | 397| =calendar-events= | boolean | =false= | Show events from Calendar in the agenda. |
397| =calendar-event-calendars= | string | =""= | The calendars whose events show, by title or identifier, separated by commas; =""= for all. | 398| =calendar-event-calendars= | string | =""= | The calendars whose events show, by title or identifier, separated by commas; =""= for all. |
docs/manual/guide/14-ios.org +3 −1
@@ -189,6 +189,7 @@ Tap a result to open it in the reader. A heading result opens at that heading.
189The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as =Due today= or =3d late= on the left, the category and the keyword above the title. Days without entries are hidden, except today. Today's overdue entries are in a group of their own, and a line marks the current time between timed entries. Pull down to refresh. 189The Agenda tab shows the agenda over all your folders, with the span and start day from the settings (10 days from 3 days ago by default). Each day lists its entries in rows: the time or a status such as =Due today= or =3d late= on the left, the category and the keyword above the title. Days without entries are hidden, except today. Today's overdue entries are in a group of their own, and a line marks the current time between timed entries. Pull down to refresh.
190 190
191- Views (top left) :: the built-in views and those in =views.toml=, Tags and Properties… (a match such as =+work-home= or ~TODO="WAIT"~), and Search… (a phrase, or snippets such as =+invoice -paid=). 191- Views (top left) :: the built-in views and those in =views.toml=, Tags and Properties… (a match such as =+work-home= or ~TODO="WAIT"~), and Search… (a phrase, or snippets such as =+invoice -paid=).
192- Folders (top right, with more than one folder) :: shows or hides each folder's files in the agenda, the widgets, the watch and the badge; the shown folders' names appear under the title. A Focus can hide folders too, and mute their reminders (see Hiding folders in [[file:07-agenda.org][The agenda]]).
192- The bar at the bottom :: Earlier, Filter, Today, Go to Date, the span (Day, Week, Month or the configured span, and Log Mode, which adds closed entries and clocked time) and Later. 193- The bar at the bottom :: Earlier, Filter, Today, Go to Date, the span (Day, Week, Month or the configured span, and Log Mode, which adds closed entries and clocked time) and Later.
193- Filter :: keep or leave out tags and categories of the entries shown, or type a filter as Org's =/= takes it: =+keep= and =-drop= tags or categories, =<0:30= for effort, =/regexp/=. The filter in use shows above the bar. 194- Filter :: keep or leave out tags and categories of the entries shown, or type a filter as Org's =/= takes it: =+keep= and =-drop= tags or categories, =<0:30= for effort, =/regexp/=. The filter in use shows above the bar.
194- + on a day's header :: captures an entry scheduled on that day (see [[file:08-capture.org][Capture]]). 195- + on a day's header :: captures an entry scheduled on that day (see [[file:08-capture.org][Capture]]).
@@ -389,6 +390,7 @@ The Agenda, TODO Dependencies, Calendar and Reminders sections are the only plac
389 390
390- Show days without entries :: turns =org-agenda-show-all-dates= on or off. 391- Show days without entries :: turns =org-agenda-show-all-dates= on or off.
391- Habits only today :: turns =org-habit-show-habits-only-for-today= on or off. 392- Habits only today :: turns =org-habit-show-habits-only-for-today= on or off.
393- Exclude archived tasks :: turns =agenda-exclude-archives= on or off: the agenda leaves out the files your agenda files archive to.
392- Blocked entries :: Dimmed, Hidden or Shown as usual (=org-agenda-dim-blocked-tasks=). 394- Blocked entries :: Dimmed, Hidden or Shown as usual (=org-agenda-dim-blocked-tasks=).
393- TODO Dependencies :: Not done before TODO children (=org-enforce-todo-dependencies=) and Not done with unchecked boxes (=org-enforce-todo-checkbox-dependencies=). 395- TODO Dependencies :: Not done before TODO children (=org-enforce-todo-dependencies=) and Not done with unchecked boxes (=org-enforce-todo-checkbox-dependencies=).
394- Show Calendar Events :: turns on =calendar-events=, and asks for access to your calendars. iOS asks for full access, as Calendar has no read-only level; orgstar changes a calendar only when you edit an event or add an entry. While access is missing the section shows Allow Access to Calendars…; if you declined, allow it in the Settings app under Privacy & Security ▸ Calendars. 396- Show Calendar Events :: turns on =calendar-events=, and asks for access to your calendars. iOS asks for full access, as Calendar has no read-only level; orgstar changes a calendar only when you edit an event or add an entry. While access is missing the section shows Allow Access to Calendars…; if you declined, allow it in the Settings app under Privacy & Security ▸ Calendars.
@@ -415,7 +417,7 @@ These settings from =config.toml= apply on iOS:
415- =org-use-tag-inheritance=, =org-tags-exclude-from-inheritance=, =org-tag-alist= 417- =org-use-tag-inheritance=, =org-tags-exclude-from-inheritance=, =org-tag-alist=
416- =org-use-speed-commands=, with a hardware keyboard 418- =org-use-speed-commands=, with a hardware keyboard
417- =electric-pair-mode=, =spell-check=, =auto-fill-mode= 419- =electric-pair-mode=, =spell-check=, =auto-fill-mode=
418- =org-agenda-span=, =org-agenda-start-day=, =org-agenda-start-on-weekday=, =org-deadline-warning-days=, =agenda-include-subfolders=, =org-agenda-show-all-dates=, =org-agenda-skip-scheduled-if-done=, =org-agenda-skip-deadline-if-done=, =org-habit-show-habits-only-for-today=, =org-agenda-search-view-always-boolean=, =org-agenda-search-view-force-full-words=, =org-agenda-log-mode-items=, the =org-agenda-todo-ignore-= settings, =org-agenda-tags-todo-honor-ignore-options= 420- =org-agenda-span=, =org-agenda-start-day=, =org-agenda-start-on-weekday=, =org-deadline-warning-days=, =agenda-include-subfolders=, =agenda-exclude-archives=, =org-agenda-show-all-dates=, =org-agenda-skip-scheduled-if-done=, =org-agenda-skip-deadline-if-done=, =org-habit-show-habits-only-for-today=, =org-agenda-search-view-always-boolean=, =org-agenda-search-view-force-full-words=, =org-agenda-log-mode-items=, the =org-agenda-todo-ignore-= settings, =org-agenda-tags-todo-honor-ignore-options=
419- =calendar-events=, =calendar-event-calendars=, =agenda-reminders=, =agenda-reminder-lists= 421- =calendar-events=, =calendar-event-calendars=, =agenda-reminders=, =agenda-reminder-lists=
420- =reminders=, =appt-message-warning-time= 422- =reminders=, =appt-message-warning-time=
421- =org-clock-history-length=, =org-clock-into-drawer=, =org-clock-rounding-minutes=, =org-clock-out-remove-zero-time-clocks=, =org-clock-in-switch-to-state=, =org-clock-out-when-done= 423- =org-clock-history-length=, =org-clock-into-drawer=, =org-clock-rounding-minutes=, =org-clock-out-remove-zero-time-clocks=, =org-clock-in-switch-to-state=, =org-clock-out-when-done=
ios/Orgstar.xcodeproj/project.pbxproj +24 −24
@@ -700,7 +700,7 @@
700 isa = XCBuildConfiguration; 700 isa = XCBuildConfiguration;
701 buildSettings = { 701 buildSettings = {
702 CODE_SIGN_STYLE = Automatic; 702 CODE_SIGN_STYLE = Automatic;
703 CURRENT_PROJECT_VERSION = 11; 703 CURRENT_PROJECT_VERSION = 12;
704 DEVELOPMENT_TEAM = ZCNAX3VL9D; 704 DEVELOPMENT_TEAM = ZCNAX3VL9D;
705 GENERATE_INFOPLIST_FILE = NO; 705 GENERATE_INFOPLIST_FILE = NO;
706 INFOPLIST_FILE = OrgstarQuickLook/Info.plist; 706 INFOPLIST_FILE = OrgstarQuickLook/Info.plist;
@@ -709,7 +709,7 @@
709 "@executable_path/Frameworks", 709 "@executable_path/Frameworks",
710 "@executable_path/../../Frameworks", 710 "@executable_path/../../Frameworks",
711 ); 711 );
712 MARKETING_VERSION = 0.6.1; 712 MARKETING_VERSION = 0.7.0;
713 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook; 713 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook;
714 PRODUCT_NAME = "$(TARGET_NAME)"; 714 PRODUCT_NAME = "$(TARGET_NAME)";
715 SKIP_INSTALL = YES; 715 SKIP_INSTALL = YES;
@@ -722,7 +722,7 @@
722 buildSettings = { 722 buildSettings = {
723 CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements; 723 CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements;
724 CODE_SIGN_STYLE = Automatic; 724 CODE_SIGN_STYLE = Automatic;
725 CURRENT_PROJECT_VERSION = 11; 725 CURRENT_PROJECT_VERSION = 12;
726 DEVELOPMENT_TEAM = ZCNAX3VL9D; 726 DEVELOPMENT_TEAM = ZCNAX3VL9D;
727 GENERATE_INFOPLIST_FILE = NO; 727 GENERATE_INFOPLIST_FILE = NO;
728 INFOPLIST_FILE = OrgstarShare/Info.plist; 728 INFOPLIST_FILE = OrgstarShare/Info.plist;
@@ -731,7 +731,7 @@
731 "@executable_path/Frameworks", 731 "@executable_path/Frameworks",
732 "@executable_path/../../Frameworks", 732 "@executable_path/../../Frameworks",
733 ); 733 );
734 MARKETING_VERSION = 0.6.1; 734 MARKETING_VERSION = 0.7.0;
735 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share; 735 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share;
736 PRODUCT_NAME = "$(TARGET_NAME)"; 736 PRODUCT_NAME = "$(TARGET_NAME)";
737 SKIP_INSTALL = YES; 737 SKIP_INSTALL = YES;
@@ -744,7 +744,7 @@
744 buildSettings = { 744 buildSettings = {
745 CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements; 745 CODE_SIGN_ENTITLEMENTS = OrgstarShare/OrgstarShare.entitlements;
746 CODE_SIGN_STYLE = Automatic; 746 CODE_SIGN_STYLE = Automatic;
747 CURRENT_PROJECT_VERSION = 11; 747 CURRENT_PROJECT_VERSION = 12;
748 DEVELOPMENT_TEAM = ZCNAX3VL9D; 748 DEVELOPMENT_TEAM = ZCNAX3VL9D;
749 GENERATE_INFOPLIST_FILE = NO; 749 GENERATE_INFOPLIST_FILE = NO;
750 INFOPLIST_FILE = OrgstarShare/Info.plist; 750 INFOPLIST_FILE = OrgstarShare/Info.plist;
@@ -753,7 +753,7 @@
753 "@executable_path/Frameworks", 753 "@executable_path/Frameworks",
754 "@executable_path/../../Frameworks", 754 "@executable_path/../../Frameworks",
755 ); 755 );
756 MARKETING_VERSION = 0.6.1; 756 MARKETING_VERSION = 0.7.0;
757 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share; 757 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.share;
758 PRODUCT_NAME = "$(TARGET_NAME)"; 758 PRODUCT_NAME = "$(TARGET_NAME)";
759 SKIP_INSTALL = YES; 759 SKIP_INSTALL = YES;
@@ -768,7 +768,7 @@
768 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; 768 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
769 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; 769 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements;
770 CODE_SIGN_STYLE = Automatic; 770 CODE_SIGN_STYLE = Automatic;
771 CURRENT_PROJECT_VERSION = 11; 771 CURRENT_PROJECT_VERSION = 12;
772 DEVELOPMENT_TEAM = ZCNAX3VL9D; 772 DEVELOPMENT_TEAM = ZCNAX3VL9D;
773 GENERATE_INFOPLIST_FILE = NO; 773 GENERATE_INFOPLIST_FILE = NO;
774 INFOPLIST_FILE = Orgstar/Info.plist; 774 INFOPLIST_FILE = Orgstar/Info.plist;
@@ -778,7 +778,7 @@
778 "$(inherited)", 778 "$(inherited)",
779 "@executable_path/Frameworks", 779 "@executable_path/Frameworks",
780 ); 780 );
781 MARKETING_VERSION = 0.6.1; 781 MARKETING_VERSION = 0.7.0;
782 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar; 782 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar;
783 PRODUCT_MODULE_NAME = OrgstarMobile; 783 PRODUCT_MODULE_NAME = OrgstarMobile;
784 PRODUCT_NAME = Orgstar; 784 PRODUCT_NAME = Orgstar;
@@ -791,7 +791,7 @@
791 buildSettings = { 791 buildSettings = {
792 CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements; 792 CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements;
793 CODE_SIGN_STYLE = Automatic; 793 CODE_SIGN_STYLE = Automatic;
794 CURRENT_PROJECT_VERSION = 11; 794 CURRENT_PROJECT_VERSION = 12;
795 DEVELOPMENT_TEAM = ZCNAX3VL9D; 795 DEVELOPMENT_TEAM = ZCNAX3VL9D;
796 GENERATE_INFOPLIST_FILE = NO; 796 GENERATE_INFOPLIST_FILE = NO;
797 INFOPLIST_FILE = OrgstarWidgets/Info.plist; 797 INFOPLIST_FILE = OrgstarWidgets/Info.plist;
@@ -801,7 +801,7 @@
801 "@executable_path/Frameworks", 801 "@executable_path/Frameworks",
802 "@executable_path/../../Frameworks", 802 "@executable_path/../../Frameworks",
803 ); 803 );
804 MARKETING_VERSION = 0.6.1; 804 MARKETING_VERSION = 0.7.0;
805 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets; 805 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets;
806 PRODUCT_NAME = "$(TARGET_NAME)"; 806 PRODUCT_NAME = "$(TARGET_NAME)";
807 SKIP_INSTALL = YES; 807 SKIP_INSTALL = YES;
@@ -813,7 +813,7 @@
813 isa = XCBuildConfiguration; 813 isa = XCBuildConfiguration;
814 buildSettings = { 814 buildSettings = {
815 CODE_SIGN_STYLE = Automatic; 815 CODE_SIGN_STYLE = Automatic;
816 CURRENT_PROJECT_VERSION = 11; 816 CURRENT_PROJECT_VERSION = 12;
817 DEVELOPMENT_TEAM = ZCNAX3VL9D; 817 DEVELOPMENT_TEAM = ZCNAX3VL9D;
818 GENERATE_INFOPLIST_FILE = NO; 818 GENERATE_INFOPLIST_FILE = NO;
819 INFOPLIST_FILE = OrgstarQuickLook/Info.plist; 819 INFOPLIST_FILE = OrgstarQuickLook/Info.plist;
@@ -822,7 +822,7 @@
822 "@executable_path/Frameworks", 822 "@executable_path/Frameworks",
823 "@executable_path/../../Frameworks", 823 "@executable_path/../../Frameworks",
824 ); 824 );
825 MARKETING_VERSION = 0.6.1; 825 MARKETING_VERSION = 0.7.0;
826 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook; 826 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.quicklook;
827 PRODUCT_NAME = "$(TARGET_NAME)"; 827 PRODUCT_NAME = "$(TARGET_NAME)";
828 SKIP_INSTALL = YES; 828 SKIP_INSTALL = YES;
@@ -854,7 +854,7 @@
854 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; 854 ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
855 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements; 855 CODE_SIGN_ENTITLEMENTS = Orgstar/Orgstar.entitlements;
856 CODE_SIGN_STYLE = Automatic; 856 CODE_SIGN_STYLE = Automatic;
857 CURRENT_PROJECT_VERSION = 11; 857 CURRENT_PROJECT_VERSION = 12;
858 DEVELOPMENT_TEAM = ZCNAX3VL9D; 858 DEVELOPMENT_TEAM = ZCNAX3VL9D;
859 GENERATE_INFOPLIST_FILE = NO; 859 GENERATE_INFOPLIST_FILE = NO;
860 INFOPLIST_FILE = Orgstar/Info.plist; 860 INFOPLIST_FILE = Orgstar/Info.plist;
@@ -864,7 +864,7 @@
864 "$(inherited)", 864 "$(inherited)",
865 "@executable_path/Frameworks", 865 "@executable_path/Frameworks",
866 ); 866 );
867 MARKETING_VERSION = 0.6.1; 867 MARKETING_VERSION = 0.7.0;
868 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar; 868 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar;
869 PRODUCT_MODULE_NAME = OrgstarMobile; 869 PRODUCT_MODULE_NAME = OrgstarMobile;
870 PRODUCT_NAME = Orgstar; 870 PRODUCT_NAME = Orgstar;
@@ -877,7 +877,7 @@
877 buildSettings = { 877 buildSettings = {
878 CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements; 878 CODE_SIGN_ENTITLEMENTS = OrgstarWidgets/OrgstarWidgets.entitlements;
879 CODE_SIGN_STYLE = Automatic; 879 CODE_SIGN_STYLE = Automatic;
880 CURRENT_PROJECT_VERSION = 11; 880 CURRENT_PROJECT_VERSION = 12;
881 DEVELOPMENT_TEAM = ZCNAX3VL9D; 881 DEVELOPMENT_TEAM = ZCNAX3VL9D;
882 GENERATE_INFOPLIST_FILE = NO; 882 GENERATE_INFOPLIST_FILE = NO;
883 INFOPLIST_FILE = OrgstarWidgets/Info.plist; 883 INFOPLIST_FILE = OrgstarWidgets/Info.plist;
@@ -887,7 +887,7 @@
887 "@executable_path/Frameworks", 887 "@executable_path/Frameworks",
888 "@executable_path/../../Frameworks", 888 "@executable_path/../../Frameworks",
889 ); 889 );
890 MARKETING_VERSION = 0.6.1; 890 MARKETING_VERSION = 0.7.0;
891 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets; 891 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.widgets;
892 PRODUCT_NAME = "$(TARGET_NAME)"; 892 PRODUCT_NAME = "$(TARGET_NAME)";
893 SKIP_INSTALL = YES; 893 SKIP_INSTALL = YES;
@@ -921,7 +921,7 @@
921 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 921 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
922 CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements; 922 CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements;
923 CODE_SIGN_STYLE = Automatic; 923 CODE_SIGN_STYLE = Automatic;
924 CURRENT_PROJECT_VERSION = 11; 924 CURRENT_PROJECT_VERSION = 12;
925 DEVELOPMENT_TEAM = ZCNAX3VL9D; 925 DEVELOPMENT_TEAM = ZCNAX3VL9D;
926 GENERATE_INFOPLIST_FILE = NO; 926 GENERATE_INFOPLIST_FILE = NO;
927 INFOPLIST_FILE = OrgstarWatch/Info.plist; 927 INFOPLIST_FILE = OrgstarWatch/Info.plist;
@@ -929,7 +929,7 @@
929 "$(inherited)", 929 "$(inherited)",
930 "@executable_path/Frameworks", 930 "@executable_path/Frameworks",
931 ); 931 );
932 MARKETING_VERSION = 0.6.1; 932 MARKETING_VERSION = 0.7.0;
933 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp; 933 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp;
934 PRODUCT_NAME = "$(TARGET_NAME)"; 934 PRODUCT_NAME = "$(TARGET_NAME)";
935 SDKROOT = watchos; 935 SDKROOT = watchos;
@@ -946,7 +946,7 @@
946 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 946 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
947 CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements; 947 CODE_SIGN_ENTITLEMENTS = OrgstarWatch/OrgstarWatch.entitlements;
948 CODE_SIGN_STYLE = Automatic; 948 CODE_SIGN_STYLE = Automatic;
949 CURRENT_PROJECT_VERSION = 11; 949 CURRENT_PROJECT_VERSION = 12;
950 DEVELOPMENT_TEAM = ZCNAX3VL9D; 950 DEVELOPMENT_TEAM = ZCNAX3VL9D;
951 GENERATE_INFOPLIST_FILE = NO; 951 GENERATE_INFOPLIST_FILE = NO;
952 INFOPLIST_FILE = OrgstarWatch/Info.plist; 952 INFOPLIST_FILE = OrgstarWatch/Info.plist;
@@ -954,7 +954,7 @@
954 "$(inherited)", 954 "$(inherited)",
955 "@executable_path/Frameworks", 955 "@executable_path/Frameworks",
956 ); 956 );
957 MARKETING_VERSION = 0.6.1; 957 MARKETING_VERSION = 0.7.0;
958 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp; 958 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp;
959 PRODUCT_NAME = "$(TARGET_NAME)"; 959 PRODUCT_NAME = "$(TARGET_NAME)";
960 SDKROOT = watchos; 960 SDKROOT = watchos;
@@ -971,7 +971,7 @@
971 SKIP_INSTALL = YES; 971 SKIP_INSTALL = YES;
972 CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements; 972 CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements;
973 CODE_SIGN_STYLE = Automatic; 973 CODE_SIGN_STYLE = Automatic;
974 CURRENT_PROJECT_VERSION = 11; 974 CURRENT_PROJECT_VERSION = 12;
975 DEVELOPMENT_TEAM = ZCNAX3VL9D; 975 DEVELOPMENT_TEAM = ZCNAX3VL9D;
976 GENERATE_INFOPLIST_FILE = NO; 976 GENERATE_INFOPLIST_FILE = NO;
977 INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist; 977 INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist;
@@ -980,7 +980,7 @@
980 "@executable_path/Frameworks", 980 "@executable_path/Frameworks",
981 "@executable_path/../../Frameworks", 981 "@executable_path/../../Frameworks",
982 ); 982 );
983 MARKETING_VERSION = 0.6.1; 983 MARKETING_VERSION = 0.7.0;
984 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets; 984 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets;
985 PRODUCT_NAME = "$(TARGET_NAME)"; 985 PRODUCT_NAME = "$(TARGET_NAME)";
986 SDKROOT = watchos; 986 SDKROOT = watchos;
@@ -996,7 +996,7 @@
996 SKIP_INSTALL = YES; 996 SKIP_INSTALL = YES;
997 CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements; 997 CODE_SIGN_ENTITLEMENTS = OrgstarWatchWidgets/OrgstarWatchWidgets.entitlements;
998 CODE_SIGN_STYLE = Automatic; 998 CODE_SIGN_STYLE = Automatic;
999 CURRENT_PROJECT_VERSION = 11; 999 CURRENT_PROJECT_VERSION = 12;
1000 DEVELOPMENT_TEAM = ZCNAX3VL9D; 1000 DEVELOPMENT_TEAM = ZCNAX3VL9D;
1001 GENERATE_INFOPLIST_FILE = NO; 1001 GENERATE_INFOPLIST_FILE = NO;
1002 INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist; 1002 INFOPLIST_FILE = OrgstarWatchWidgets/Info.plist;
@@ -1005,7 +1005,7 @@
1005 "@executable_path/Frameworks", 1005 "@executable_path/Frameworks",
1006 "@executable_path/../../Frameworks", 1006 "@executable_path/../../Frameworks",
1007 ); 1007 );
1008 MARKETING_VERSION = 0.6.1; 1008 MARKETING_VERSION = 0.7.0;
1009 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets; 1009 PRODUCT_BUNDLE_IDENTIFIER = sh.krz.orgstar.watchkitapp.widgets;
1010 PRODUCT_NAME = "$(TARGET_NAME)"; 1010 PRODUCT_NAME = "$(TARGET_NAME)";
1011 SDKROOT = watchos; 1011 SDKROOT = watchos;
l10n/Localizable.xcstrings +110
@@ -452,6 +452,16 @@
452 } 452 }
453 } 453 }
454 }, 454 },
455 "All Folders": {
456 "localizations": {
457 "de": {
458 "stringUnit": {
459 "state": "translated",
460 "value": "Alle Ordner"
461 }
462 }
463 }
464 },
455 "All day": { 465 "All day": {
456 "localizations": { 466 "localizations": {
457 "de": { 467 "de": {
@@ -462,6 +472,16 @@
462 } 472 }
463 } 473 }
464 }, 474 },
475 "All folders hidden": {
476 "localizations": {
477 "de": {
478 "stringUnit": {
479 "state": "translated",
480 "value": "Alle Ordner ausgeblendet"
481 }
482 }
483 }
484 },
465 "Allow Access to Calendars…": { 485 "Allow Access to Calendars…": {
466 "localizations": { 486 "localizations": {
467 "de": { 487 "de": {
@@ -568,6 +588,16 @@
568 } 588 }
569 } 589 }
570 }, 590 },
591 "Archive files are the ones your agenda files archive to, named by #+ARCHIVE:, an :ARCHIVE: property or org-archive-location.": {
592 "localizations": {
593 "de": {
594 "stringUnit": {
595 "state": "translated",
596 "value": "Archivdateien sind die Dateien, in die deine Agenda-Dateien archivieren, festgelegt durch #+ARCHIVE:, eine :ARCHIVE:-Eigenschaft oder org-archive-location."
597 }
598 }
599 }
600 },
571 "Archive this entry?": { 601 "Archive this entry?": {
572 "localizations": { 602 "localizations": {
573 "de": { 603 "de": {
@@ -1774,6 +1804,16 @@
1774 } 1804 }
1775 } 1805 }
1776 }, 1806 },
1807 "Dimmed folders are hidden by the current Focus.": {
1808 "localizations": {
1809 "de": {
1810 "stringUnit": {
1811 "state": "translated",
1812 "value": "Abgeblendete Ordner sind durch den aktuellen Fokus ausgeblendet."
1813 }
1814 }
1815 }
1816 },
1777 "Done": { 1817 "Done": {
1778 "localizations": { 1818 "localizations": {
1779 "de": { 1819 "de": {
@@ -2109,6 +2149,16 @@
2109 } 2149 }
2110 } 2150 }
2111 }, 2151 },
2152 "Exclude archived tasks": {
2153 "localizations": {
2154 "de": {
2155 "stringUnit": {
2156 "state": "translated",
2157 "value": "Archivierte Aufgaben ausschließen"
2158 }
2159 }
2160 }
2161 },
2112 "Expand": { 2162 "Expand": {
2113 "localizations": { 2163 "localizations": {
2114 "de": { 2164 "de": {
@@ -2510,6 +2560,26 @@
2510 } 2560 }
2511 } 2561 }
2512 }, 2562 },
2563 "Hide %@": {
2564 "localizations": {
2565 "de": {
2566 "stringUnit": {
2567 "state": "translated",
2568 "value": "%@ ausblenden"
2569 }
2570 }
2571 }
2572 },
2573 "Hide Folders": {
2574 "localizations": {
2575 "de": {
2576 "stringUnit": {
2577 "state": "translated",
2578 "value": "Ordner ausblenden"
2579 }
2580 }
2581 }
2582 },
2513 "Hide Outline": { 2583 "Hide Outline": {
2514 "localizations": { 2584 "localizations": {
2515 "de": { 2585 "de": {
@@ -2740,6 +2810,16 @@
2740 } 2810 }
2741 } 2811 }
2742 }, 2812 },
2813 "Leaves folders out of the agenda and widgets, and mutes their reminders, while this Focus is on.": {
2814 "localizations": {
2815 "de": {
2816 "stringUnit": {
2817 "state": "translated",
2818 "value": "Lässt Ordner aus der Agenda und den Widgets weg und stellt ihre Erinnerungen stumm, solange dieser Fokus aktiv ist."
2819 }
2820 }
2821 }
2822 },
2743 "Left Option": { 2823 "Left Option": {
2744 "localizations": { 2824 "localizations": {
2745 "de": { 2825 "de": {
@@ -3412,6 +3492,16 @@
3412 } 3492 }
3413 } 3493 }
3414 }, 3494 },
3495 "No folders hidden": {
3496 "localizations": {
3497 "de": {
3498 "stringUnit": {
3499 "state": "translated",
3500 "value": "Keine Ordner ausgeblendet"
3501 }
3502 }
3503 }
3504 },
3415 "No habits in the agenda. Give an entry STYLE: habit.": { 3505 "No habits in the agenda. Give an entry STYLE: habit.": {
3416 "localizations": { 3506 "localizations": {
3417 "de": { 3507 "de": {
@@ -4789,6 +4879,16 @@
4789 } 4879 }
4790 } 4880 }
4791 }, 4881 },
4882 "Show a folder from the Folders menu.": {
4883 "localizations": {
4884 "de": {
4885 "stringUnit": {
4886 "state": "translated",
4887 "value": "Zeige einen Ordner über das Menü „Ordner“."
4888 }
4889 }
4890 }
4891 },
4792 "Show days without entries": { 4892 "Show days without entries": {
4793 "localizations": { 4893 "localizations": {
4794 "de": { 4894 "de": {
@@ -5403,6 +5503,16 @@
5403 } 5503 }
5404 } 5504 }
5405 }, 5505 },
5506 "The folders the agenda shows": {
5507 "localizations": {
5508 "de": {
5509 "stringUnit": {
5510 "state": "translated",
5511 "value": "Die Ordner, die die Agenda zeigt"
5512 }
5513 }
5514 }
5515 },
5406 "The icon shows in the Dock while orgstar runs. Finder, and the Dock after orgstar quits, show the default icon.": { 5516 "The icon shows in the Dock while orgstar runs. Finder, and the Dock after orgstar quits, show the default icon.": {
5407 "localizations": { 5517 "localizations": {
5408 "de": { 5518 "de": {
scripts/build-app.sh +1 −1
@@ -8,7 +8,7 @@
8set -eu 8set -eu
9 9
10cd "$(dirname "$0")/.." 10cd "$(dirname "$0")/.."
11version="${1:-0.6.1}" 11version="${1:-0.7.0}"
12build="${2:-$version}" 12build="${2:-$version}"
13sign="${ORGSTAR_SIGN:--}" 13sign="${ORGSTAR_SIGN:--}"
14app=".build/app/orgstar.app" 14app=".build/app/orgstar.app"
scripts/build-ios-app.sh +1 −1
@@ -5,7 +5,7 @@
5set -eu 5set -eu
6 6
7cd "$(dirname "$0")/.." 7cd "$(dirname "$0")/.."
8version="${1:-0.6.1}" 8version="${1:-0.7.0}"
9app=".build/ios-app/orgstar.app" 9app=".build/ios-app/orgstar.app"
10products=".build/ios/Build/Products/Debug-iphonesimulator" 10products=".build/ios/Build/Products/Debug-iphonesimulator"
11 11
scripts/build-watch-app.sh +1 −1
@@ -7,7 +7,7 @@
7set -eu 7set -eu
8 8
9cd "$(dirname "$0")/.." 9cd "$(dirname "$0")/.."
10version="${1:-0.6.1}" 10version="${1:-0.7.0}"
11app=".build/watch-app/OrgstarWatch.app" 11app=".build/watch-app/OrgstarWatch.app"
12products=".build/watch/Build/Products/Debug-watchsimulator" 12products=".build/watch/Build/Products/Debug-watchsimulator"
13# The app group the complications read the agenda from, on the watch. 13# The app group the complications read the agenda from, on the watch.