Linux sleep timer

Nightcap is a free, open-source Linux sleep timer that suspends your computer after a set time, with a tray icon and a slow fade.

You could run sleep 1h && systemctl suspend and leave a terminal open. Nightcap gives you a countdown you can pause, extend or cancel instead.

Free and open source, for x86_64.

Linux sleep timer: the Nightcap window counting down 32 minutes before the computer suspends at 10:45 PM

Built on what your system already has

Suspend, hibernate and shut down go through systemd-logind and follow your polkit rules. Volume works with PipeWire, PulseAudio or ALSA.

Laptop backlights dim through logind or brightnessctl, and other screens get a see-through dark layer.

Right there in your tray

Start a 15, 30, 45 or 90 minute or 1 hour timer, check the time left, pause, add 15 minutes or cancel.

KDE Plasma shows the tray icon out of the box. On GNOME, add an AppIndicator extension.

It fades out like a TV

Twenty minutes before the end, the screen starts to dim, then the volume comes down.

Whatever you're watching or listening to trails off instead of cutting out.

Only options that work

Hibernate only appears when logind says your computer can hibernate without a password prompt.

One program, no account

Extract the tarball and run it. It works offline.

MIT or Apache 2.0

Read the code, build it yourself, or send a patch.

Suspend on a timer tonight

Extract it and run ./nightcap/nightcap. Getting started covers tray support.

More ways to use Nightcap

All use cases · User guide