%
% anyremote configuration file for Miro player (Server mode)
% 

% STATUS unknown
% XTEST yes
% SOUND mixer
% ENV no
% ALL_IN_ONE 

GuiAppName=Miro
GuiAppBinary=miro
GuiAppRun=echo 'A=`pgrep miro.real|grep -v grep`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=miro.png
GuiAppType=Application
GuiAppProtocols=Server

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
	Macro(SETUP_DEFAULT_MIXER);

(Connect)=Make(mode,miro);


[Mode]=miro

(EnterMode)=Set(icons,Miro,\
		1,vol_down,2,up,3,vol_up,\
		4,left,5,play,6,right,\
		7,down,8,down,9,up,\
		*,question,0,stop,#,folder);\
	Set(layout,default);\
	Set(title,);\
	Set(status,);\
	Set(menu,replace,Fullscreen,Toggle Mute,Menu,Escape,Enter,Quit Miro);\
	Macro(ALLIN1MENU);\
	Macro(MIRO_RUN);
	
Cancel=Exit

Back=Set(text,close);\
	Set(menu,replace,Fullscreen,Toggle Mute,Menu,Escape,Enter,Quit Miro);\
	Macro(ALLIN1MENU);
Toggle Mute=Macro(DEFAULT_TOGGLE_MUTE)
Quit Miro=Exec(pkill miro.real)
Menu=Emulate(key,F10);
Escape=Emulate(key,Escape);
Enter=Emulate(key,Return);
Fullscreen=Emulate(keydown,Control_L);Emulate(key,f);Emulate(keyup,Control_L);

1=Macro(DEFAULT_VOLUME_DOWN)
2=Emulate(key,Up);
3=Macro(DEFAULT_VOLUME_UP)

4=Emulate(key,Left);
5=Emulate(key,F10,sleep,10000,key,Right,sleep,10000,key,Right,sleep,10000,key,Right,sleep,10000,key,Down,sleep,10000,key,Return);
6=Emulate(key,Right);

7=Emulate(key,Tab);
8=Emulate(key,Down);
9=Emulate(keydown,Shift_L);Emulate(key,Tab);Emulate(keyup,Shift_L);

* *=Set(text,replace,Help, 1 Vol-\n2 Up\n3 Vol+\n4 Left\n5 Enter\n*5 Play (working non-stable)\n6 Rigth\n7 Shift+Tab\n8 Down\n9 Tab\n0 \n** Help\n*# Run/Quit Miro\n# Switch panel (F6)\nUse 7,9 to move up/down \nthrough groups in left panel);
* #=Macro(MIRO_RUN_STOP)
0=Emulate(keydown,Control_L);Emulate(key,d);Emulate(keyup,Control_L);
#=Emulate(key,F6);

MIRO_RUN=Exec(echo 'P=`pgrep miro.real`; if [ "x$P" == "x" ]; then miro& fi' |bash -f -s);
MIRO_RUN_STOP=Exec(echo 'P=`pgrep miro.real`; if [ "x$P" == "x" ]; then miro& else pkill miro.real; fi'|bash -f -s);

[ModeEnd]

[End]
