Initial commit

This commit is contained in:
Alex E. Tafoya
2026-09-17 15:15:45 -05:00
commit 87fe7927c4
36 changed files with 5113 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// LaunchAtLogin.swift
// GreenshotMac
import Foundation
import ServiceManagement
enum LaunchAtLogin {
static var isEnabled: Bool {
get { SMAppService.mainApp.status == .enabled }
set {
do {
if newValue {
if SMAppService.mainApp.status != .enabled {
try SMAppService.mainApp.register()
}
} else {
if SMAppService.mainApp.status == .enabled {
try SMAppService.mainApp.unregister()
}
}
} catch {
NSLog("GreenshotMac: could not change launch at login: \(error.localizedDescription)")
}
}
}
}