%
% anyremote configuration file for tvtime management. (Server-mode)
%

% STATUS stable
% XTEST no
% SOUND app
% ENV no
% ALL_IN_ONE 

GuiAppName=TvTime
GuiAppBinary=tvtime
GuiAppRun=echo 'A=`ps -ef|grep tvtime|grep -v grep`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=tvtime.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=Tvtime is a high quality television application for use with video capture cards on Linux systems.

[Protocol]=Server

% Aliases for AverMedia IR remote
VOLUMEDOWN=Macro(TVTIME_VOLDOWN)
MIN_INTERESTING=Macro(TVTIME_MUTE)
VOLUMEUP=Macro(TVTIME_VOLUP)

CHANNELUP=Macro(TVTIME_CHUP)
CHANNELDOWN=Macro(TVTIME_CHDN)
ZOOM=Macro(TVTIME_ZOOM)

TEXT=Macro(*)
POWER=Macro(#)

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);
(Connect)=Make(mode,tvtime);

Cancel=Exit

TVTIME_CHDN   =Exec(tvtime-command DOWN > /dev/null)
TVTIME_ZOOM   =Exec(tvtime-command TOGGLE_FULLSCREEN > /dev/null)
TVTIME_CHUP   =Exec(tvtime-command UP > /dev/null)
TVTIME_VOLDOWN=Exec(tvtime-command MIXER_DOWN > /dev/null)
TVTIME_MUTE   =Exec(tvtime-command TOGGLE_MUTE > /dev/null)
TVTIME_VOLUP  =Exec(tvtime-command MIXER_UP > /dev/null)

[Mode]=tvtime

(EnterMode)=Exec(echo 'P=`ps -ef|grep tvtime|grep -v grep|grep -v anyremote`; if [ "x$P" == "x" ]; then tvtime & fi' |bash -f -s);\
	Set(status,Type channel number);\
	Set(title,);\
	Set(layout,default);\
	Set(icons,SAME,0,default,1,default,2,default,3,default,4,default,5,default,6,default,7,default,8,default,9,default,#,refresh,*,question);\
	Set(menu,replace,Launch,Quit);\
	Macro(ALLIN1MENU)
(ExitMode)=Set(status,---);

Cancel=Exec(tvtime-command QUIT);Exit
Quit=Exec(tvtime-command QUIT)
Launch=Exec(echo 'P=`ps -ef|grep tvtime|grep -v grep|grep -v anyremote`; if [ "x$P" == "x" ]; then tvtime & fi' |bash -f -s)

Back=Set(text,close);Macro(ALLIN1MENU)

0=Exec(tvtime-command CHANNEL_0 > /dev/null)
1=Exec(tvtime-command CHANNEL_1 > /dev/null)
2=Exec(tvtime-command CHANNEL_2 > /dev/null)
3=Exec(tvtime-command CHANNEL_3 > /dev/null)
4=Exec(tvtime-command CHANNEL_4 > /dev/null)
5=Exec(tvtime-command CHANNEL_5 > /dev/null)
6=Exec(tvtime-command CHANNEL_6 > /dev/null)
7=Exec(tvtime-command CHANNEL_7 > /dev/null)
8=Exec(tvtime-command CHANNEL_8 > /dev/null)
9=Exec(tvtime-command CHANNEL_9 > /dev/null)

* *=Set(text,replace,Help,Press numeric buttons to choose channel\n# - switch mode\n* # - Run/Quit)
* #=Exec(echo 'P=`pgrep tvtime|grep -v grep|grep -v nedit`; if [ "x$P" == "x" ]; then tvtime; else tvtime-command QUIT; fi;' |bash -f -s)
#=Make(mode,tvtime2);

[ModeEnd]

[Mode]=tvtime2

(EnterMode)=Set(icons,TVtime,1,vol_down,2,mute,3,vol_up,4,prev,5,fullscreen,6,next,7,default,8,default,9,default,0,default,#,refresh,*,question);\
	Set(menu,replace,Launch,Quit);\
	Macro(ALLIN1MENU)
(ExitMode)=Set(status,---);

Back=Set(text,close);\
	Set(menu,replace,Launch,Quit);\
	Macro(ALLIN1MENU)
	
Quit=Exec(tvtime-command QUIT)
Launch=Exec(echo 'P=`ps -ef|grep tvtime|grep -v grep|grep -v anyremote`; if [ "x$P" == "x" ]; then tvtime & fi' |bash -f -s)

1=Macro(TVTIME_VOLDOWN)
2=Macro(TVTIME_MUTE)
3=Macro(TVTIME_VOLUP)

4=Macro(TVTIME_CHDN)
5=Macro(TVTIME_ZOOM)
6=Macro(TVTIME_CHUP)

7=Make(none)
8=Make(none)
9=Make(none)

* *=Set(text,replace,Help,1 - Vol-\n2 - Mute\n3 - Vol+\n4 - Ch-\n5 - Fullscreen\n6 - Ch +\n** - Help\n# - switch mode)
0=Make(none)
#=Make(mode,tvtime)


[ModeEnd]

 
[End]
