mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-14 10:05:43 +01:00
c8969630f3
Introduced a real Property List Editor. Fixed Theme manager engine. Other minor fixes
25 lines
553 B
Swift
25 lines
553 B
Swift
//
|
|
// RunAtLogin.swift
|
|
// HWMonitorSMC
|
|
//
|
|
// Created by vector sigma on 18/03/18.
|
|
// Copyright © 2018 HWSensor. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
import ServiceManagement
|
|
|
|
extension AppDelegate {
|
|
func setLaunchAtStartup() {
|
|
let success : Bool = SMLoginItemSetEnabled(gHelperID, true)
|
|
UDs.set(success, forKey: kRunAtLogin)
|
|
UDs.synchronize()
|
|
}
|
|
|
|
func removeLaunchAtStartup() {
|
|
let success : Bool = SMLoginItemSetEnabled(gHelperID, false)
|
|
UDs.set(success ? false : true, forKey: kRunAtLogin)
|
|
UDs.synchronize()
|
|
}
|
|
}
|