Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-10-2012, 12:40 AM
|
#1
|
|
LQ Newbie
Registered: Feb 2006
Posts: 11
Rep:
|
Countdown timer for Linux?
Is there any easy to install countdown timers for Linux? Google didn't yeild any great results.
|
|
|
|
06-10-2012, 01:20 AM
|
#2
|
|
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144
|
Hi,
"countdown" to what ?
- shutdown ?
- PHP / javascript ?
what is the purpose of the countdown that you need.
You are asking a question not quite specific, like "my car is broken, what is wrong " type of question that nobody can help.
Please write what do you need to do and what have you done by now, so you can get appropriate answer.
Otherwise you will get
"Google didn't yeild any great results."
|
|
|
|
06-10-2012, 12:34 PM
|
#3
|
|
LQ Newbie
Registered: Feb 2006
Posts: 11
Original Poster
Rep:
|
Just a simple countdown timer so I can time when I need to pull things out of the oven, know when the dryer is done, ect.
|
|
|
|
06-10-2012, 02:53 PM
|
#4
|
|
Member
Registered: Jul 2009
Distribution: Slackware
Posts: 91
Rep:
|
I use KAlarm (part of KDE).
|
|
|
|
06-10-2012, 03:13 PM
|
#5
|
|
Senior Member
Registered: Dec 2011
Location: UK
Distribution: Debian Sid + various in VMs.
Posts: 1,843
|
I used to use kteatime when I ran KDE. Not sue what's available for other DEs though.
|
|
|
|
06-10-2012, 03:50 PM
|
#6
|
|
Senior Member
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,649
Rep: 
|
You could use sleep
Sleep 5 min and then play a sound.
Code:
sleep 300 && mplayer audiofile.mp3
Sleep 1 min and then have espeak say wake up.
Code:
sleep 60 && espeak "wake up" 2>/dev/null
Or something simple like
Code:
sleep 5 && xterm -fg yellow -T "Wake Up" -g 40x10
|
|
|
1 members found this post helpful.
|
06-10-2012, 05:12 PM
|
#7
|
|
Member
Registered: Mar 2011
Distribution: Slackware 64 Current
Posts: 264
Rep:
|
A nice tcl/tk timer. You will have to edit it to replace the alarm sound with one you like.
Code:
#!/usr/bin/wish -f
set intime [lindex $argv 0]
set intimeI [expr $intime * 60]
proc countdown {seconds} {
init
countdown_kernel $seconds
}
proc countdown_kernel seconds {
hands $seconds
if !$seconds return
after 1000[list countdown_kernel [incr seconds -1]]
}
proc draw_hand {angle decorations} {
eval .c create line $::size $::size [get_xy $angle] $decorations
}
proc end_coordinate difference {
set hand_length [expr $::size * .9]
return [expr $::size + $hand_length * $difference]
}
proc get_xy angle {
return[list [end_coordinate [expr sin($angle)]] \
[end_coordinate [expr -cos($angle)]]]
}
proc hands seconds {
catch {.c delete withtag hands}
set twopi 6.283185
set seconds_angle [expr $seconds * $twopi / 60.]
draw_hand $seconds_angle "-width 1 -tags hands"
set minutes_angle [expr $seconds_angle / 60.]
draw_hand $minutes_angle \
"-width 3 -capstyle projecting -tags hands"
}
proc init {} {
catch {destroy .c}
set ::size 90
set full_diameter [expr 2 * $::size]
pack [canvas .c -width $full_diameter -height $full_diameter]
set border 2
set diameter [expr 2 * $::size - $border]
.c create oval $border $border \
$diameter $diameter \
-fill darkred -outline gold
}
proc helw {} {
wm title . "TIME IS UP!"
button .bHello -text " Times Up! " -command exit
pack .bHello
exec play /usr/share/sounds/tinsha.wav &
}
countdown $intimeI
after [expr $intimeI * 1000] helw
# puts stdout "Time is $intimeI"
It needs an arguement to start. So if you save it as "timer", make it executable and start it for example with "timer 10" if you want to time 10 minutes. I have it bound to keys in fluxbox to time different kinds of tea.
The one on this page looks interesting and fairly easy to customize:
http://handybashscripts.blogspot.com...gress-bar.html
Last edited by fogpipe; 06-10-2012 at 05:25 PM.
|
|
|
|
06-10-2012, 06:01 PM
|
#8
|
|
LQ Newbie
Registered: Feb 2006
Posts: 11
Original Poster
Rep:
|
Sorry, I don't know how to code in Linux. I was just looking for an program that would install easy on Fedora running the LXDE desktop.
|
|
|
|
06-10-2012, 06:12 PM
|
#9
|
|
Senior Member
Registered: May 2005
Location: boston, usa
Distribution: fc-12/ fc-11-live-usb/ aix
Posts: 2,674
|
i did a search using yum:
Code:
[schneidz@hyper ~]$ yum search timer
Loaded plugins: refresh-packagekit
================ N/S Matched: timer =================
gnome-applet-timer.x86_64 : A countdown timer applet
: for the GNOME panel
perl-Template-Timer.noarch : Template::Timer Perl
: module
xfce4-timer-plugin.x86_64 : Timer for the Xfce panel
dieharder.i686 : Random number generator tester and
: timer
dieharder.x86_64 : Random number generator tester and
: timer
erlang-cosTime.x86_64 : Orber OMG Timer and
: TimerEvent Service
php-phpunit-PHP-Timer.noarch : PHP Utility class for
: timing
ppl-pwl.i686 : The Parma Watchdog Library: a C++
: library for watchdog timers
ppl-pwl.x86_64 : The Parma Watchdog Library: a C++
: library for watchdog timers
Name and summary matches only, use "search all" for
everything.
|
|
|
|
06-10-2012, 06:26 PM
|
#10
|
|
LQ Newbie
Registered: Feb 2006
Posts: 11
Original Poster
Rep:
|
Well I'm not using GNOME or XFCE.
|
|
|
|
06-11-2012, 06:28 AM
|
#11
|
|
Senior Member
Registered: May 2005
Location: boston, usa
Distribution: fc-12/ fc-11-live-usb/ aix
Posts: 2,674
|
i came up with this:
Code:
i=10; while [ $i -gt 0 ]; do echo $i seconds remaining; i=`expr $i - 1`; sleep 1; done
if you need it to be gui, i'll see if i can wrap it around zenity.
this worx:
http://handybashscripts.blogspot.com...gress-bar.html
Last edited by schneidz; 06-11-2012 at 07:03 AM.
|
|
|
|
06-11-2012, 08:41 PM
|
#12
|
|
Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian
Posts: 5,369
|
Googling "stopwatch fedora" or "stopwatch linux" turned up not much of anything (I googled for stopwatch figuring I might have more luck by finding a stopwatch with a countdown function than I would googling for "counter").
I found this. It counts up, not down, but it might be worth a look.
http://davy.nyacom.net/logtimer.html
|
|
|
|
06-12-2012, 02:09 AM
|
#13
|
|
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144
|
What about Alarm-clock ?
By the way you describe what tasks you want I would use it.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:56 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|