It's been a long time since I threw code at the net.  So please be
gentle.

        This is an XMMS2 client that listens for "media key" events sent
through the HAL and sends appropriate playback commands to the xmms2d
server.  If you have a keyboard made in the last five years or so, you
probably have "media" keys, which generate standardized codes to control
media players on your PC.  This program will let you take advantage of those
keys to control the current playlist in XMMS2.  It's fairly tiny, sleeps
most of the time, and wakes up only when HAL condition events arrive.

        Attached is the source code and my cheesy Makefile.  You will need
the following development libraries to be able to compile this:
        - xmms2-client-glib (libxmmsclient-glib-dev)
        - hal (libhal-dev)
        - dbus-glib-1 (libdbus-glib-1-dev)

        I'm basically throwing this out there for feedback.  I'd
particularly appreciate suggestions for a better name.  If you give it a
try, please let me know what you think.

                                        Thanks,
                                        Schwab
CFLAGS          =$(shell pkg-config --cflags hal dbus-glib-1 xmms2-client-glib)
LDFLAGS         =$(shell pkg-config --libs hal dbus-glib-1 xmms2-client-glib)

# Asynchronous flavor.
PROGNAME        = xmms2-halctl
SRCS            = $(PROGNAME).c
OBJS            = $(patsubst %.c, %.o, $(SRCS))

# Synchronous flavor.
PROGNAME_SYNC   = xmms2-halctl-sync
SRCS_SYNC       = $(PROGNAME_SYNC).c
OBJS_SYNC       = $(patsubst %.c, %.o, $(SRCS_SYNC))

all: $(PROGNAME)

$(PROGNAME): $(OBJS)

$(PROGNAME_SYNC): $(OBJS_SYNC)

clean:
        rm $(PROGNAME) $(PROGNAME_SYNC) $(OBJS) $(OBJS_SYNC)
--
_______________________________________________
Xmms2-devel mailing list
Xmms2-devel@lists.xmms.se
http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel

Reply via email to