Command: screensaver

Control the macOS screensaver.

Usage

Usage: m screensaver [OPTIONS]

Description: Launch the screensaver, check its status, or set password requirement to unlock.

Options:
  --help                             Show this help message
  --askforpassword <enable|disable>  Get or set password requirement to unlock the screensaver.
                                     If no argument is provided, it will display the current setting.

Examples

Start the Screensaver

Running m screensaver with no arguments will immediately start the screensaver.

m screensaver

Manage Password Requirement

The --askforpassword option controls whether a password is required to exit the screensaver.

# Enable the password requirement
m screensaver --askforpassword enable

# Disable the password requirement
m screensaver --askforpassword disable

# Check the current setting
m screensaver --askforpassword
# Output: Screensaver askforpassword: enabled