[go: up one dir, main page]

Skip to content
Wham.sh

Menu bar app for macOS

Close the lid. Your Mac stays awake.

A one-click menu bar switch that keeps your Mac awake, for real, even with the lid shut.

  • Download

    Apple silicon or Intel, macOS 11 or later

  • Homebrew

    brew install gwendall/tap/wham

Try it

One switch in your menu bar.

That is the whole app. A sun when your Mac stays awake, a moon when it can sleep, a little chime either way. Go on, click it.

Sound on: that is the real chime, an 8-bit arpeggio played by your browser.

What it is for

Made for long jobs.

Start it, close the lid, walk away. Anything that takes longer than you want to sit and watch keeps going until it is done.

How it works

Three steps. The third one is the point.

  1. 1Download and open Wham

    Drag it to Applications and open it. It lives in your menu bar, next to the clock.

  2. 2Click the switch

    The sun comes out and the chime plays. The very first time, macOS asks for your password, once.

  3. 3Close the lid

    Your Mac keeps going. Claude Code finishes its task, the export reaches the last frame, the download hits 100%.

Most keep-awake apps only ask macOS to stay up, which it ignores once the lid closes, so Wham turns sleep off itself and back on when you are done.

Tiny

You will forget it is running.

Wham does one thing: every two seconds, it reads one kernel flag. While on, it also listens for the battery, the heat, the lid and the network, which macOS announces. The rest of the time it does nothing at all, and CI holds it to a budget.

For scale: KeepingYouAwake takes 7.6 MB on disk, and Amphetamine is a 6.7 MB download before its helper apps. Measured on a MacBook Air, macOS 26.6.

Compare

Most keep-awake apps stop at the lid.

Keeping a Mac awake with the lid open is easy. Shut it, and macOS ignores the polite way to ask. Here is how the well-known apps handle a closed lid, on battery, with no screen plugged in.

On their own, App Store apps cannot, and the honest ones say so: Lungo “will not prevent your computer from sleeping if you close the lid. This is a Mac App Store limitation.” Source

FAQ

Good questions.

No. Download Wham, open it, and everything happens in the menu bar: one click to keep your Mac awake, one click to let it sleep. The commands at the bottom of this page are only there for people who like typing them.

Yes. Turning sleep off takes an administrator: the first time you click, macOS asks for your password once, so Wham can flip the sleep setting without asking again. That is the only thing it is allowed to do. The app is signed by its developer and notarized by Apple.

Yes. Right-click the switch and pick Turn On For 1, 2, 4 or 8 hours: each says when it would end. While it runs, the menu says how long is left, the switch's colors drain away, and a note drops down five minutes before the end. No Time Limit keeps it on. From a terminal, wham on 2h, or wham run before a command to stay awake just while it runs.

Wham will not let it cook: when macOS calls your Mac critically hot, Wham turns off and lets it sleep. Still, a busy laptop in a closed bag has nowhere to put its heat, and Wham is meant for desks, docks and shelves, where air can move. Before you pack up, flip it off and your Mac sleeps when you close it, like it always did.

Wham itself costs next to nothing. But an awake Mac drains its battery like an awake Mac, lid closed or not, so on battery, or on a charger too weak to keep up, Wham lets go at 10%, or at 2, 5, 20 or 30% if you change its Battery Limit: your Mac sleeps with your work saved instead of running flat. For long jobs, plug it in. There is no Never: while Wham is on, macOS's own sleep on a nearly flat battery is off too, so 2% is the lowest, the last moment your Mac can still go to sleep safely.

As it always is. With no other display, Wham turns the built-in screen off a few seconds after you close the lid, and your Mac locks as your Lock Screen settings say. With a monitor plugged in, Wham leaves the screens alone.

Yes. Lock it with the Touch ID button or Control-Command-Q: the screen goes dark and your password guards it as usual, but your Mac stays awake behind the lock, and whatever was running keeps running.

No. That is what macOS asks for its own “clamshell mode”, and Wham does not need any of it. Close the lid on a bare laptop and it stays awake.

Usually. Your Mac does not sleep, so it stays on its Wi-Fi when you close the lid. But the Wi-Fi antenna sits in the lid, and on some Macs the signal gets weaker once it is shut: stand the closed Mac on its hinge rather than flat. An iPhone's Personal Hotspot is turned off by the phone itself when it thinks no one is using it, and the Mac does not always rejoin: a USB cable holds better. Over cellular, the carrier cuts a long SSH session that stays quiet: ServerAliveInterval 60 in your SSH config keeps it alive. Wham keeps your Mac awake; it cannot keep a network up.

Sleep comes back. Quitting turns the setting off on the way out, whether you quit from its menu (right-click the switch), from a script, or by logging out. And if Wham ever goes away without quitting, a crash or a force quit, its watchdog gives sleep back within a second. After a restart, Wham stays off unless you check Stay On After Restart in its menu.

Yes. Wham keeps a journal of what it did and saw: when it turned on and off and why, the lid, sleep and wake, the battery, the heat, and while on, whether the network stayed up. In a terminal, wham log prints its last lines; it is also in ~/Library/Logs/Wham, which Console opens. It stays on your Mac, is never sent anywhere, and holds no network name, no address, and neither your name nor your Mac's. Two small files at most.

Yes. A few times a day it asks wham.sh for the latest version, checks that its developer signed it, and swaps it in, with the switch left as it was. Check for Updates in its menu does it right away. Turn off Update Automatically and Wham only tells you when a new version is out: a pink dot on the switch, and the update waiting in its menu (right-click). What changed in each one: What's new.

Wham speaks English, French, Spanish, German, Italian, Portuguese, Japanese, Korean and Chinese (Simplified and Traditional), and follows your Mac's language. To give Wham another language than your Mac's, open System Settings > General > Language & Region and add Wham under Applications. The wham command and its journal stay in English.

Quit Wham from its menu, which gives sleep back, then drag Wham from Applications to the Trash. For a full cleanup, including the password rule, use the one-line uninstaller under For developers.

App Store apps live in a sandbox, and a sandboxed app cannot change the Mac's sleep setting. The ones that try settle for asking macOS to stay up, which is exactly what stops working when you close the lid.

Install

The same signed app as the download, plus the wham command. Run it again to update.

curl -fsSL wham.sh | sh
brew install gwendall/tap/wham
npx wham.sh

Curious first? Read install.sh: it downloads the latest release, checks its signature, puts it in Applications and opens it.

The wham command

wham on
on: your Mac stays awake, even with the lid closed
wham on 2h
on until 4:30 PM: your Mac stays awake, even with the lid closed
wham status
on until 4:30 PM: your Mac stays awake, even with the lid closed
wham off
off: your Mac sleeps as usual
wham run make
# awake while make runs, then as it was before

Uninstall

curl -fsSL wham.sh/uninstall | sh

It quits Wham, which gives sleep back, then removes the app, the wham command, its settings, its journal and the sudoers rule below. With Homebrew: brew uninstall --zap wham. Read uninstall.sh.

# /private/etc/sudoers.d/wham, for user ID 501 (you)
#501 ALL=(root) NOPASSWD: /usr/bin/pmset -a disablesleep 0, /usr/bin/pmset -a disablesleep 1