A macOS menu bar app that prevents your Mac from sleeping — by wrapping two built-in macOS tools, caffeinate and pmset, in a lightweight UI, countdowns, and safety guardrails.
The name comes from เอสเปรสโซ่เย็น ("esyen") — Thai-style iced espresso.
- Awake — uses
caffeinateto block idle and display sleep. No special permissions required. - Aggressive — goes further with
pmset disablesleep, keeping your Mac awake even when the lid is closed. Needs admin password, because your laptop shouldn't cook in your bag.
Both modes let you pick a duration: 15 minutes, 30 minutes, 1 hour, 2 hours, or 4 hours. Countdown is shown next to the menu bar icon.
No telemetry. No background services. Quit Esyen and everything reverts.
Grab Esyen.zip from Releases, unzip, and drag Esyen.app to /Applications.
Because the app is ad-hoc signed (not paid Apple Developer ID), the first launch needs a Gatekeeper workaround:
- Try to open
Esyen.app— macOS will refuse. - Open System Settings → Privacy & Security.
- Scroll down, find the message about Esyen, and click Open Anyway.
- Enter your Mac password.
After that, it opens normally.
Note: Apple Silicon (M-series) only. Intel Macs are not supported.
git clone https://github.com/dhinsor/esyen.git
cd esyen
# Create a venv and install dependencies
python3 -m venv .venv
.venv/bin/pip install rumps pyobjc
# Run
.venv/bin/python esyen.py.venv/bin/pip install py2app
rm -rf build dist
.venv/bin/python setup.py py2app
# → dist/Esyen.appTo ship to a friend, zip it with ditto (regular zip may strip the ad-hoc signature):
cd dist
ditto -c -k --sequesterRsrc --keepParent Esyen.app Esyen.zipEsyen is a thin Python wrapper around two macOS tools, with rumps providing the menu bar UI.
- Awake Mode: spawns
caffeinate -dis -t <seconds>as a subprocess. The Mac stays awake as long as that process is alive. Killing the process (or quitting Esyen) reverts immediately. - Aggressive Mode: sets
pmset -a disablesleep 1via AppleScript with admin privileges. This is a system-level setting that prevents lid-close sleep, which is why it needs your password. Esyen auto-disables it when the duration ends; an orphan check on startup catches the case where Esyen crashed with the setting still on.
The menu bar icon uses SF Symbols (eye.half.closed.fill / eye.fill / eye.trianglebadge.exclamationmark.fill) rendered as template images, so they adapt to light/dark mode automatically.
MIT — see LICENSE.
Built with rumps & coffee.
— Pond Narongrit