Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Esyen ☕

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.

Two modes

  • Awake — uses caffeinate to 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.

Install

Option 1: Download the prebuilt .app

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:

  1. Try to open Esyen.app — macOS will refuse.
  2. Open System Settings → Privacy & Security.
  3. Scroll down, find the message about Esyen, and click Open Anyway.
  4. Enter your Mac password.

After that, it opens normally.

Note: Apple Silicon (M-series) only. Intel Macs are not supported.

Option 2: Run from source

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

Build the .app yourself

.venv/bin/pip install py2app
rm -rf build dist
.venv/bin/python setup.py py2app
# → dist/Esyen.app

To 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.zip

How it works

Esyen 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 1 via 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.

License

MIT — see LICENSE.

Credits

Built with rumps & coffee.

— Pond Narongrit

About

Keep your Mac awake from the menu bar — caffeinate + pmset wrapped in a tiny rumps UI with countdowns and safety guardrails.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages