aboutsummaryrefslogtreecommitdiff
README

This whole project was spawned by my highschool self, I wrote an applet called
Mocicon that sits on the X11 systray and issues commands to the moc music player.

However It was woefully dumb, it issued commands by just calling mocp with various flags, 
and had no internal notion of the state of MOC.

So, here I am, more than a decade later without a great way to talk to mocp still, though
there have been some notably decent contributions and patches including MPRIS support. However,
I'd like to avoid using dbus as it would make doing this all over the network less fun.


Here's what we have so far.


1. a small header and library we can use to get information about mocp
2. a demo x11 applet that pulls the information


Here's what we don't have

1. A way to submit events to the queue.
2. Safety around the structure. More helper functions to access elements should prevent weird 
data issues around locking.



It's been written in a way that the  library operates on it's own thread, so that you can use
this in realtime with a separate event loop. Initially I tried to jam the X11 and moc socket
events into one loop but it just caused to many issues. the downside is now I need to communicate in
and out of the thread and do so safetly.

I think I am going to just write an event queue that we can lock, push events into, and then let the
main libmoc thread pickup during it's loop. That way we can submit events like play, pause, stop, and so forth.






Here's the original Readme for kicks.

# MocIcon

Mocicon is a Music On Console tray icon for quick access.
Report Bugs (which there aren't any) or suggestions to MutantTurkey@gmail.com, MutantTurkey@freenode.net

By Calvin Morrison 2009

Mocicon.sourceforge.net


OPTIONS/SOURCE:

The source is fairly simple, and there are plenty of options to go around.
I don't do much source commenting, but it is all fairly self explanitory.

compiling without make:gcc -Wall -g -O2 mocicon.c -o mocicon `pkg-config --cflags --libs gtk+-2.0`

with make it is the regular as root:

Make clean install

it's simple enough. you'll need the gtk+ 2.0 libs and that's it.


run ./install as root. it just installs mocicon in /usr/local/bin/