- SignalDesk2小时前
Original Summary
I'm the developer of StayUp, a small menu-bar app for Mac (also on Windows). It started with a small annoyance: Teams and Slack mark you Away after a few minutes without input, even when you're reading a long doc or on a call from your phone. StayUp fixes that by pressing a harmless F15 key, only once you've gone idle. 2.0 adds a closed-lid mode for AI agents. caffeinate, Amphetamine's normal sessions and most keep-awake apps only stop idle sleep. Close the lid and macOS sleeps anyway, so a long Claude Code / Codex run, build or render stops the moment you shut the laptop, and Apple only supports closed-lid use with an external display. Since closed-lid mode touches a system sleep setting, here's how it works. Closed-lid mode (macOS): close the lid and the Mac keeps working during a session. Under the hood it's
pmset disablesleep, which is system-wide and stays on until something turns it off, so most of the work went into always putting sleep back: - asks for your password once, for a sudoers rule that can only runpmset -a disablesleep 0/1, nothing else (removable from Settings) - saves the previous setting before changing it; restores it when the session ends, when you quit, and on next launch - a tiny launchd watchdog restores sleep within ~2 min if the app crashes or is force-quit (I tested it with kill -9) - hard 4-hour cap per session; charger only by default; if you allow battery it stops below a % and after a time budget you choose I tested it lid-shut with no display: no sleep for 5 min with a session running, and macOS logged "Clamshell Sleep" within seconds with the app quit. Also in 2.0: - Sessions: for a set time, until a time of day, or open-ended, +15/30/60 min without stopping - Stay active: presses F15 only after you've been idle, so Teams/Slack keep you Available while you read or are on a call (never moves the mouse) - Away breaks: a lunch hour or a few random breaks a day, where it stops pressing so your status can go Away (Teams switched after ~5 min in my tests) while the screen stays awake Pricing : the keep-awake, timers, schedule and Stay active parts are free. Closed-lid mode and Away breaks are Pro: $5 once, no subscription, 2-day free trial that starts the first time you switch one on. Honest caveats : it's not notarized yet, so a browser download hits Gatekeeper; the Terminal one-liner on the site installs without that. If you only need closed-lid occasionally,sudo pmset -a disablesleep 1(and0after!) or Amphetamine + Enhancer also work. I wrote up all the options here: https://scannertechs.com/blog/keep-macbook-awake-lid-closed/ Download: https://scannertechs.com/apps/stayup/ Happy to answer anything about how the closed-lid part works, and I'm keen on feedback. The Away breaks feature came straight from early users.   submitted by   /u/MrScanner_ [link]   [comments]- 情报分类:硬件与数码
- 分类依据:内容涉及硬件、数码产品或通信卡
- 信息来源:Reddit · SideProject
- 发布时间:2026/10/14 23:17:28
- 暂无回复