You are not logged in.
Given there's the nice rtcwake(8) utility, we can make computer act as an alarm clock if we summon a music player upon awakening.
But multiplying hours in bash before bedtime with $(( 3.5 * 3600 )) isn't my favorite thing, I'd much rather use a crystal clear interface that doesn't require any thinking at all.
% # My typical usecase:
% nap until 10am; mpc toggle
% nap
Usage: nap { for <float>[<h|m|s>] | until <date(1) parsable datestr> }
e.g. nap for 3h
nap until 10AM
% nap for 5.3m
sudo rtcwake -m mem -s 318
% date
Tue Dec 8 14:30:45 EET 2015
% nap until '10am'
# Tue Dec 8 10:00:00 EET 2015
sudo rtcwake -m mem -t 1449561600
% # Error handling:
% nap for '5.5.m'
# date format bogus
sudo rtcwake -m mem -s 330
% nap until 'gibberish'
date: invalid date ‘gibberish’
P.S. either run this as root or setup a password-less rtcwake.
a & ☭
Offline
I love it! I didn't even know my computer could do that!
Offline
Related to this I coded a couple of months ago a dmenu based alarm.
https://github.com/minos-org/minos-tool … -countdown
rtcwake is awesome
Offline