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

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

GuiAppName=Kview
GuiAppBinary=kview
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep kview`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=kview.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=KView is an image viewer program for the KDE (a part of the KDE Graphics package)
GuiAppVersion=echo 'V=`kview -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x3" ]; then echo OK; else echo NOK; fi'|bash -f -s

[Protocol]=Server

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);\
	Exec(echo 'V=`amarok -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x4" ]; then $(CfgDir)/Utils/message.sh "ERROR: this configuration file is for KDE3"; fi'|bash -f -s);

(Connect)=Set(icons,KView,1,folder,2,default,3,default,4,left,5,fullscreen,6,right,7,minus,8,default,9,plus,*,question,0,default,#,no);\
	Set(title,);\
	Set(status,);

Cancel=Exec(echo 'K=`dcop|grep kview`;dcop $K MainApplication-Interface quit'|bash -f -s);
 
Back      =Set(text,close);
Back($$)  =Set(list,close);
UpdateMenu=Set(menu,replace,GoTo,Open);

% FBROWSER v.3 
FillList=Set(list,replace,Files,..);\
	ExecAndSet(list,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";ls -F --quoting-style=shell|sed 's/\*//;s/@//;s/,/\r/g;s/$/,/');
GoTo($$)=Set(list,replace,SAME,..);\
	Make(var,goto,by_value,$(Param));\
	ExecAndSet(list,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";echo "if [ -d $(goto) ]; then cd $(goto);fi;pwd>$HOME/.anyRemote/ar_storedir.tmp;ls -F --quoting-style=shell|sed 's/\*//;s/@//;s/,/\r/g;s/$/,/'"|bash -f -s);
% FBROWSER v.3 

Open($$)=Set(list,close);\
	Set(menu,clear);\
	Exec(echo 'K=`dcop|grep kview`;if [ "x$K" == "x" ]; then true; else dcop $K MainApplication-Interface quit; fi;'|bash -f -s;cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";kview "$(Param)" --nocrashhandler &);

1=Macro(FillList);Macro(UpdateMenu);

4=Emulate(keydown,Shift_L,key,Left,keyup,Shift_L)
5=Exec(echo 'K=`dcop|grep kview`;dcop $K KView activateAction fullscreen'|bash -f -s)
6=Emulate(keydown,Shift_L,key,Right,keyup,Shift_L)

7=Emulate(keydown,Control_L,key,minus,keyup,Control_L)
%8=Exec(echo 'K=`dcop|grep kview`;dcop $K KView setGeometry 300 150 800 600'|bash -f -s)
9=Emulate(keydown,Control_L,key,KP_Add,keyup,Control_L)

* *=Set(text,replace,Help,1 - File browser\n4 - Previous\n5 - Toggle Full Screen\n6 - Next\n7 - Size -\n9 - Size +\n* * - Help\n# - Quit\n)
#=Exec(echo 'K=`dcop|grep kview|head -1`;dcop $K MainApplication-Interface quit'|bash -f -s)
[End]
