This specifies the time in seconds you would like caffeinate to stay active (after 3600 seconds, or one hour, your Mac will sleep again).Ĭheckout man caffeinated from the command line for more options. But if the power cable is connected and the MacBook is using that power source, Id like to prevent it from sleeping. You can also specify a timeout using caffeinate -t 3600 InsomniaX is nothing but a very small utility, which keeps your MacBook in its sleep mode even when you shut the lid down. I mean, if the MacBook is using the battery as its energy source, Id like it to sleep when closing the lid. The command has a lot to offer, for example you could ask the hard disks from not sleeping using caffeinate -m, or prevent the display from going blank with caffeinate -d. If you open and close your lid again, your Mac will get sleepy again. You can stop the command and close the Terminal session as soon as your lid is closed (and stays closed). To terminate the behaviour, simply press CTRL+C – just like you would to stop any other shell command. The cursor will disappear and your Mac won’t go to sleep. Open the Terminal app (under Applications – Utilities), and simply type While several GUI tools are available (such as InsomniaX, or the Nosleep Extension, you can also call caffeinate from the command line without installing anything. This is the default behaviour if an external monitor is attached, but if that’s not the case, MacBooks just go to sleep as soon as you close the lid. There’s a built-in command line tool in every Mac called caffeinate that prevents your computer from going to sleep, even when the lid is closed.
0 Comments
Leave a Reply. |