In this video, I show you how to automate Amphetamine, the application that keeps your Mac awake with a little AppleScript and Keyboard Maestro as the trigger. Personally, I use the keyboard shortcut Hyper key + A to turn Amphetamine on and off, and it uses the default duration set by AppleScript.
The AppleScript is below is the Script.
tell application "Amphetamine" to start new session with options {duration:4, interval:hours, displaySleepAllowed:false}
This is just a quick tip on how to automate your Mac’s sleep workflow.