4 ms·
KeepingYouAwake is nice (and I'm not about to pretend the following solution is good for everyone), however, I've found on the last couple of McBook fresh insta
by tylerritchie 6y ago
KeepingYouAwake is nice (and I'm not about to pretend the following solution is good for everyone), however, I've found on the last couple of McBook fresh installs using caffeinate [1] from the terminal is sufficient.
I usually have a terminal open anyway and `caffeinate -d -t 999999` usually does what I want (stay awake until I come back and tell you to go to sleep). Usually it's two keystrokes away (up arrow, enter), if not, that's quick enough to type for my purposes. That said, it's a bad approach if you want to suggest it as a tool for someone's workflow who _doesn't_ have a terminal open all of the time.
[1] https://ss64.com/osx/caffeinate.html https://ss64.com/osx/caffeinate.html
- KMnO4 6y agoYou can omit the -t and it will run forever.
- weaksauce 6y agoyou can throw an alias in your .bashrc or .zshrc and have it even easier... alias caffeine="caffeinate -d -t 999999"
- uncledave 6y agoI tend to use caffeinate to wrap scripts only. I want it to go to sleep and stop eating all my electricity when it’s done.