I am using a MacBook with an external monitor. While it is connected I do not need the inbuilt monitor, it is just deflecting. So I close the lid. The problem is that you cannot do that when the Mac is not connected to power because the external monitor immediately turns off. So I developed this small AppleScript-based application which tells the MacBook to not go into standby.
Be aware that this tool is quite powerful. It overrides system values. You need to know that, if the tool is activated, your Mac cannot go into standby. So if you put your Mac in a closed bag it cannot cool. This can cause overheating or other damage. So please make sure the Mac can cool!
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
The technique behind Sleepo is quite simple: It manipulates the power
management settings (pmset
). For this, it needs superuser
(sudo)/administrator privileges.
Currently no download is available. Just clone this repo and export Sleepo in Xcode.
The user interface is the easiest way to manipulate pmset
. Just start
Sleepo and (de)activate it with the switch. That's it!
You use the commands at your own risk!
If you do not want do download Sleepo, you can directly manipulate pmset
.
If you want to stop your Mac to go into sleep when the lid is closed
open up your Terminal
and enter the following command:
sudo pmset displaysleep 0
To reset pmset
to its defaults just change the 0
to a 1
.
That's it! If you want to display the current settings type:
sudo pmset -g
Sleepo works on:
- MacBook Pro 2012 / Intel / macOS Catalina 10.15
- MacBook Air 2020 / Intel / macOS Ventura 13
You are welcome to extend this list.