%
% anyremote configuration file for moc (http://moc.daper.net) management. (AT-mode)
% prerequisites: amixer/pactl utility
%

% STATUS stable
% XTEST no
% SOUND mixer
% ENV no

GuiAppName=MOC
GuiAppBinary=mocp
GuiAppRun= P=`ps -ef|grep mocp|grep -v grep|grep -v anyremote|grep -v nedit`; if [ "x$P" = "x" ]; then echo NOK; else echo OK; fi
GuiAppType=Application
GuiAppProtocols=AT
GuiAppDesc=Console audio player for Linux/UNIX

[Protocol]=AT

(Init)=\
	Include($(CfgDir)/Utils/aliases-at.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Make(var,TwoWayComm,by_value,false);\
	Macro(CHECK_RFCOMM_DEVICE);

(Connect)=\
	Make(mode,moc);

[Mode]=moc

(EnterMode)=\
	Exec(mocp -S&);

Cancel=\
	Exec(mocp -x);\
	Make(exit);

MOC_TITLE=\
    Make(var,message,mocp -i|grep Artist|sed "s/Artist: //"` `mocp -i|grep SongTitle|sed "s/SongTitle: //");\
	Macro(SHOW_MSG);

1=Macro(DEFAULT_VOLUME_DOWN)
2=Macro(DEFAULT_TOGGLE_MUTE)
3=Macro(DEFAULT_VOLUME_UP)

4=Exec(mocp -k -10) 
5=Exec(mocp -p);Macro(MOC_TITLE)
6=Exec(mocp -k 10) 

7=Exec(mocp -r);Macro(MOC_TITLE)
8=Exec(mocp -s);
9=Exec(mocp -f);Macro(MOC_TITLE)

* *=Exec(F="$(TmpDir)/anyrem.hlp";echo "1 - Vol-    2 - Mute       3 - Vol+" > $F;echo "4 - Rew     5 - Play       6 - FF" >> $F;echo "7 - Prev    8 - Stop       9 - Next" >> $F;echo "* * - Help  0 - Pause      # - Quit" >> $F;echo "* # - Run/Quit Moc" >> $F);\
	Macro(SHOW_HELP);
* #=Exec(P=`ps -ef | grep mocp | grep -v grep | grep -v anyremote | grep -v nedit`; if [ "x$P" = "x" ]; then mocp -S& else mocp -x; fi)
0=Exec(mocp -G);
#=Exec(mocp -x)

[ModeEnd]

[End]
