%
% anyremote configuration file for Juk management (AT-mode)
%

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

GuiAppName=Juk
GuiAppBinary=juk
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep juk`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=juk.png
GuiAppType=Application
GuiAppProtocols=AT
GuiAppDesc=JuK is a free software audio player for KDE, part of the kdemultimedia package. JuK supports collections of MP3, Ogg Vorbis, and FLAC audio files. This configuration file is for Juk/KDE3.
GuiAppVersion=echo 'V=`juk -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

(Init)=Include($(CfgDir)/Utils/aliases-at.cfg);\
	Make(var,TwoWayComm,by_value,false);\
	Make(var,Device,by_value,/dev/rfcomm0);\
	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)=Make(var,juk_volume,by_value,-1);\
	Exec(echo 'A=`dcop|grep juk`; if [ "x$A" == "x" ]; then juk; fi'|bash -f -s);

Cancel=Exec(dcop juk MainApplication-Interface quit);

1=Exec(dcop juk Player volumeDown)
%2=Exec(dcop juk Player mute) -- does not unmute
2=Make(var,juk_volume,echo 'if [ "x$(juk_volume)" == "x-1" ]; then dcop juk Player volume;dcop juk Player setVolume 0; else dcop juk Player setVolume $(juk_volume); echo "-1"; fi;'|bash -f -s)
3=Exec(dcop juk Player volumeUp)

%4=Exec(dcop juk Player seekBack)
%6=Exec(dcop juk Player seekForward)

4=Exec(echo 'T=`dcop juk Player currentTime`;T2=`expr $T - 5`;dcop juk Player seek $T2'| bash -f -s);
5=Exec(dcop juk Player play);
6=Exec(echo 'T=`dcop juk Player currentTime`;T2=`expr $T + 5`;dcop juk Player seek $T2'| bash -f -s);

7=Exec(dcop juk Player back);
8=Exec(dcop juk Player stop);
9=Exec(dcop juk Player forward);

* *=Exec(echo 'F="$HOME/.anyRemote/anyrem.hlp";echo "1 - Vol- 2 - Mute  3 - Vol+" > $F;echo "4 - Rew  5 - Play  6 - FF" >> $F;echo "7 - Prew 8 - Stop  9 - Next" >> $F;echo "*        0 - Pause # - Quit" >> $F;kdialog -passivepopup "`cat $F`" 7' |bash -f -s)
* #=Exec(echo 'P=`dcop|grep juk`; if [ "x$P" == "x" ]; then juk; else dcop juk MainApplication-Interface quit; fi'|bash -f -s);
0=Exec(dcop juk Player playPause);
#=Exec(dcop juk MainApplication-Interface quit);

[End]
