LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 06-10-2012, 12:40 AM   #1
kona0197
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Rep: Reputation: 0
Countdown timer for Linux?


Is there any easy to install countdown timers for Linux? Google didn't yeild any great results.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-10-2012, 01:20 AM   #2
lithos
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

Rep: Reputation: 217Reputation: 217Reputation: 217
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."
 
Old 06-10-2012, 12:34 PM   #3
kona0197
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Original Poster
Rep: Reputation: 0
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.
 
Old 06-10-2012, 02:53 PM   #4
sysfce2
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
I use KAlarm (part of KDE).
 
1 members found this post helpful.
Old 06-10-2012, 03:13 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I used to use kteatime when I ran KDE. Not sue what's available for other DEs though.
 
Old 06-10-2012, 03:50 PM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
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
 
2 members found this post helpful.
Old 06-10-2012, 05:12 PM   #7
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
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.
 
1 members found this post helpful.
Old 06-10-2012, 06:01 PM   #8
kona0197
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Original Poster
Rep: Reputation: 0
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.
 
Old 06-10-2012, 06:12 PM   #9
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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.
 
Old 06-10-2012, 06:26 PM   #10
kona0197
LQ Newbie
 
Registered: Feb 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Well I'm not using GNOME or XFCE.
 
Old 06-11-2012, 06:28 AM   #11
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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.
 
Old 06-11-2012, 08:41 PM   #12
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,328
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
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
 
Old 06-12-2012, 02:09 AM   #13
lithos
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

Rep: Reputation: 217Reputation: 217Reputation: 217
What about Alarm-clock ?
By the way you describe what tasks you want I would use it.
 
Old 05-27-2013, 08:31 AM   #14
not_bob
LQ Newbie
 
Registered: Jun 2008
Location: CO
Distribution: Slackware
Posts: 15

Rep: Reputation: 0
Quote:
Originally Posted by teckk View Post
Code:
sleep 300 && mplayer audiofile.mp3
I knew there was something brain dead simple I could do with the command line. Thnx, teckk.
 
Old 05-27-2013, 08:59 AM   #15
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
If you want GUI, install KTIMER.
 
  


Reply

Tags
timer, timer-countdown



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
howto Lilo set countdown timer and change picture? looop Linux - General 5 02-21-2012 05:26 PM
How can I get LAPIC timer to run instead of the PIT timer? sixerjman Linux - Kernel 1 10-16-2007 09:59 PM
Multimedia timer (SMP friendly timer) bigqueso Linux - Kernel 0 03-15-2007 03:49 PM
Creating a countdown timer window in Fedora Core statman Linux - Software 0 06-18-2005 04:42 PM
Linux Installation Countdown and Questions kamisama Linux - General 6 11-06-2001 11:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration