SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-08-29 05:00:23

nikondecade
Member
From: daytona beach, florida
Registered: 2010-08-07
Posts: 21
Website

wakeup Alarm script

hope fully im posting this in the right area. ( i did a search and couldnt find a relevant topic)

but anyways, i was stumbling on the interweb (its amazing how many times i start a conversation that way...), and found a script for an alarm clock script that plays a music file of your choice at a certain time everyday.

create a new file in your in your home directory named wakeup.sh, then add this:

#!/bin/bash

echo "Starting up"

mpg123 /path/to/nice/music/* &

for (( i = 1; i <= 100; i++ )) do
    echo "Setting volume at $i"
    setmixer vol $i
    echo "Sleeping 10 seconds..."
    sleep 10s
done

then add this in your crontab file:

0 11 * * * /home/foobar/wakeup.sh

i havent tested this out yet, but everything is set up so i will see if this works tomorrow morning.
ill post the results here.

i decided top post this now before testing just in case someone else wants to test/improve this.


"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
My Deviant Art    Last.fm

Offline

Be excellent to each other!

#2 2010-08-30 07:52:27

luc
#! Die Hard
From: Munich, Germany
Registered: 2010-03-21
Posts: 597

Re: wakeup Alarm script

nice idea. how did it work?
i also have an idea for improvement: i would use the "--random" option to not hear the same songs in the same order every morning.
luc

Offline

#3 2010-08-31 03:13:59

nikondecade
Member
From: daytona beach, florida
Registered: 2010-08-07
Posts: 21
Website

Re: wakeup Alarm script

if it did work i didnt hear it..haha im going to have to do some test runs when im awake to se if it does.

i like your idea. ill have to try that out also big_smile


"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
My Deviant Art    Last.fm

Offline

#4 2011-04-08 00:51:37

SHTFMRadio.com
Member
From: Morganton, NC
Registered: 2011-04-02
Posts: 30
Website

Re: wakeup Alarm script

sudo apt-get install alarm-clock-applet

------------------------------------------------------------
Preparedness Survival Radio Show
http://www.shtfmradio.com
------------------------------------------------------------

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo