Doorstopper is a Raycast extension which prevents your MacBook from going to sleep when you close the lid.
Note:
The underlying commands need to be run withsudoprivileges.
The extension will prompt you for your password by default.
Doorstopper can use Touch ID instead of a password when Touch ID authentication is enabled for sudo. This changes sudo authentication globally, not just within Raycast.
/etc/pam.d/sudo_local.template to /etc/pam.d/sudo_local:
sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
/etc/pam.d/sudo_local:
auth sufficient pam_tid.so
Add the following line to the auth entries in /etc/pam.d/sudo:
auth sufficient pam_tid.so
Changes to /etc/pam.d/sudo can be overwritten by macOS updates. If Touch ID is unavailable or not enabled for sudo, Doorstopper will continue to use the administrator password prompt.
To install the Doorstopper extension, follow these steps:
Once installed, simply trigger the Raycast command palette and search for the Doorstopper commands.
Enable DoorstopperThis command will enable Doorstopper, preventing your MacBook from sleeping when the lid is closed.
Disable DoorstopperThis command will disable Doorstopper, allowing your MacBook to sleep when the lid is closed.
Toggle DoorstopperThis command will toggle the Doorstopper status between enabled and disabled.
Doorstopper StatusThis command will show the current status of Doorstopper (enabled or disabled).
Doorstopper Status Menu BarThis command will show the current status of Doorstopper in the menu bar.