debian 10 program similar to alarm clock?

New to Debian (Or Linux in general)? Ask your questions here!

debian 10 program similar to alarm clock?

Postby hthi » 2020-01-05 16:13

debian 10

http://alarm-clock.pseudoberries.com/

The program is not available in debian 10 main. Is there a program
like it in debian 10 main? Thank you.
hthi
 
Posts: 172
Joined: 2015-05-09 15:43

Re: debian 10 program similar to alarm clock?

Postby oswaldkelso » 2020-01-05 21:02

I use this when I've forgotten my phone.... Doesn't everyone use their phones for alarms now. Just add your player and a path to the noise. I use ogg123 and a heavy-rock version of free-software song

Code: Select all
#!/bin/bash
echo
echo The time format = hours colon minutes e.g 07:30 for 7:30AM!
echo
printf "What time are you setting this alarm for? "
read date
echo
echo Okay! Alarm set for $(date --date="$date").
sleep $(( $(date --date="$date" +%s) - $(date +%s) ));
echo
echo Wake up you lazy bum!
echo
echo Wake up you lazy bum!
echo
echo Wake up you lazy bum!
echo
echo Wake up you lazy bum!
echo
echo Wake up you lazy bum!
echo
echo Wake up you lazy bum!
echo
while true; do
  /usr/bin/ogg123 ~/free-software-song.ogg
  sleep 1
done


Make sure the script is executable, open a terminal where the script is located and run it.
This is what the output looks like

┌—————————(kelsoo)————————<<<<(~/tech/scripts) (Sun Jan 05 21:31:51)
└> $ wakeywakey.sh

The time format = hours colon minutes e.g 07:30 for 7:30AM!

What time are you setting this alarm for? 21:33

Okay! Alarm set for Sun Jan 5 21:33:00 GMT 2020.

Wake up you lazy bum!

Wake up you lazy bum!

Wake up you lazy bum!

Wake up you lazy bum!

Wake up you lazy bum!

Wake up you lazy bum!


Audio Device: Advanced Linux Sound Architecture (ALSA) output

Playing: /home/kelsoo/free-software-song.ogg
Ogg Vorbis stream: 2 channel, 44100 Hz
Encoder: Lavf56.40.101
^Zme: 00:37.54 [03:46.55] of 04:24.10 (108.2 kbps) Output Buffer 77.8%
[1]+ Stopped wakeywakey.sh



Enjoy, but I'm sure there are some more feature-full solutions out there
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1219
Joined: 2005-07-26 23:20
Location: UK

Re: debian 10 program similar to alarm clock?

Postby NFT5 » 2020-01-06 04:19

If youre using KDE then there's kalarm. For other desktops there are gnome-clocks, dclock and others. XFCE has a panel app too, IIRC.
User avatar
NFT5
 
Posts: 361
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: debian 10 program similar to alarm clock?

Postby pylkko » 2020-01-06 07:09

At its simplest you can just use "at" before passing a command to your shell. In addition to clock tiems it accepts words like "noon", "midnight" and "teatime" (really!)

With "at" since you can defer a command till a certain time, it can be used as a simple timer or alarm. Set a music player to play a file, send an email to yourself, or whatever at a specific time.

https://packages.debian.org/buster/at

systemd timers are also very flexible for stuff like "every first Wed of the month" or similar complex time events and they similarly can launch your chosen waking event (email, sound, text, a program... anything).

But there are a bunch of alarm clock software, you can search
Code: Select all
apt search alarm
and similar.
User avatar
pylkko
 
Posts: 1621
Joined: 2014-11-06 19:02


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable