mirror of
https://github.com/maxgoedjen/secretive.git
synced 2024-11-26 15:37:07 +00:00
16 lines
329 B
Swift
16 lines
329 B
Swift
import Foundation
|
|
import ServiceManagement
|
|
|
|
struct LaunchAgentController {
|
|
|
|
func install() -> Bool {
|
|
_ = setEnabled(false)
|
|
return setEnabled(true)
|
|
}
|
|
|
|
private func setEnabled(_ enabled: Bool) -> Bool {
|
|
SMLoginItemSetEnabled("com.maxgoedjen.Secretive.SecretAgent" as CFString, enabled)
|
|
}
|
|
|
|
}
|