You are not logged in.
Hey Archers,
I have had this issue for ages now & cannot seem to resolve it.
I have tried the following python scripts as pipemenus :
http://zhar.net/projects/openbox/ob-mpd.py
http://david.chalkskeletons.com/scripts/ob-mpd-0.3.py
incorporated in to the menu.xml thus:
<menu id="root-menu-701353" label="Music Controls">
<menu id="mpd" label="MPD" execute="~/.config/openbox/ob-mpd.py" />
</menu>OR
<menu id="root-menu-701353" label="Music Controls">
<menu id="mpd" label="MPD" execute="~/.config/openbox/ob-mpd-0.3.py" />
</menu>but alas they both fail & just give the following openbox error:
Invalid output from pipe-menu "/home/t0m5k1/.config/openbox/ob-mpd.py"and
Invalid output from pipe-menu "/home/t0m5k1/.config/openbox/ob-mpd-0.3.py"when I run them from term I get the following:
┌─[t0m5k1@b0x]
└─[~/.config/openbox]> ./ob-mpd.py
File "./ob-mpd.py", line 81
print action % ('MPD is not running [start]','start')
^
SyntaxError: invalid syntax
┌─[t0m5k1@b0x]
└─[~/.config/openbox]> ./ob-mpd-0.3.py
File "./ob-mpd-0.3.py", line 88
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
^
SyntaxError: invalid syntaxI am sorry but my python skills are non existent so I do not even know if this error is correct ![]()
are any of you guy's using these with any sucsess?
I really am stuck & have no way forward, I use conky to display what the current status of mpd is & really just need a way to control it in openbox & was hoping one of these would work & have tried to look for alternatives but these seem to be the only option.
any advice is very appreciated.
Last edited by t0m5k1 (2012-11-27 06:01:13)
Offline
first script works. install python2-mpdclient2 and change the shebang of the script to python2
Last edited by Rasi (2012-11-26 23:28:52)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
doh! such a simple fix lol caused me many a head scratch, I guess it's time I learn python!
Thank You so much Rasi
FYI to anyone who wants to use this script/pipemenu with a remote instance of mpd add this to line 47:
mpdHost = '192.168.1.250'obviously change the IP to suit!
then edit line 70 to the following:
server = mpdclient2.connect(host=mpdHost,port=mpdPort)Offline
actually it also works by exporting the MPD_HOST variable
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline