/clamshell_macos

MacOS clamshell mode on battery power with shortcuts app.

MacOS Clamshell mode on battery power.

Propably most pleasant way to switch your Macbook machine between clamshell mode without power adapter.

Create "no-Sleep" shortcut to prevent macbook going sleep after closing the lid.

  1. sudo pmset -a sleep 0
  2. sudo pmset -a disablesleep 1
  3. sudo pmset -a displaysleep 5 (sleep timer set to 5 mins)
image

Create "Sleep" shortcut to get back to default sleep settings.

  1. sudo pmset -a sleep 1
  2. sudo pmset -a disablesleep 0
  3. sudo pmset -a displaysleep 1 (change if you want different sleep timer)
image

Add shortcuts to menu bar simply dropping them to "MENU BAR" folder

image

TroubleShooting

  1. Remeber to check "Run as administrator" box to run the commands with proper permissions.
  2. If your screen goes sleep mode, you have to open the lid to wake up machine (trying to find a solution for that)

Links

Sleep iCloud link: https://www.icloud.com/shortcuts/e2dc776519b04decaff3c9935723b1b9

No sleep iCloud link: https://www.icloud.com/shortcuts/ebbaa6956a884cd590974aad6f7596ad