You are not logged in.
This is another little script in my collection of useless software.
I often find myself wanting to take a 20 minute nap at about midnight because I'm too tired to continue working, but know that I have a ton of stuff due by the morning. Previous attempts at this with an ordinary alarm clock typically end up causing me to shut the alarm off without having fully woken up. I imagine that there are tons of programs out there that help solve this, but what the heck...
Presenting icsy (I can't Sleep Yet!)
http://jwcxz.com/projects/icsy/ - aur package
icsy allows you to set an alarm for some time and then forces you to wake up by asking simple math questions. If you don't answer the questions correctly in the allotted time period, the snooze alarm will go off.
Sample usage:
$ icsy -t 2 -s 5 -n2
setting alarm for 2 seconds
press enter when awake
starting snooze timer for 5 seconds
are you __really__ awake?
what is 5-53? 0
what is 82+20? 0
0/2 correct... try again
what is 34+90? 124
what is 28+47? 75
:) everything was correct
now get back to work!
You can change:
- the amount of time until the alarm goes off
- the snooze alarm time
- the number of questions asked
- the alarm file to play (uses mplayer by default)
- or you can override the alarm with a custom command
There's no configuration file support yet, but I'll add that in later.
Also, there's an unfortunate little bug due to Python's Popen that captures Ctrl-C and sends it to mplayer, thus allowing you to inadvertently kill the alarm. I'd like to solve this problem eventually, but I don't think it's a major deal-breaker right now.
Enjoy.
-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers
Offline
This is priceless. Not that I actually plan on using it, but the problem is all to familar... I can sleep (reasonable) fine for hours, with my hand magicaly levitating over the snooze button just a second before the next alarm goes off.
Also I have to change the alarm tone from time to time, because they simply wear off, and what wakes me up than are the annoyed neighbours banging on the wall. Play music as alarm? Someone turns on the radio in my dreams...
This may actually improve your math skills, if you escalate the question's difficulty. Sleep can be a powerful force...
Offline
Sweet idea. Unfortunately I foresee myself just muting the speakers instead.
Offline
I set my computer up to send a housemate e-mails to his GMail which got pushed to his blackberry. He then had to wake me up and have me turn it off. Unfortunately, he realized it's easier to just restart my computer.
But I like the idea. I've been thinking of doing it for a while. Maybe you could incorporate "smart tests" for the alarm: was there computer activity after the alarm was turned off? Has it been going on for too long? Check if the speakers are muted. If they are, unmute and re-alarm. Also, maybe blocking things like shutdown and restart. Or just blocking all input except for answering the questions?
Offline
i love this idea! and i definitely need it. i currently have three alarm clocks and i sleep through them all.
unfortunately i can do maths without having to be consciously awake. i prove that in work every day
Offline
This may actually improve your math skills, if you escalate the question's difficulty. Sleep can be a powerful force...
unfortunately i can do maths without having to be consciously awake. i prove that in work every day
Yeah, the IcsyQuestion class is stupidly easy to modify. I was planning to do more with it, but I decided to set that aside for a later date. I was thinking about asking multiple types of questions since I've also been known to wake up, work on some math or physics problem for ten minutes, and then fall back asleep. When I add configuration file support, perhaps it would be a good idea to let you specify your own question class (similar to how PyTyle does things).
Unfortunately I foresee myself just muting the speakers instead.
Yeah, this is definitely a problem. I'm thinking of maybe adding some stuff in there that continually tells alsa to unmute the master channel or something.
But I like the idea. I've been thinking of doing it for a while. Maybe you could incorporate "smart tests" for the alarm: was there computer activity after the alarm was turned off? Has it been going on for too long? Check if the speakers are muted. If they are, unmute and re-alarm. Also, maybe blocking things like shutdown and restart. Or just blocking all input except for answering the questions?
A long time ago, I thought of writing a daemon that started a timer every time it detected no activity. If that timer reaches some specified time (e.g. 20 minutes), it starts an alarm. Maybe I'll try to incorporate that, or spin it off as a new project.
I've never been able to shutdown or restart without being awake, but that's an interesting idea.
It's interesting to see that so many people sleep through their alarms like I do. I guess I'm not alone.
-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers
Offline
I really like this idea because today I got up to my alarm and, in my still half-asleep state, turned it off and went back to bed.
Also, I tried it out, but there's no alarm sound.
Offline
I really like this idea because today I got up to my alarm and, in my still half-asleep state, turned it off and went back to bed.
Also, I tried it out, but there's no alarm sound.
By default, icsy calls mplayer to play ~/.icsy.mp3 (see icsy -h for more info). You can specify a different alarm file with -a or specify a different command with -c (in case you want to use mpg123, or even perhaps send-shock-to-my-brain.sh).
-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers
Offline
Do you have a good alarm sound that you use?
Offline
You can try FlashKit:
http://flashkit.com/
I've tried a few alarms from there with varying success. I need loud obnoxious noises to wake me up. This one isn't bad:
http://www.flashkit.com/soundfx/Electro … /index.php
One of my projects for the near future is to make a device that sends some shock pulses into my arm. Yes, it really has gotten that bad.
-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers
Offline
Awesome; unfortunately when you turn off kalarm, you may not be awake... The problem I have is hitting the mute button instead of looking at the alarm- then there is the problem with the thinkpad user that has it set up so software can't access the hardware buttons (Of course, that proved beneficial when a friend with a shell account decided to rick roll me).
Do you have a good alarm sound that you use?
Mos Eisley Spaceport.ogg (very loud star wars cantina music)
Any society that would give up a little liberty to gain a little security will deserve neither and lose both.
-Benjamin Franklin
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
-George Bernard Shaw
Offline