From b8f30cb6fce3e42c2b3a9e04905f573139faf822 Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Sun, 11 Oct 2026 23:56:01 +0200 Subject: [PATCH] feat: hide launcher from the Dock --- README.md | 7 +++++-- Resources/Info.plist | 2 ++ Sources/Conjure/ConjureApp.swift | 9 ++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0f9dd3d..0059fc3 100644 --- a/README.md +++ b/README.md @@ -34,14 +34,17 @@ Open `Package.swift` in Xcode to edit the project. Use the bundled app above to - Up/Down or Control-K/Control-J changes the selection without leaving search or modifying its text. - Return, keypad Enter, the Open Application button, or a double-click opens the selection. - Escape or Command-W dismisses the launcher and restores the previously active application. Switching focus away dismisses it without stealing focus back. -- Reopen from Finder or the Dock to show it again with an empty search. Dismissal leaves the process running; Command-Q quits it. +- Reopen from Finder to show it again with an empty search. Dismissal leaves the process running; Command-Q quits it. - Standard macOS text-editing shortcuts work in the search field. - Command-comma opens the native Settings window. +- Right-click the launcher background for Settings and Quit. - Drag the panel background to move it. +Conjure runs as a native accessory app: no Dock icon, app-switcher entry, or menu-bar menus. Keyboard menu shortcuts remain available while its window is focused. + ## Global shortcut -Open **Conjure → Settings…** (`⌘,`), click **Record Shortcut…**, and press a combination containing Command, Option, or Control. Shift can be added. The shortcut is saved locally and restored when Conjure starts. No shortcut is claimed until you choose one; **Clear** disables it. +Show the launcher and press `⌘,`, or right-click its background and choose **Settings…**. Click **Record Shortcut…** and press a combination containing Command, Option, or Control. Shift can be added. The shortcut is saved locally and restored when Conjure starts. No shortcut is claimed until you choose one; **Clear** disables it. For Command-Space, click **Use ⌘Space**. If it conflicts, open **System Settings → Keyboard → Keyboard Shortcuts** and disable or change the conflicting Spotlight or Input Sources binding, or another app's shortcut, then try again. The Settings window includes an **Open Keyboard Settings…** button. Conjure reports conflicts rather than modifying macOS preferences, and a failed change preserves your working shortcut. diff --git a/Resources/Info.plist b/Resources/Info.plist index ec7c997..210ae4e 100644 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -22,6 +22,8 @@ 1 LSMinimumSystemVersion 14.0 + LSUIElement + NSHighResolutionCapable NSPrincipalClass diff --git a/Sources/Conjure/ConjureApp.swift b/Sources/Conjure/ConjureApp.swift index a0231a3..8212144 100644 --- a/Sources/Conjure/ConjureApp.swift +++ b/Sources/Conjure/ConjureApp.swift @@ -8,7 +8,7 @@ struct ConjureApp { let application = NSApplication.shared let delegate = ApplicationDelegate() application.delegate = delegate - application.setActivationPolicy(.regular) + application.setActivationPolicy(.accessory) application.mainMenu = makeMainMenu(delegate: delegate) // NSApplication holds its delegate weakly. @@ -95,6 +95,13 @@ private final class ApplicationDelegate: NSObject, NSApplicationDelegate { private lazy var settings = SettingsWindowController(shortcut: shortcut) func applicationDidFinishLaunching(_ notification: Notification) { + let menu = NSMenu() + let settingsItem = menu.addItem(withTitle: "Settings…", action: #selector(showSettings(_:)), keyEquivalent: ",") + settingsItem.target = self + menu.addItem(.separator()) + let quitItem = menu.addItem(withTitle: "Quit Conjure", action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q") + quitItem.target = NSApplication.shared + launcher.window?.contentView?.menu = menu launcher.present() do { try shortcut.start()