Nightcap GitHub

A nightcap for monitors that won't go to sleep.

Lock your PC with a stream still playing and Windows leaves the screens on all night. Nightcap is a tiny tray app that turns them off when you lock, and keeps them off.

Free and open source. The app is about 75 kB.

Nightcap turned the monitor off, and it stays off.

What happens when you lock

Browsers ask Windows to keep the display on while video plays, and Windows goes along with it on the lock screen too. There is no setting to change that, so Nightcap steps in.

  1. You press Win+L

    Lock the way you always do. Nightcap notices the moment the session locks.

  2. It waits a moment

    Two seconds by default. You can pick anything up to five minutes.

  3. The monitors turn off

    All of them, even with a video still playing in the browser.

  4. They stay off

    Every 30 seconds with no keyboard or mouse activity, Nightcap turns them off again. Wake the screen to sign in and it leaves you alone.

Everything it does fits in one menu

Nightcap lives in the system tray. Click its icon for the whole interface.

Good to know

  • Windows will warn you about the download

    The installer isn't code-signed, so SmartScreen shows a warning the first time you run it. The source is a single C file if you would rather read it or build it yourself.

  • No admin rights needed

    It installs for your account only and can be removed from the installed apps list in Windows Settings.

  • It does nothing until you lock

    While you're using your PC, Nightcap sits idle. Your normal screen timeout and video watching are untouched.

  • Prefer no installer?

    The latest release also has nightcap.exe on its own. Put it anywhere and run it.