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

% STATUS stable
% XTEST no
% SOUND mixer
% ENV no
% FBROWSER v.3i
% DEF_VIDEO_PLAYER   
% ALL_IN_ONE 

GuiAppName=Totem
GuiAppBinary=totem
GuiAppRun=echo 'A=`ps -ef|grep totem|grep -v totem-plugin-viewer|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=totem.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Totem is the official movie player of the GNOME desktop environment based on xine-lib or GStreamer.

[Protocol]=Server

(Init)=\
	Include($(CfgDir)/Utils/aliases-server.cfg);\
        Include($(CfgDir)/Utils/aliases-server-fbrowser-v3i.cfg);\
	Include($(CfgDir)/Utils/aliases-server-video-player.cfg);\
	Macro(SETUP_DEFAULT_MIXER);\
	Make(var,app_name,by_value,Totem);\
	Make(var,open_file,by_value,);\
	Make(var,app_manage_mode,by_value,totem);

(Connect)=Make(mode,totem_init);

[Mode]=totem_init : default_video_player_init

APP_IS_RUN=\
	Make(var,app_run,ID=`id -u`;P=`ps -fu $ID|grep totem|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" = "x" ]; then echo 0; else echo 1; fi);

[ModeEnd]

[Mode]=totem : default_video_player  		  

% (EnterMode) by Utils/aliases-server-video-player.cfg

APP_START_IF=\
	Set(title,$(open_file));\
	Exec(ID=`id -u`;P=`ps -fu $ID|grep totem|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" = "x" ]; then cd "`cat $HOME/.anyRemote/ar_storedir.tmp`"; totem $(open_file)& fi);

% Application window should be present in output of "wmctrl -l"
APP_RAISE=\
	Exec($(CfgDir)/Utils/run-or-switch-to.sh -switch totem);

APP_QUIT=\
	Exec(P=`ps -ef|grep totem|grep -v totem-plugin-viewer|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" != "x" ]; then totem --quit; fi);

APP_FULLSCREEN=\
	Exec(totem --fullscreen);

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

%1=Exec(totem --volume-down);
%3=Exec(totem --volume-up);

PLAY =Exec(totem --play-pause);
RWD  =Exec(totem --seek-bwd);
FF   =Exec(totem --seek-fwd);
STOP =Exec(totem --pause)
PAUSE=Exec(totem --pause);

[ModeEnd]

[End]
