You are not logged in.
Pages: 1
I have an alarm clock in Mac that wakes up my computer from sleep at predestined time and plays my selected music. I was wondering if there was a linux equivalent that could wake up the computer, so I wouldn't have to return to Mac every night.
Offline
http://www.mythtv.org/wiki/ACPI_Wakeup
The gist of it is:
# date -d TIME +%s > /sys/class/rtc/rtc0/wakealarm
"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page
Offline
#!/bin/bash
### Wake-Up Alarm ##############
# Version 0.1 by Scott Garrett #
# Wintervenom [(at)] gmail.com #
################################
volume () {
case "$2" in
'up') amixer -c0 set $1 1+ ;;
'down') amixer -c0 set $1 1- ;;
*) amixer -c0 set $1 $2 ;;
esac
}
# In case we are connected to an amplifier.
mpc stop
volume Master 20
volume PCM 100
# So our Last.fm account doesn't get filled with night-playlist entries.
#killall mpdscribble &> /dev/null
killall mpdas &> /dev/null
# Queue the night playlist.
mpc consume off
mpc random on
# Make very smooth transitions to new songs.
mpc crossfade 10
mpc clear
mpc load 01-Aesthetic
mpc play
# Wait until the time specified by the user (in %H%M format) to wake up.
echo "Sleeping until $1."
until [ "`date +'%H%M'`" = "$1" ]; do
sleep 5
done
# We can start scrobbling again.
#mpdscribble &
mpdas -d
mpc pause
volume Master 0
mpc clear
mpc load 00-Favorites
mpc next
mpc play
# Gracefully increase the volume of the music until you wake up.
for ((x=0; x<100; x++)); do
volume Master $x
sleep 1
done
Syntax: $(night WAKEUP_TIME), where WAKEUP_TIME is in HHMM format.
Last edited by Wintervenom (2010-09-17 06:57:17)
Offline
Wintervenom, just a friendly suggestion.
Can you not use the various colors in your posts? I use a dark theme and man it makes it difficult to read the blue and green in your post.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Check out rtcwake. I use it extensively.
Offline
Offline
Pages: 1