%
% anyremote configuration file for Xfmedia (http://spuriousinterrupt.org/projects/xfmedia) 
% management (AT-mode)
%
% prerequisites: amixer/pactl utility
%

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

GuiAppName=xfmedia
GuiAppBinary=xfmedia
GuiAppRun=echo 'P=`ps -ef|grep xfmedia| grep -v grep|grep -v anyremote|grep -v nedit`; if [ "x$P" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=xfmedia.png
GuiAppType=Application
GuiAppProtocols=AT
GuiAppDesc=Xfmedia is a simple, easy-to-use media player based on the xine engine.

[Protocol]=AT

Answer=Make(disconnect);
Cancel=Exec(pkill xfmedia);

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

(Connect)=Exec(echo 'P=`ps -ef|grep xfmedia| grep -v grep|grep -v anyremote|grep -v nedit`; if [ "x$P" == "x" ]; then xfmedia & fi'|bash -f -s);

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

4=Exec(xfmedia-remote --previous);
5=Exec(xfmedia-remote -p);
6=Exec(xfmedia-remote --next);

7=Macro(4)
8=Exec(xfmedia-remote --stop);
9=Macro(6)

* *=Exec(echo 'F="$HOME/.anyRemote/anyrem.hlp";echo "1 Vol-">$F;echo "2 Mute">>$F;echo "3 Vol+">>$F;echo "4 Previous">>$F;echo "5 Play">>$F;echo "6 Next">>$F;echo "7 Previous">>$F;echo "8 Stop">>$F;echo "9 Next">>$F;echo "* * Help">>$F;echo "0 Pause">>$F;echo "# Quit">>$F;echo "* # Run/Quit">>$F;kdialog -passivepopup "`cat $F`" 7'|bash -f -s)
* #=Exec(echo 'P=`ps -ef|grep xfmedia| grep -v grep|grep -v anyremote|grep -v nedit`; if [ "x$P" == "x" ]; then xfmedia & else pkill xfmedia; fi'|bash -f -s)
0=Exec(xfmedia-remote --pause);
#=Exec(pkill xfmedia)

[End]
