hammerspoon2-docs
    Preparing search index...

    Variable powerSourceConst

    powerSource: string

    The current power source. Returns "ac" when plugged in, "battery" when on battery power, "ups" when powered by a UPS, or "unknown" if the source cannot be determined.