个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证One-click caffeinate for macOS: keep your Mac awake indefinitely or on a timer. Lightweight Swift menu bar app.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A tiny open-source menu bar app for Apple Silicon Macs that keeps your Mac awake, like caffeinate -d with an on/off switch and a timer.
Website: https://mpalarya.github.io/Awake/
arm64) only, macOS 15 Sequoia or laterbrew tap mpalarya/awake https://github.com/MPalarya/Awake
brew trust mpalarya/awake
brew install --cask awake
Homebrew 7 and later require you to trust a third-party tap before installing from it (brew trust).
To upgrade, run brew upgrade (the cask is bumped automatically on every release). To remove it, run brew uninstall --cask awake.
curl -fsSL https://raw.githubusercontent.com/MPalarya/Awake/main/install.sh | bash
This downloads the latest release, installs it into /Applications and launches it. Run the same command again to update.
Both methods skip the Gatekeeper warning described below.
Awake.dmg from the latest release.Release builds are ad-hoc signed but not notarized by Apple, so macOS blocks them the first time you open them.
Awake.app. When the warning appears, click Done.Or, from Terminal:
xattr -dr com.apple.quarantine /Applications/Awake.app
Click the cup icon in the menu bar. It is filled while Awake is on and outlined while it is off.
| Item | What it does |
|---|---|
| Keep Awake | Turns Awake on or off. |
| Until 14:30 | Shown during a timed session. Awake turns itself off at this time. |
| Duration | Indefinitely (the default), 15 or 30 minutes, or 1, 2, 4 or 8 hours. Choosing a duration also turns Awake on. If Awake is already on, the countdown restarts. Your choice is remembered. |
| Launch at Login | Registers the app with SMAppService.mainApp. |
| Quit Awake | Quits the app and lets your Mac sleep normally again. |
If you quit while Awake is on with Indefinitely selected, it turns back on the next time it launches. This lets Launch at Login keep your Mac awake permanently. Timed sessions don't resume.
While Awake is on, the display and the system don't go to sleep when idle. You can still sleep the Mac from the Apple menu. Closing the lid of a MacBook still puts it to sleep unless it is connected to power and an external display (clamshell mode), just like caffeinate.
To check that it's working:
pmset -g assertions | grep Awake
Everything is logged with os.Logger (subsystem com.awake.app):
log stream --predicate 'subsystem == "com.awake.app"'
You need Xcode 16+ or the Command Line Tools on an Apple Silicon Mac.
swift build -c release --arch arm64 # just the binary
scripts/build_app.sh # -> build/Awake.app (ad-hoc signed)
scripts/make_dmg.sh # -> build/Awake.dmg
VERSION=1.2.3 scripts/build_app.sh sets the bundle version. CODESIGN_IDENTITY="Developer ID Application: …" signs with a real identity instead of ad-hoc.
Push a tag that starts with v:
git tag v1.0.0 && git push origin v1.0.0
.github/workflows/release.yml then builds the arm64 app on a macos-15 runner, packages Awake.dmg, attaches it to a GitHub Release for that tag, and bumps Casks/awake.rb on main.
PowerAssertion.swift wraps IOPMAssertionCreateWithName with kIOPMAssertionTypePreventUserIdleDisplaySleep. This is the assertion caffeinate -d creates, and it also prevents idle system sleep. The kernel enforces it, and macOS releases it automatically if the app exits or crashes.AppDelegate.swift handles the menu bar UI and Launch at Login. A timed session arms a single Timer for its end time. Timers don't count time the Mac spends asleep, so the deadline is re-checked against the wall clock on NSWorkspace.didWakeNotification.MIT