You are not logged in.

#1 2010-02-04 08:07:58

supulton
Member
Registered: 2008-12-31
Posts: 58

mpcob - mpc control openbox pipemenu

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.

screenshots:
TfoWFl.jpg
l8qDsl.jpg

link:
http://github.com/supulton/gitstuff/blo … s/mpcob.sh

Last edited by supulton (2010-02-10 00:39:57)

Offline

#2 2010-10-21 03:34:21

cruznick
Member
From: México
Registered: 2010-07-15
Posts: 37
Website

Re: mpcob - mpc control openbox pipemenu

Thanks I was looking for something like this

Offline

#3 2010-12-30 05:08:13

mechoid9
Member
From: North America
Registered: 2010-12-26
Posts: 9

Re: mpcob - mpc control openbox pipemenu

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

#4 2011-01-06 02:33:03

thoffmeyer
Member
From: Chi
Registered: 2006-07-27
Posts: 91

Re: mpcob - mpc control openbox pipemenu

Awesome script, thanks!

Offline

Board footer

Powered by FluxBB