You are not logged in.
I wrote this because the mpc script on the openbox pipemenu page seemed outdated and looked a bit messy. It's just a simple script to control mpc in your menu, with a few adjustable options.
link:
http://github.com/supulton/gitstuff/blo … s/mpcob.sh
Last edited by supulton (2010-02-10 00:39:57)
Offline
Thanks I was looking for something like this
Offline
This is a great script, it's really helpful. However, I thought it would be nice to be able to browse the playlist from the openbox terminal, so I added the following code to your script:
# Playlist Browse Section - mechoid9
mpc playlist 1>/tmp/playlist.txt
PlayList=`echo /tmp/playlist.txt`
echo " <separator />"
echo " <menu id=\"mpcob-search-playlist\" label=\"[browse playlist]\">"
i=1
while read LINE
do
POS=$(mpc playlist | grep -n "$LINE" | awk -F: '{print $1}')
echo " <item label=\"$LINE\"> "
echo " <action name=\"Execute\"><execute>mpc play $POS</execute></action> "
echo " </item> "
done < $PlayList
echo " </menu>"
# the playlist browse section can cause the pipemenu to be slow for
# long playlists...
Admittedly, using
mpc_control -j | dmenu
with a keyboard shortcut works much more effeciently than this, but I thought you would find the code interesting.
PS: The code I wrote was inspired by mpc_control, go figure.
Offline
Awesome script, thanks!
Offline