a note
put the display to sleep
pmset displaysleepnow
put the system to sleep
pmset sleepnow
detect whether display is asleep
# parse the output to extract the Display Asleep state. If nothing is found, the system is awake.
system_profiler SPDisplaysDataType
Available network connection services
scutil --nc list
scutil --nc start "xxx"
scutil --nc stop "xxx"
+V why_null 请备注:from博客园
浙公网安备 33010602011771号