%
% anyremote configuration file for keyjnote management (Server-mode)
% keynote is renamed to impressive, so this file is obsoleted
%
% Thanks Gabriel for this configuration file.
%

% STATUS stable
% XTEST yes
% SOUND no
% ENV no
% FBROWSER v.3i

GuiAppName=Keyjnote
GuiAppBinary=keyjnote.py
GuiAppRun=echo 'P=`ps -ef|grep keyjnote|grep -v grep|grep -v anyremote|grep -v edit`; if [ "x$P" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=KeyJnote is a program that displays PDF presentation slides with style. Now KeyJnote is renamed to Impressive, and this configuration file is obsoleted.

[Protocol]=Server

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);\
	Make(var, keyjnote_exec, which keyjnote 2> /dev/null);\
	Make(var, keyjnote_exec, echo 'if [ "x$(keyjnote_exec)" == "x" ]; then which keyjnote.py; else echo $(keyjnote_exec); fi'|bash -f -s);

(Connect)=Set(icons,Keyjnote,1,folder,2,up,3,default,4,left,5,fit,6,right,7,default,8,down,9,default,*,question,0,refresh,#,no);\
	Set(font,small);\
	Set(status,keyjnote);\
	Set(title,);
	
Cancel=Exec(pkill -f 'python (.)*keyjnote');

Back=Set(text,close);
Back($$)=Set(list,close);
UpdateMenu=Set(menu,replace,GoTo,Open,Go Home);

% FBROWSER v.3i 
FillList=Set(iconlist,replace,Files,folder:..);\
	Macro(FillDir);\
        Macro(FillFile);
FillDir =ExecAndSet(iconlist,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep '/'| xargs -d '\n' -i echo "folder:" {});
FillFile=ExecAndSet(iconlist,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep -v '/'| xargs -d '\n' -i echo "file:"{});
GoTo($$)=Make(var,goto,by_value,$(Param));\
	ExecAndSet(iconlist,replace,Files,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";echo "if [ -d $(goto) ]; then cd $(goto);fi;pwd>$HOME/.anyRemote/ar_storedir.tmp;"|bash -f -s;echo "folder:..");\
	Macro(FillDir);\
        Macro(FillFile);
Go Home($$)=ExecAndSet(iconlist,replace,Files,cd;pwd>$HOME/.anyRemote/ar_storedir.tmp;echo "folder:..");\
	Macro(FillDir);\
        Macro(FillFile);
% FBROWSER v.3i 

Open($$)=\
	Set(list,close);\
	Set(menu,clear);\
	Exec(cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";xterm -e $(keyjnote_exec) "$(Param)");\
	Set(title,$(Param));

0=Emulate(key,L)
1=Macro(FillList);Macro(UpdateMenu);
2=Emulate(key,Up)
3=Emulate(mouse,1)

4=Emulate(key,Left)
5=Emulate(key,Tab)
6=Emulate(key,Right)

7=Emulate(key,B)
8=Emulate(key,Down)
9=Emulate(key,W)

* *=Set(text,replace,Help,1 Choose file\n2 Up\n4 Previous page\n5 Overview\n6 Next page\n7 Fade to back\n8 Down\n9 Fade to white\n0 Toggle\n** Help\n# Quit\n);
%#=Emulate(key, Escape);Set(title, );
#=Exec(pkill -f 'python (.)*keyjnote');Set(title, );

[End]
