Skip to content

Commit

Permalink
add launch at login to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
raine committed Sep 24, 2024
1 parent dcb0f84 commit ec909a4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Lolgato/Settings.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import KeyboardShortcuts
import LaunchAtLogin
import SwiftUI

struct SettingsView: View {
Expand All @@ -7,7 +8,7 @@ struct SettingsView: View {
var body: some View {
GeneralSettingsView(appState: appState)
.padding(30)
.frame(width: 500, height: 300)
.frame(width: 500, height: 380)
}
}

Expand All @@ -28,6 +29,14 @@ struct GeneralSettingsView: View {
Text("Turn off lights when system goes to sleep or is locked.")
}

Divider()

settingRow(label: "Launch:") {
LaunchAtLogin.Toggle("Automatically at system startup")
}

Divider()

shortcutRow(
label: "Toggle Lights:",
shortcut: .toggleLights,
Expand All @@ -53,6 +62,7 @@ struct GeneralSettingsView: View {
KeyboardShortcuts.reset(.toggleLights)
appState.lightsOnWithCamera = false
appState.lightsOffOnSleep = false
LaunchAtLogin.isEnabled = false
}
}

Expand Down

0 comments on commit ec909a4

Please sign in to comment.