style: use moon emoji for system theme command
This commit is contained in:
@@ -126,7 +126,7 @@ The picker works offline with 1,870 emoji from [gemoji v4.1.0](https://github.co
|
|||||||
|
|
||||||
## System theme
|
## System theme
|
||||||
|
|
||||||
Search for **Toggle System Theme** (try `theme` or `system`) and press Return to switch macOS from light to dark appearance or back. Selecting it in the launcher dismisses Conjure on success. Its global shortcut runs in the background without presenting a window or changing the current launcher view. You can favorite it or assign a shortcut in Settings; existing theme keybindings and favorites survive the rename.
|
Search for **Toggle System Theme**, identified by its centered 🌗 icon (try `theme` or `system`), and press Return to switch macOS from light to dark appearance or back. Selecting it in the launcher dismisses Conjure on success. Its global shortcut runs in the background without presenting a window or changing the current launcher view. You can favorite it or assign a shortcut in Settings; existing theme keybindings and favorites survive the rename.
|
||||||
|
|
||||||
The first use may ask permission to control **System Events**. Allow it under **System Settings → Privacy & Security → Automation → Conjure**. If permission is denied or macOS reports an error, Conjure shows the failure in the visible launcher or a standalone alert when the launcher is hidden. Conjure's own launcher keeps its existing dark styling.
|
The first use may ask permission to control **System Events**. Allow it under **System Settings → Privacy & Security → Automation → Conjure**. If permission is denied or macOS reports an error, Conjure shows the failure in the visible launcher or a standalone alert when the launcher is hidden. Conjure's own launcher keeps its existing dark styling.
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
|||||||
private static let emojiIcon = makeEmojiIcon("🤔")
|
private static let emojiIcon = makeEmojiIcon("🤔")
|
||||||
private static let notesIcon = makeEmojiIcon("📔")
|
private static let notesIcon = makeEmojiIcon("📔")
|
||||||
private static let translateIcon = makeEmojiIcon("🌏")
|
private static let translateIcon = makeEmojiIcon("🌏")
|
||||||
|
private static let themeIcon = makeEmojiIcon("🌗")
|
||||||
|
|
||||||
private static func makeEmojiIcon(_ emoji: String) -> NSImage {
|
private static func makeEmojiIcon(_ emoji: String) -> NSImage {
|
||||||
let text = NSAttributedString(string: emoji, attributes: [.font: NSFont.systemFont(ofSize: 28)])
|
let text = NSAttributedString(string: emoji, attributes: [.font: NSFont.systemFont(ofSize: 28)])
|
||||||
@@ -566,13 +567,13 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
|||||||
cell.imageView?.image = Self.notesIcon
|
cell.imageView?.image = Self.notesIcon
|
||||||
cell.toolTip = "Write notes with Markdown and images"
|
cell.toolTip = "Write notes with Markdown and images"
|
||||||
case .toggleTheme:
|
case .toggleTheme:
|
||||||
cell.imageView?.image = NSImage(systemSymbolName: "circle.lefthalf.filled", accessibilityDescription: nil)
|
cell.imageView?.image = Self.themeIcon
|
||||||
cell.toolTip = "Switch macOS between light and dark appearance"
|
cell.toolTip = "Switch macOS between light and dark appearance"
|
||||||
default:
|
default:
|
||||||
cell.imageView?.image = Self.translateIcon
|
cell.imageView?.image = Self.translateIcon
|
||||||
cell.toolTip = "Translate English to Japanese"
|
cell.toolTip = "Translate English to Japanese"
|
||||||
}
|
}
|
||||||
cell.imageView?.contentTintColor = entry.command == .toggleTheme ? SunsetPalette.accent : nil
|
cell.imageView?.contentTintColor = nil
|
||||||
} else {
|
} else {
|
||||||
let application = results[row]
|
let application = results[row]
|
||||||
cell.textField?.stringValue = application.name
|
cell.textField?.stringValue = application.name
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import AppKit
|
|||||||
import Testing
|
import Testing
|
||||||
@testable import Conjure
|
@testable import Conjure
|
||||||
|
|
||||||
@Test(arguments: ["emoji", "notes", "translate"])
|
@Test(arguments: ["emoji", "notes", "translate", "theme"])
|
||||||
@MainActor func commandArtworkHasBalancedVisiblePadding(query: String) throws {
|
@MainActor func commandArtworkHasBalancedVisiblePadding(query: String) throws {
|
||||||
_ = NSApplication.shared
|
_ = NSApplication.shared
|
||||||
let launcher = LauncherWindowController()
|
let launcher = LauncherWindowController()
|
||||||
|
|||||||
Reference in New Issue
Block a user