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

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

GuiAppName=TvTime
GuiAppBinary=tvtime
GuiAppRun= A=`ps -ef|grep tvtime|grep -v grep`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi
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
KEY_VOLUMEDOWN=Macro(TVTIME_VOLDOWN)
KEY_MIN_INTERESTING=Macro(TVTIME_MUTE)
KEY_VOLUMEUP=Macro(TVTIME_VOLUP)

KEY_CHANNELUP=Macro(TVTIME_CHUP)
KEY_CHANNELDOWN=Macro(TVTIME_CHDN)
KEY_ZOOM=Macro(TVTIME_ZOOM)

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

(Connect)=\
	Make(mode,tvtime);

Cancel=\
    Make(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(P=`ps -ef|grep tvtime|grep -v grep|grep -v anyremote`; if [ "x$P" = "x" ]; then tvtime & fi);\
	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);Make(exit);

Quit=\
	Exec(tvtime-command QUIT)

Launch=\
	Exec(P=`ps -ef|grep tvtime|grep -v grep|grep -v anyremote`; if [ "x$P" = "x" ]; then tvtime & fi)

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(P=`pgrep tvtime|grep -v grep|grep -v edit`; if [ "x$P" = "x" ]; then tvtime; else tvtime-command QUIT; fi)
#=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(P=`ps -ef|grep tvtime|grep -v grep|grep -v anyremote`; if [ "x$P" = "x" ]; then tvtime & fi)

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]
