You are not logged in.
About
Not sure if it's been done before, but hearing someone mention it in IRC i was motivated to write a wrapper around mpc idleloop to spawn an arbitrary command (well a function) on mpd changes (including track changes).
The idea was to keep it simple and customizable. The user gets a config file that simply needs to define the handle_event() function; this can be any valid bash.
The example config pops up a dzen notification for 3 seconds showing Artist - Title.
Depending on interest i'll definitely bug-fix, possibly feature-add, and maybe upload to AUR
Webpage
Longer writeup, screenshots -- coming soon.
Get it
wget -q -O ./bashnotify http://pbrisbin.com:8080/bin/bashnotify
chmod +x ./bashnotify
./bashnotify
[ 02 Mar 2010 14:58 ] :: NOTE: writing example config to /home/username/.bashnotify/config...
[ 02 Mar 2010 14:58 ] :: you should edit this file before starting the deamon
vim ~/.bashnotify/config
...
./bashnotify start
mpc next
Get rid of it
./bashnotify stop
rm -r ./{,.}bashnotify
//github/
Offline
I know I could easily change it but could you put the config file in $XDG_CONFIG or at least .config/bashnotify?
Cheers,
Jack.
Nice little script btw
Last edited by jack.mitchell (2010-03-04 12:47:00)
Offline
Offline
It's been done before. albeit in C
http://alip.github.com/mpdcron/
* Uses mpd's idle mode.
* Calls hooks depending on the event.
* Sets special environment variables to pass data to the hooks.
* Optional support for modules via GModule.
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline