=====================
IMP3SH SCRIPTS README
=====================

These directories contain some files that can help you launch a background
imp3sh session so you can serialize all your audio/video playing through
imp3sh, either on the command-line, or through a GUI like the nautilus file
manager.

I am not a linux sysadmin or anything, so please take these scripts with
a grain of salt, for they might not be properly written or 100% reliable :)

I use Redhat, so you might have to play with things if you are 
using a different distro.

====
bin/
====

These files should be placed in /usr/local/bin/

imp3start: starts a background imp3sh session using temp files in
           /var/tmp/imp3sh.

imp3quit:  stops a previously started background session.

imp3play:  takes stream(s) as arguments, will play the first one, and queue
           the rest. This command will start a background session if one is 
           not already running.

           I usually use this as my default player for all 
           video and audio file types, so double clicking on a file in
           nautilus (or similar) will use the background imp3sh session.

cimp3:     passes args directly to background session, and waits for any 
           output from imp3sh.

nimp3:     passes args to background session, but does not wait for output.


=========
nautilus/
=========

These files should go in ~/.gnome2/nautilus-scripts/Imp3sh/. These commands
will then be accesible in nautulis by right-clicking and selecting 
"Scripts->Imp3sh" from the popup menu.

All of these commands operate on a background imp3sh session.

Clear:       Clears the queue

Enqueue:     Queues any highlited files/directories. This command will start
             an imp3sh session if one is not already running.

Next:        Plays the next track on the queue, if any

Pause:       Pauses imp3sh

Previous:    Plays previous track on the queue, if any

Quit:        Stops the current imp3sh background session

Resume:      Resumes imp3sh from a pause.

Stop:        Stops playing (leaves queue unchanged)

Volume down: Decreases PCM volume by 10% 

Volume up:   Increases PCM volume by 10%


========
profile/
========

In here is a copy of the /etc/profile that I use. The only important thing
done in this file is to set and export the IMP3CONFIGDIR and IMP3RUNDIR
environment variables. You can set these up anywhere you like, as long as
they exist before calling any other scripts here.

Here is what they should be set to:

IMP3CONFIGDIR="/usr/local/share/imp3sh"
IMP3RUNDIR="/var/tmp/imp3sh"


=====
rc.d/
=====

The file 'imp3d' should go in /etc/rc.d/init.d/. You can link to it from 
whatever runlevel you would like to start imp3sh in, for example:

  $ ln -s /etc/rc.d/init.d/imp3d /etc/rc5.d/S84imp3d

This script accepts the {start,stop,restart} options. If the file 
/usr/local/share/imp3sh/session exists, it will start a background imp3sh
session when the init scripts run. If not, it will just clean up any old
files from a previous session (basically "rm -rf /var/tmp/imp3sh").

If you don't want to add this file, just make sure that /var/tmp/imp3sh is
deleted at boot time or shutdown time.


======
share/
======

These files should go in /usr/local/share/imp3sh/. These are configuration
files for the background imp3sh session.

external: A set of common 'addplayer' commands for associating external
          players with file types. Modify it to your liking.

rc:       This is the resource file the background imp3sh session will
          use. By default, if just sources the 'external' file mentioned
          above. Add any custom options for imp3sh here.

sesssion: Create this file "echo 1 > /usr/local/share/imp3sh/session" if you
          would like the rc.d/ script mentioned above to start imp3sh when
          init runs (at boot time.)





=========
questions
=========

Please send any comments/feedback to kman_can@yahoo.com

