Sleep Timer — One Evening, One Exe
I fall asleep with the PC running. Music, a video, whatever. Windows has no built-in shutdown timer that doesn't involve opening cmd and typing shutdown /s /t 3600. So I built one.
What It Does
Pick a time. It counts down. When it hits zero, your PC shuts down.
That's it. That's the app.
The UI
- Slider from 5 to 180 minutes, or hit a preset button (15m, 30m, 45m, 1h, 90m, 2h)
- Live countdown in big
HH:MM:SS— goes amber at 5 minutes, red at 60 seconds - Start / Cancel — one button toggles between them
- Status bar tells you what's happening
Dark theme, Consolas timer font, purple accents. Same look as everything else in the indigo-nx lineup.
How It Works
Dead simple. A tkinter after() loop ticks every second, decrements a counter, updates the display. When the counter hits zero:
subprocess.run(
["shutdown", "/s", "/t", "0"],
creationflags=subprocess.CREATE_NO_WINDOW,
)
No background service, no system tray, no always-on process. Open it, set it, sleep.
Stack
- CustomTkinter — dark UI without fighting native tkinter styling
- PyInstaller — single exe, no Python install needed
- subprocess — Windows shutdown command, hidden window flag so no flash
Total codebase: two files. app.py for the UI and logic, theme.py for colors and fonts.
Get It
Free on the indigo-nx store. Download the exe, run it, done. No install, no dependencies, no account.
Why Build This
Because every existing sleep timer on Windows is either:
- A cmd one-liner you have to memorise
- Bloated with features nobody asked for
- Ad-supported
- Requires installation
This is 30MB, runs anywhere, does one thing. Ship it.