You are not logged in.
I want to make a bash script that stops whatever mpd server is playing at the time and play a specific song in my local library.
Then I'd like to run it through cron but I guess I can figure that out myself.
Last edited by a87 (2008-06-21 04:11:56)
Offline
Does the script have to honor the current playlist? It would be pretty easy to write one using mpc that would just erase current playlist, load the one song, and play it.
[git] | [AURpkgs] | [arch-games]
Offline
mpc clear
mpc add path/to/your/file/relative/to/root/of/music/library
mpc playYou need package "mpc" from pacman.
Last edited by peets (2008-06-21 01:25:09)
Offline
Thank you peets
Now (if I'm not asking to much for tonight) I'd like a script that raises the volume to the max.
I don't care if it's through alsa directly or mpd. Keep in mind I got the vanilla dmix software volume setup from the mpd wiki. That means mpd has it's own volume meter conveniently titled mpd.
edit: never mind i found how to do it through mpc.
Last edited by a87 (2008-06-21 04:11:44)
Offline
What are you doing ? Setting up an alarm clock ? ![]()
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
What are you doing ? Setting up an alarm clock ?
Scarring the hell out of his family maybe ![]()
Offline
~ >> cat bin/alarm
#!/bin/bash
c=${HOME}/bin/mpc
vol=$1
$c clear
$c load alarm
$c volume ${vol:-70}
$c play
export DISPLAY=:0
xset dpms force onThis script uses special playlist 'alarm' instead of hardcoded song name. It also turning my screen on, so I can find my pc in the dark and turn this scary sounds off.
Jerry Goldsmith's Omen OST is a really good choice for alarm clocks (:
Offline
Very smart, my only suggestion is to use DISPLAY=':0.0' ![]()
[git] | [AURpkgs] | [arch-games]
Offline