NAME
mpc.sh - simple frontend for the mpc client for mpd
SYNOPSIS
mpc.sh [main|playlist]
OPTIONS
The script is intended to be used in graphic environment, without involving dialog utilities. It "draws" its interface to the standard output and uses xterm(1) for holding it. As the command run inside an xterm(1) instance is a separate process, the parameters are used to communicate to the child process which window to draw.
- main
-
Display the main window.
- playlist
-
Display the playlist window.
DESCRIPTION
Just a rudimental frontend for the most basic music playing functionalities.
Its interface is composed by two windows : the main window containing the common playback controls and the playlist dialog containing the playlist window loading funtionality.
The main window
The following commands can be executed with a single key press :
- z
-
Starts playing previous song. ( mpc prev )
- x
-
Starts playing. ( mpc play )
- c
-
Pauses playing. ( mpc pause )
- v
-
Stops playing. ( mpc stop )
- b
-
Starts playing next song on playlist. ( mpc next )
- r
-
Toggle repeat mode. ( mpc repeat )
- s
-
Toggle random mode. ( mpc random )
- i
-
Toggle single mode. ( mpc single ) ( Requires mpd(1) version 0.16. )
- a
-
Jumps back to current song's beginninge. ( mpc seek 0%)
- f
-
Toggle crossfade. ( mpc crossfade 0|2 )
- m 1 2 3 4 5 6 7 8 9 0 + -
-
Sets the volume to a value based on the pressed key : 0% for m, 100% for 0 or the key's numeric value multiplied with 10 for the rest. The + and - increments and decrements the volume with 10%. ( mpc volume [+|-]value )
- p
-
Open the playlist window. ( mpc lsplaylists, mpc clear, mpc load playlist )
- ?
-
Open the status information window. ( mpc version, mpc help, mpc stats )
If no command is executed in 5 seconds or other key is pressed, the script exits doing nothing.
The playlist window
The list of playlists is limited to 260 entries, displayed on 10 pages, 26 entries on each page.
- 1 2 3 4 5 6 7 8 9 0 + -
-
Changes to a given page by number for numeric keys. Page numbering starts from 1 and ends with 0, meaning 10. ( Quite dumb, but at least similar with the volume changer. ) The + and - changes to the next/previous page.
- a .. z
-
Clears the current playlist then loads the playlist assigned to the given letter.
- A .. Z
-
Loads the playlist assigned to the given letter.
If no command is executed in 15 seconds or other key is pressed, the script exits doing nothing.
In both windows, after the command is executed, the script exits so the "interface" disappears. The visual effect may be visible only the next time :
The status information window
Displays the server, the client and the script version.
The z, b and a commands are like push buttons : the commands are executed without persistent effect.
The x, c and v commands are like radio buttons : one of them is always active.
The r, s, i and f commands are like checkboxes : each can be set or cleared independently.
SEE ALSO
mpd(1), mpc(1), xterm(1), sort(1), wc(1), sed(1)
TO DO
A few minor configuration pieces for the terminal would be nice.
( Remove the playlist limitation, if I will have a good idea for it. ) Rethink the playlist list paging and maybe remove it.
Implement some simple sticker operations.
BUGS
No bugs until now. Found bugs can be reported to the author.
COPYRIGHT
Use it healthy.
Feherke