Skip to content

Commit 046acc4

Browse files
laurentftechclaude
andcommitted
Remove Start at Login option
The option was ambiguous when using brew services which already handles auto-start. Removed SMAppService integration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 56b1780 commit 046acc4

File tree

2 files changed

+1
-37
lines changed

2 files changed

+1
-37
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Receive push notifications on your Mac from any source — servers, IoT devices,
1818
- **Robust Reconnection**: Handles network interruptions and sleep/wake gracefully
1919
- **Priority Mapping**: Maps ntfy priority levels to macOS interruption levels (critical, time-sensitive)
2020
- **Menu Bar App**: Runs in the menu bar with quick access to config and reload
21-
- **Start at Login**: Optional auto-start when you log in (via menu bar toggle)
2221
- **Live Config Reload**: Configuration changes are detected and applied automatically
22+
- **Click to Open**: Click notifications to open in browser (configurable per topic)
2323
- **Automatic Permission Request**: Prompts for notification permission on first launch
2424

2525
## Installation
@@ -111,7 +111,6 @@ ntfy-macos serve
111111
On first launch, the app will automatically request notification permission.
112112

113113
The app runs in the menu bar with options to:
114-
- **Start at Login**: Toggle auto-start when you log in
115114
- **Edit Config**: Open config file in your default editor
116115
- **Show Config in Finder**: Reveal config directory
117116
- **Reload Config**: Apply configuration changes

Sources/StatusBarController.swift

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import AppKit
2-
import ServiceManagement
32

43
@MainActor
54
class StatusBarController: NSObject {
65
private var statusItem: NSStatusItem?
76
private var menu: NSMenu?
8-
private var startAtLoginItem: NSMenuItem?
97
var onReloadConfig: (() -> Void)?
108

119
static let shared = StatusBarController()
@@ -39,16 +37,6 @@ class StatusBarController: NSObject {
3937

4038
menu?.addItem(NSMenuItem.separator())
4139

42-
// Start at Login toggle
43-
let loginItem = NSMenuItem(title: "Start at Login", action: #selector(toggleStartAtLogin), keyEquivalent: "")
44-
loginItem.target = self
45-
loginItem.isEnabled = true
46-
loginItem.state = isStartAtLoginEnabled() ? .on : .off
47-
startAtLoginItem = loginItem
48-
menu?.addItem(loginItem)
49-
50-
menu?.addItem(NSMenuItem.separator())
51-
5240
let editConfigItem = NSMenuItem(title: "Edit Config...", action: #selector(editConfig), keyEquivalent: ",")
5341
editConfigItem.target = self
5442
editConfigItem.isEnabled = true
@@ -73,29 +61,6 @@ class StatusBarController: NSObject {
7361
statusItem?.menu = menu
7462
}
7563

76-
private func isStartAtLoginEnabled() -> Bool {
77-
if #available(macOS 13.0, *) {
78-
return SMAppService.mainApp.status == .enabled
79-
}
80-
return false
81-
}
82-
83-
@objc func toggleStartAtLogin() {
84-
if #available(macOS 13.0, *) {
85-
do {
86-
if SMAppService.mainApp.status == .enabled {
87-
try SMAppService.mainApp.unregister()
88-
startAtLoginItem?.state = .off
89-
} else {
90-
try SMAppService.mainApp.register()
91-
startAtLoginItem?.state = .on
92-
}
93-
} catch {
94-
print("Failed to toggle login item: \(error)")
95-
}
96-
}
97-
}
98-
9964
@objc func editConfig() {
10065
let configPath = NSString(string: "~/.config/ntfy-macos/config.yml").expandingTildeInPath
10166
NSWorkspace.shared.open(URL(fileURLWithPath: configPath))

0 commit comments

Comments
 (0)