Skip to content

Instantly share code, notes, and snippets.

@neontorrent
Created April 26, 2022 22:08
Show Gist options
  • Save neontorrent/89ff23cd46afc4626b288e0b409f22c2 to your computer and use it in GitHub Desktop.
Save neontorrent/89ff23cd46afc4626b288e0b409f22c2 to your computer and use it in GitHub Desktop.
macos
#!/bin/sh
# Pump
sudo pmset -a disablesleep 1
sudo pmset -a sleep 0
caffeinate -di
#Sleep
kill `ps -ef | grep caffeinate | grep -v grep | awk '{print $3}'`
sudo pmset -a disablesleep 0
pmset sleepnow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment