apctl
Copyright (c) Austin Bingham, 2004
This is a simple command-line tool for controlling a running alsaplayer daemon
*** INTRO ***
apctl is a command line controller for alsaplayer. That is, it issues commands to an alsaplayer instance running in daemon mode (i.e. one started with the '-i daemon' flag). The goal of this project was to create a sound-player system that didn't take up any desktop space. In that regard, apctl isn't all that special...there are other similar tools (see alsaplayer itself, for instance). The things that distinguish apctl from other players (at least the ones I've looked at) are:
- It's written in guile, and is thus highly accessible, modifiable, etc. to anyone with a passing knowledge of scheme (which is about what I have)
- It completely supports the feature-set I wanted. Essentially, none of the command-line players I tried did everything I wanted; thus, apctl is the result of the oft-touted "itch that needed scratching" ethos in open-source software.
In short, apctl a silly guile sound player that I find really useful, fun, and easy to use; hopefully others will, too.
IMPORTANT!!! As this player relies on the guile bindings for alsaplayer (guile-alsaplayer), you need to install those before this will work.
*** USE ***
In general, apctl works as follows:
apctl.scm -s <session-name> <command> <arguments to the command>
So, suppose you wanted to pause the current session, named 'main'. You would type:
apctl.scm -s main pause
If you had your config file (~/.apctl, see CONFIGURATION section) set up such that the default session name was 'main', you could just type:
apctl.scm pause
To jump to track 12, you could use:
apctl.scm jump-to 12
And so on...
In the absence of a recognized command, apctl will try to enqueue every thing on the command line. So, if you typed:
apctl.scm -s main ~/music/*ogg
apctl would try to enqueue all of the ogg file in ~/music.
A few "special" commands to keep in mind are:
quit: This kills the alsaplayer daemon with the configured session-name
Note that you can actually start the alsaplayer daemon any way you want...it won't matter to apctl. In the absence of a running alsaplayer instance with the proper session name, apctl will try to start an instance when necessary.
To get a complete listing of apctl's command and options, use:
apctl.scm -h
*** CONFIGURATION ***
The sample config file (config.sample) is an example of the config file format used by the player. If you think it looks like a standard scheme alist, you're very perceptive...that's all it is. By default, apctl looks for a config file named ~/.apctl. Alternately, a different config file can be specified on the command line.
