[NBLUG/talk] My Linux alarm clock

Troy Arnold troy at zenux.net
Mon Jan 16 22:58:59 PST 2006


On Mon, Jan 16, 2006 at 10:43:16PM -0800, Lincoln Peters wrote:
> Yet another cool project that demonstrates why Linux rules...
> 
> 
> #!/bin/sh
> export DISPLAY=':0.0'
> amarok --play
> sleep 30m && artsplay /usr/share/sounds/k3b_success1.wav

A lighter weight solution is 'xmms -p' and the 'at' command:

[troy at saiph: ~]$ at 9am tomorrow
warning: commands will be executed using /bin/sh
at> xmms -p
at> <EOT>
job 1 at Tue Jan 17 09:00:00 2006

Have you played around with Amarok's DCOP stuff ?
Really cool!  Here's a small subset from 'dcop amarok player'

bool isPlaying()
int getVolume()
int sampleRate()
int score()
int status()
int trackCurrentTime()
int trackPlayCounter()
int trackTotalTime()
void mute()
void next()
void pause()
void play()
void playPause()
void prev()
void seek(int s)
void seekRelative(int s)
void setVolume(int volume)
void stop()
void transferDeviceFiles()
void volumeDown()
void volumeUp()

As you can see, it's easy to bump your volume up slowly, or even change the
track to something by Barry Manilow on those mornings where you *really*
need some extra motivation to get up.

-t




More information about the talk mailing list