Shortcuts and Terminal
The keyboard shortcut
Section titled “The keyboard shortcut”⌥⌘K switches Latch on and off from any app. To change it, open Settings → General → Keyboard Shortcut, click the shortcut and press the new keys; Reset puts back ⌥⌘K. Enable global shortcut turns it off.
Apple Shortcuts
Section titled “Apple Shortcuts”Latch adds three actions to the Shortcuts app: Activate Latch, Deactivate Latch and Toggle Latch. Use them in your own shortcuts and automations.
The URL scheme
Section titled “The URL scheme”From Terminal, a script or anything that opens URLs, latch:// controls Latch:
| URL | What it does |
|---|---|
latch:///activate |
Stay awake until turned off |
latch:///activate?minutes=30 |
For 30 minutes |
latch:///activate?hours=2 |
For 2 hours |
latch:///activate?seconds=90 |
For 90 seconds |
latch:///activate?waitpid=1234 |
Until process 1234 exits |
latch:///deactivate |
Stop |
latch:///toggle |
Switch on or off |
For example, in Terminal:
open "latch:///activate?minutes=30"To keep the Mac awake while a long command runs, latch onto its process:
long-running-job & open "latch:///activate?waitpid=$!"Settings → URL Scheme lists the same examples.