Time.Sleep is a small macOS menu bar timer that puts your Mac to sleep or shuts it down after a countdown or at a chosen local time. It stays out of the Dock, shows the remaining time in the menu bar, and warns you before the scheduled action.
- Sleep or shut down after a configurable countdown or at a chosen local time
- Local-time picker that follows the Mac's 12/24-hour setting and automatically uses the next occurrence of the selected time
- Hours, minutes, and seconds controls, plus 30-minute, 1-hour, and 2-hour presets
- Configurable advance warning from 30 seconds to 10 minutes
- Standard and enhanced reminders; enhanced mode uses a custom sound and a second reminder after 15 seconds
- Cancel, pause, resume, or postpone by 10 minutes from the panel
- Cancel or postpone directly from the notification
- Safe reminder preview that never triggers a power action
- Permission check for notifications, shutdown automation, and launch at login
- Optional launch at login
- Simplified Chinese, Traditional Chinese, and English
- Automatic light and dark appearance
Time.Sleep has no analytics and makes no network requests. Runtime logs stay on the Mac in ~/Library/Logs/Time.Sleep.log.
- Apple Silicon Mac
- macOS 14 or later
-
Download both
Time.Sleep-<version>-macOS-arm64.zipand its.sha256file from Releases. -
Verify the download in Terminal:
cd ~/Downloads shasum -a 256 -c Time.Sleep-<version>-macOS-arm64.zip.sha256
-
After the command reports
OK, unzip the archive and moveTime.Sleep.appto/Applications. -
Open the app. A moon icon will appear in the menu bar; Time.Sleep does not show a Dock icon.
Current community builds are ad-hoc signed and are not notarized by Apple. macOS may block the first launch. If you trust the downloaded file and its checksum, try opening it once, then go to System Settings → Privacy & Security and choose Open Anyway. See Apple's guidance for opening an app from an unidentified developer. A Developer ID signed and notarized release is planned for the future.
- Click the moon icon in the menu bar.
- Choose Countdown and set a duration, or choose At Time and select a local clock time.
- Select Sleep or Shut Down.
- Click Start Timer.
For At Time, a time later today means today; a time that has already passed means tomorrow. The picker follows the Mac's current locale and 12/24-hour setting. Once started, the target is converted to a continuous countdown, so later clock or time-zone changes do not unexpectedly shorten or extend it.
The menu bar displays the remaining time while the timer is active. The panel also shows the expected local action time and provides controls to pause, resume, cancel, postpone by 10 minutes, or perform the selected action immediately.
Open Settings in the panel to change the warning time and reminder strength, preview a reminder, check permissions, or enable launch at login.
| Feature | macOS behavior |
|---|---|
| Notifications | Requested the first time you start a timer or test a reminder |
| Sleep | Uses /usr/bin/pmset sleepnow; no root or Accessibility permission is requested |
| Shut down | Uses System Events and may request Automation permission the first time |
| Launch at login | Registered through macOS SMAppService after the app is installed in /Applications |
Gatekeeper, notification permission, and Automation permission are separate macOS controls. Disabling or overriding one does not grant the others.
Install Xcode or the Xcode Command Line Tools with Swift support. Clone the repository using the URL shown in GitHub's Code menu, then run:
cd Time.Sleep
scripts/build.sh
cp -R outputs/Time.Sleep.app /Applications/The build script generates the icon and reminder sound, compiles the Swift source for Apple Silicon and macOS 14+, assembles the app bundle, and applies an ad-hoc signature.
Run the local verification suite with:
scripts/verify-local.sh --smoke-launchThe smoke launch uses dry-run mode and does not execute sleep or shutdown.
To create a local Release archive and checksum:
scripts/package-release.sh- A timer is kept in memory and is lost when Time.Sleep quits or the Mac logs out.
- Changing the system clock or time zone after starting a timer does not change its remaining duration; the displayed expected local action time updates instead.
- If a selected local time does not exist during a daylight-saving transition, Time.Sleep uses the next valid local time. If it occurs twice, the first occurrence is used.
- If the Mac sleeps through the deadline by more than two minutes, Time.Sleep skips the action after wake instead of immediately sleeping or shutting down.
- If shutdown Automation permission is denied, enable Time.Sleep under System Settings → Privacy & Security → Automation.
- The app cannot override Focus, notification settings, mute state, or the system volume.
- Review the source and checksum before overriding Gatekeeper for an ad-hoc build.
Time.Sleep was shaped through hands-on use and small, practical iterations. Thanks to GPT-5.6 and GLM-5.3 for their help during development.
