fix: run action-only commands without presenting launcher

This commit is contained in:
2026-10-18 18:56:56 +02:00
parent a68694e66b
commit 0074c88e5d
5 changed files with 91 additions and 19 deletions
+8 -1
View File
@@ -6,6 +6,13 @@ public struct Application: Identifiable, Sendable {
case emoji
case notes
case toggleTheme
public var presentsView: Bool {
switch self {
case .translate, .emoji, .notes: true
case .toggleTheme: false
}
}
}
public static let commands = Command.allCases.map { Application(command: $0) }
public let command: Command?
@@ -23,7 +30,7 @@ public struct Application: Identifiable, Sendable {
case .translate: "Conjure Translate"
case .emoji: "Conjure Emoji"
case .notes: "Conjure Notes"
case .toggleTheme: "Conjure Toggle Light/Dark Theme"
case .toggleTheme: "Toggle System Theme"
}
self.init(canonicalURL: URL(string: "conjure-command://\(command.rawValue)")!, name: name, command: command)
}