new feature suggestion: replay song


I would suggest stupid feature - to restart playing the current song via command line parameter.

If I have following bindings in .fvwm2rc :

# start/stop list ( Ctrl + >/|| button )
Key F15 A C Exec ~/bin/
# toggle pause ( >/|| button )
Key F15 A N Exec mocp -G
# prev ( 'back' button )
Key F13 A N Exec mocp -r
# next ( 'forward' button )
Key F14 A N Exec mocp -f

Nice to have:

# replay current song ( Ctrl + 'back' button)
Key F13 A C Exec mocp ...

Some workarounds as to go to the previous and then to the next song may not work in case of the first song in the playlist and vice versa for next-previous and the last song.
I hope it is comprehendable and I have not missed such a suggestion already written somewhere.

By the way many thanks for MOC, the best player from those I have tried so far.

For people who like my bindings the script looks like:


if pidof mocp > /dev/null ; then
# mocp running
if mocp -i | grep STOP > /dev/null ; then
#echo "MOCp started, starting playing..."
mocp -p
#echo "MOCp playing, stopping playing..."
mocp -s
#echo "Starting MOCp, starting playing..."
mocp -S
sleep 1
mocp -p

This command will seek to beginning of song:
mocp -k -`mocp -i | grep CurrentSec: | sed -e 's/CurrentSec: //'`

Only problem is that it works only in PLAY state.

Nice, I have not found it in the manual, simply because it is not there:
<br /> user@host ~ (0)$ man mocp | grep -- -k<br /> user@host ~ (1)$<br />

Maybe the manual page should be updated. ;)
I have moc 2.5.0-alpha3 installed through gentoo portage tree.

Anyway thanks for hint, this will do.

It is not in man page but it is in 'mocp -h' output.
Sure that it is not good but I've get used to different help and man page (or info page if exists) in *nix programs.