%
% anyremote configuration file for kuickshow management.
%
% Needs $PHOTO_DIR environment variable
%
% There were found no DCOP-oriented way to traverse the albums and photos,
% so XTest is used
%

% STATUS stable
% XTEST yes
% SOUND no
% ENV yes

GuiAppName=Kuickshow
GuiAppBinary=kuickshow
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep kuickshow`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=kuickshow.png
GuiAppType=Application
GuiAppProtocols=AT
GuiAppDesc=KuickShow is an image browser/viewer 
GuiAppVersion=echo 'V=`kuickshow -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]=AT

ZOOM=Macro(5)

(Init)=Include($(CfgDir)/Utils/aliases-at.cfg);\
	Make(var,TwoWayComm,by_value,false);\
	Make(var,Device,by_value,/dev/rfcomm0);\
	Exec(echo 'if [ "x$PHOTO_DIR" == "x" ]; then $(CfgDir)/Utils/message.sh "ERROR: PHOTO_DIR environment variable is not set !"; fi'|bash -f -s);\
	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);

% aliased keys
Answer=Make(disconnect);
Cancel=Exec(echo 'KS=`dcop|grep kuickshow`;dcop $KS MainApplication-Interface quit'|bash -f -s);

(Connect)=Macro(KUICKSHOW_RUN);

KUICKSHOW_RUN=Exec(kuickshow $PHOTO_DIR&);Emulate(sleep,5000,key,Tab,sleep,500,key,Tab)

1=Macro(KUICKSHOW_RUN);
2=Emulate(key,Up)
3=Exec(echo 'KS=`dcop|grep kuickshow`;dcop $KS kuickshow activateAction up'|bash -f -s)

4=Emulate(key,Left)
5=Make(mode,Fullscreen);Exec(echo 'KS=`dcop|grep kuickshow`;dcop $KS kuickshow activateAction kuick_showFullscreen'|bash -f -s)
6=Emulate(key,Right)

8=Emulate(key,Down)
9=Emulate(key,Return)

* *=Exec(echo 'F="$HOME/.anyRemote/anyrem.hlp";echo "1 - Run kuickshow  2 - Up           3 - Up Dir" > $F;echo "4 - Left           5 - Full Screen  6 - Right" >> $F;echo "7                  8 - Down         9 - Into Dir" >> $F;echo "* * - Help         0                # - Quit" >> $F; kdialog -passivepopup "`cat $F`" 7' |bash -f -s)
#=Exec(echo 'KS=`dcop|grep kuickshow`;dcop $KS MainApplication-Interface quit'|bash -f -s)

[Mode]=Fullscreen

% empty values to override default mode
1=Make(none)
2=Make(none)
3=Make(none)

% Prev/Fullscreen off/Next
4=Emulate(key,Page_Up)
5=Make(mode,default);Emulate(key,Escape)
6=Emulate(key,Page_Down)

% Size +/ /-
7=Emulate(key,minus)
8=Make(none)
9=Emulate(keydown,Shift_L,key,plus,keyup,Shift_L)

* *=Exec(echo 'F="$HOME/.anyRemote/anyrem.hlp";echo "1               2                   3" > $F;echo "4 - Previous    5 - Full Screen Off 6 - Next" >> $F;echo "7 - Size -      8                   9 - Size +" >> $F;echo "* * - Help      0                   # - Quit" >> $F; kdialog -passivepopup "`cat $F`" 7' |bash -f -s)

[ModeEnd]

[End]
