LoginItemSettings

external interface LoginItemSettings(source)

Properties

Link copied to clipboard

true if app is set to open at login and its run key is not deactivated. This differs from openAtLogin as it ignores the args option, this property will be true if the given executable would be launched at login with any arguments.

Link copied to clipboard
Link copied to clipboard
abstract var openAsHidden: Boolean

true if the app is set to open as hidden at login. This does not work on macOS 13 and up.

Link copied to clipboard
abstract var openAtLogin: Boolean

true if the app is set to open at login.

Link copied to clipboard
abstract var restoreState: Boolean

true if the app was opened as a login item that should restore the state from the previous session. This indicates that the app should restore the windows that were open the last time the app was closed. This setting is not available on MAS builds or on macOS 13 and up.

Link copied to clipboard
abstract var status: String

can be one of not-registered, enabled, requires-approval, or not-found.

Link copied to clipboard

true if the app was opened as a hidden login item. This indicates that the app should not open any windows at startup. This setting is not available on MAS builds or on macOS 13 and up.

Link copied to clipboard

true if the app was opened at login automatically.