個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Free macOS menu bar app that keeps a MacBook running with the lid closed, no external display needed. Timer, battery stop and heat safety put sleep back on their own. macOS 14+, Apple silicon and Intel.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A menu bar switch that keeps a Mac running with the lid closed. Turn it on for good, for a set time, or until the battery reaches a level you pick.
Paste this into Terminal:
curl -fsSL https://raw.githubusercontent.com/intuito-studio/nosleep/main/install.sh | bash
It downloads the latest release, puts NoSleep in Applications and opens it. Running it again reinstalls the latest version.
Needs macOS 14 or later, on Apple silicon or Intel.
Click the cat in the menu bar. It sleeps curled up when the Mac sleeps normally, and stares at a laptop, dark circles under its eyes, while the Mac is kept awake.
1:42.When a timer or the battery stop ends a session while the lid is shut, NoSleep puts the Mac to sleep straight away, so it isn't left running in a bag.
During a session, closing the lid turns the display off, mutes the audio and switches on Low Power Mode. Opening it unmutes and switches Low Power Mode back off. NoSleep only undoes what it did itself, so a mute or Low Power Mode you set yourself stays. The timer keeps running throughout. The built-in microphone is cut off in hardware while the lid is closed, so record with AirPods or an external mic.
On a MacBook with a lid angle sensor, the cat comes up from below the screen in Liquid Glass as the lid passes upright during a session, its paws over the bottom edge and its lit eyes following the pointer: a sign NoSleep is holding on. Fold the screen as the lid closes, in Settings, adds Mac Duo's fold: the desktop holds still while the lid turns around it, frosting and darkening from the top. The fold needs Screen Recording, asked for when you switch it on. Nothing shows with NoSleep off or with the lid open as usual.
NoSleep keeps the Mac awake; macOS keeps it connected. To fall back to your iPhone when the Wi-Fi drops, set System Settings → Wi-Fi → Ask to join hotspots to Automatic. The iPhone needs the same Apple Account.
Settings… in the panel lists what recent sessions did: when the lid closed and opened, what changed, and why a session ended.
NoSleep checks for a new release once a day. When there is one, a notification and the panel both offer Update: one click, and it restarts on the new version a few seconds later, still keeping the Mac awake if it was.
Quitting NoSleep switches sleep back on if NoSleep was the one holding it off.
Features 1 to 6 follow Insomnia (MIT), which got there first.
The fold, the hinge angle maths and the lid sensor reader are ported from Mac Duo by Nino Bouchedid (MIT; the notice is in THIRD-PARTY-NOTICES.md). The lid angle sensor's HID interface was first documented by Sam Henri Gold.
Most stay-awake apps hold a power assertion, which stops idle sleep but not lid
sleep. Only pmset disablesleep stops lid sleep, and only root may change it.
The first time you flip the switch, macOS asks for your admin password once.
NoSleep then installs this rule as /etc/sudoers.d/nosleep, after checking it
with visudo:
you ALL=(root) NOPASSWD: /usr/bin/pmset -a disablesleep 0, /usr/bin/pmset -a disablesleep 1, /usr/bin/pmset sleepnow, /usr/bin/pmset -a lowpowermode 0, /usr/bin/pmset -a lowpowermode 1
The rule allows exactly those five commands with exactly those arguments, and nothing else. Reading the current state needs no permission at all.
The terminal and the app use the same setting. If you run
sudo pmset -a disablesleep 1 (or a shell function that wraps it), the menu
bar shows it within two seconds. Once the rule is installed, those exact
commands stop asking for a password in the terminal too.
Quit NoSleep, then:
launchctl bootout gui/$(id -u)/dev.intuito.nosleep.backstop
rm ~/Library/LaunchAgents/dev.intuito.nosleep.backstop.plist
rm -rf /Applications/NoSleep.app
sudo rm /etc/sudoers.d/nosleep
defaults delete dev.intuito.nosleep
Needs Xcode (for actool, which compiles the icon), not just the Command Line Tools.
make run # debug build → .build/NoSleep.app → relaunch it
make test
make release # universal build → dist/NoSleep.dmg
To ship a version: bump VERSION, run make release, and follow the steps it
prints. You tag and push, then attach dist/NoSleep.dmg to a GitHub release.
Both the install line and the in-app updater download that file, so keep its
name.