hammerspoon2-docs
    Preparing search index...

    Function setPower

    • Turns a Wi-Fi interface on or off.

      Parameters

      • state: boolean

        true to power the interface on, false to power it off

      • Optionalinterface: string | null

        the interface name as returned by interfaces(); omit for the system's default Wi-Fi interface

      Returns boolean

      true if the power state was changed successfully, false if the interface doesn't exist or the change failed (see the Console for the reason)