I’m somewhat of a night owl. Lately I’ve found myself staying up later than usual, which I wouldn’t mind too much if I didn’t have morning classes everyday. It’s a little difficult to try to increase my quantity of sleep every night, so I opted to try to improve my quality of sleep every night.
A nifty site popped up a short while ago on Hacker News called Sleepyti.me, which helps you determine the optimal times to fall asleep or wake up, based on the notion of 90-minute sleep cycles. Essentially, we fluctuate in and out of different sleep phases categorized by levels/patterns of brain activity, from light REM sleep to shorter time periods of deep sleep. Waking up during this deep sleep phase is no bueno, and leaves you feeling tired and groggy. So the goal here is to wake up between sleep cycles, at which you’ll feel more energized and replenished.
I vaguely remember this discussion in my Intro to Psych class, and sounding convincing enough I thought I’d give it a whirl. I’ve been getting into the habit of hitting up Sleepyti.me when I’m ready to go to bed to find out when to sleep/wake up. So far it’s turned out to be great, as I feel pretty recharged even after those super late nights.
Am I boring you? Fine, I’ll get to the point! Check it. I’m usually always on the computer right before I hit the hay. Sleepyti.me has become pretty routine after the past couple weeks, so I thought, “Wouldn’t it be great if there was a Sleepyti.me shell script?”
Yeah! Thus, “yawn” came to fruition in between classes. It’s a simple shell script with the same function of calculating optimal sleep/wake times on the basis of 90-minute sleep cycles. No mouse clicks, and you save like, 3 seconds.
When should I wake up?
Good question. Just
yawn and you’ll know right away!
Wait. What if I want to wake up around 7am? No probs, just yawn and it’s on! Erm… I mean, you can find out the best times to go to bed.
Sweet! All the output times account for the average time to fall asleep (14 minutes). So if it says you should go to bed at 10:00pm, then it assumes you’ll be asleep in around 14 minutes. No need to make adjustments. If it takes you longer (or shorter) to fall asleep, you can adjust the time in the script!