A macOS menu bar application that lets you schedule the shutdown of your computer.
I'm one of those people that always fall asleep watching a movie, a TV series or whatever else interesting I might find on YouTube, but often I'd fall asleep without shutting down my computer. This is obviously not ideal, and for a while I used the lovely GoodNight.app by Jakob Bossek, but this app has now been rendered obsolete with macOS Sierra (at least for the timebeing).
Enter, SleepWell.app
. It pretty much does what GoodNight.app
did, but with my own GUI. Please also keep in mind that this is the very first time I've used Swift, and performance and/or beautiful code wasn't my initial goal, but rather, a functional app. Cleanup may very well follow some day.
- macOS 10.12+
- SleepWell.app.zip
Pretty self-explantory, I feel. Assuming the timer has begun, it displays the amount of time that remains before the computer shuts down (or goes to sleep) — as well as a visual progressbar.
Starts the timer at the specified time interval.
Stops the timer.
Restarts the timer at the specified time interval.
Set the time interval for the timer. It defaults to 120 minutes and increases or decreases by 5 minutes as you click on the stepper control. The allowed range is between 5 to 600 minutes.
If you adjust the time interval value while a timer is going on, it will immediately restart the timer at your new time interval.
With this option enabled, every time you change the time interval, it will save the value permanently. So the next time you open the application, the time interval will be as you last had it.
You may change the default Time Interval by ticking the
Save Interval
preference, changing the time interval stepper to your desired default value, and then unticking theSave Interval
preference again.
If you'd rather have your computer go to sleep as opposed to shutting down, you should enable this option.
SleepWell.app
utilises AppleScript to shutdown the computer without forcing the user to provide their login password. Unfortunately, this method also seems to ignore the "Reopen windows when logging back in" option set when you shutdown your computer normally.
If you're anything like me, having all the applications reopen on the next boot will drive you insane... Fret not! You may follow these instructions to force-disable this behaviour.
Please note that these instructions are completely independent to
SleepWell.app
.
As mentioned in the preamble, this is my very first experience with Swift, and I would gladly accept contributions that introduce new features or generally improve the codebase.