%
% anyremote configuration file for Aqualung management (Server-mode)
% prerequisites: amixer/pactl utility
%

% STATUS stable
% XTEST no
% SOUND mixer
% ENV no
% DEF_PLAYER   
% ALL_IN_ONE 
% MEDIACENTER audio

GuiAppName=Aqualung
GuiAppBinary=aqualung
GuiAppRun=echo 'P=`ps -ef|grep aqualung|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" = "x" ]; then echo NOK; else echo OK; fi'|sh -s
GuiAppIcon=aqualung.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Aqualung is an advanced music player. It plays audio CDs, internet radio streams and podcasts as well as soundfiles in just about any audio format and has the feature of inserting no gaps between adjacent tracks. 

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Make(var,player_name,by_value,Aqualung);\
	Include($(CfgDir)/Utils/aliases-server-player.cfg);
	
(Connect)=Make(mode,aqualung);

[Mode]=aqualung : default_player

(EnterMode)=\
	Macro(SETUP_DEFAULT_POWER_MANAGEMENT);\
	Macro(RUN_IF_NEED);\
	Macro(SETUP_DEFAULT_PLAYER_NO_FF_FWD);\
	Macro(APP_MENU);

% Volume control and 0-9,*,# assignments by Utils/aliases-server-player.cfg

PLAY =Exec(aqualung --play -N 0);
RWD  =Exec(aqualung -B)
FF   =Exec(aqualung -F)
PREV =Exec(aqualung -B)
STOP =Exec(aqualung -T);
NEXT =Exec(aqualung -F)
PAUSE=Exec(aqualung -U);

%why ? aqualung -s3 -o alsa -R -r 48000
RUN_IF_NEED=\
	Exec(P=`ps auxc|grep aqualung`; if [ "x$P" = "x" ]; then aqualung & fi);\
	Exec($(CfgDir)/Utils/run-or-switch-to.sh -switch aqualung);

RUN_OR_QUIT=\
	Exec(P=`ps auxc|grep aqualung`; if [ "x$P" = "x" ]; then aqualung & else aqualung -Q; fi);
	
APP_QUIT=Exec(aqualung -Q)

* *=Macro(DEFAULT_HELP_NO_FF_FWD);

[ModeEnd]

[End]
