Looking for a countdown timer with alarm
Looking for a countdown timer with alarm
Looking for a small utility to enter a countdown timer (egg timer/cooking timer)
Searched the board, but didn't find something like this. Maybe I' m searching the wrong way, don't think I'm the first one in need for such a program.
Searched the board, but didn't find something like this. Maybe I' m searching the wrong way, don't think I'm the first one in need for such a program.
In Puppy version 2.17 there is a countdown timer in JWM Menu -> Personal
However I don't think the alarm is audible, but certainly visual (can't test that at the moment though, sorry).
Should be pretty easy to write a simple bash based script (using, say, the sleep command) to trigger playing an audio file though. I'm sure someone will sort you out with that (I'd throw something together, but I'm in the middle of another programming project so can't just now).
Just to give you the idea though, if you open an rxvt command console and enter the following you'll see the possibility (later you would say substitute echo with a command to start up a sound playing program):
sleep 3; echo hello
The above is for a 3 second delay...
However I don't think the alarm is audible, but certainly visual (can't test that at the moment though, sorry).
Should be pretty easy to write a simple bash based script (using, say, the sleep command) to trigger playing an audio file though. I'm sure someone will sort you out with that (I'd throw something together, but I'm in the middle of another programming project so can't just now).
Just to give you the idea though, if you open an rxvt command console and enter the following you'll see the possibility (later you would say substitute echo with a command to start up a sound playing program):
sleep 3; echo hello
The above is for a 3 second delay...
I think that sleep can drift, so . Try using pschedule to create a cron event and start the cron daemon.T_B wrote:For my purposes " sleep [time]; gxine alarm.mp3 " is good enough.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]
I had a squizz at countdown.tcl & it has a section of code commented out:
when I uncommented the code, it complained that it couldn't find /usr/local/bin/attention.wav. But when I replaced this with alarm.wav, and placed the file alarm.wav in /usr/local/bin bingo!
Code: Select all
if { ![catch { package require snack }] } {
snack::sound alarmsound -file \
[file join [file dirname [info script]] attention.wav]
set ::countdown::gui::alarmcmd [list alarmsound play -block 1]
} else {
T_B,
The attached .zip contains a modified countdown.tcl & alarm.wav. I f you copy them to /usr/local/bin, then countdown has an audible alarm.
Does anyone know what modifications are required to the script, so that alarm.wav is located in /usr/share/audio, rather than /usr/local/bin?
Edit: Woops! No wonder it didn't work for T_B. I uploaded the wrong file. Have uploaded the one that does work, if alarm.wav is in the same directory.
The attached .zip contains a modified countdown.tcl & alarm.wav. I f you copy them to /usr/local/bin, then countdown has an audible alarm.
Does anyone know what modifications are required to the script, so that alarm.wav is located in /usr/share/audio, rather than /usr/local/bin?
Edit: Woops! No wonder it didn't work for T_B. I uploaded the wrong file. Have uploaded the one that does work, if alarm.wav is in the same directory.
- Attachments
-
- countdown.zip
- (7.5 KiB) Downloaded 245 times
Last edited by muggins on Sun 25 Nov 2007, 12:21, edited 1 time in total.
Here is a quick & dirty timer that I just threw together.
Has no sound as I haven't had time to work out how to beep yet.
Just download and unpack it to a directory and open a terminal in that directory then type:
./timer.tcl
Has no sound as I haven't had time to work out how to beep yet.
Just download and unpack it to a directory and open a terminal in that directory then type:
./timer.tcl
- Attachments
-
- PTimer.tar.gz
- (502 Bytes) Downloaded 257 times
Last edited by Ian on Sat 24 Nov 2007, 15:42, edited 4 times in total.
Ian
If you just modify the wee part of your program to use muggins' /usr/local/bin/alarm.wav file like follows, your alarm gives sound...
of course, you can now put alarm.wav in some other folder instead.
Might be best to put a gtkdialog3 version together though, since I think the newest Puppy (Dingo) doesn't have a tcl interpreter (but I haven't had time to download and try it so could be wrong)
If you just modify the wee part of your program to use muggins' /usr/local/bin/alarm.wav file like follows, your alarm gives sound...
Code: Select all
while {$t<$tm} {
incr t
exec sleep 1
}
exec play /usr/local/bin/alarm.wav
Might be best to put a gtkdialog3 version together though, since I think the newest Puppy (Dingo) doesn't have a tcl interpreter (but I haven't had time to download and try it so could be wrong)
Here's a dialog version of the timer. This time type in ./eggtmr.sh.
- Attachments
-
- XEgtmr.tar.gz
- Xdialog version, type in Xeggtmr.sh :-)
- (430 Bytes) Downloaded 255 times
-
- Egtmr.tar.gz
- Dialog version of timer, same instructions as before.
- (426 Bytes) Downloaded 272 times
Last edited by Ian on Sun 25 Nov 2007, 01:00, edited 1 time in total.
http://www.ne.jp/asahi/kazuo/sasagawa/eng.html
I thought I'd upload another tcl clock, with timer, as I quite like this little analogue clock. I replaced the original's bell.wav with alarm.wav, as I preferred the sound.
Just extract to /, and run by entering tkclock on the commandline. To use as an alarm you have to set the alarm's settings to wave.
Also, getting countdown.tcl to use the file /usr/share/audio/alarm.wav was simply adding a line at the start: cd /usr/share/audio
I thought I'd upload another tcl clock, with timer, as I quite like this little analogue clock. I replaced the original's bell.wav with alarm.wav, as I preferred the sound.
Just extract to /, and run by entering tkclock on the commandline. To use as an alarm you have to set the alarm's settings to wave.
Also, getting countdown.tcl to use the file /usr/share/audio/alarm.wav was simply adding a line at the start: cd /usr/share/audio
- Attachments
-
- tkclock1.jpg
- (18.1 KiB) Downloaded 271 times
-
- tkclock.zip
- (13.15 KiB) Downloaded 263 times