| 1 |
% |
| 2 |
% anyremote configuration file for kmplayer management. |
| 3 |
% prerequisites: KDE, kmplayer, amixer utility (example is for soundcard) |
| 4 |
% $MOVIE_DIR environment variable |
| 5 |
% |
| 6 |
|
| 7 |
% STATUS stable |
| 8 |
% XTEST no |
| 9 |
% SOUND app |
| 10 |
% ENV no |
| 11 |
|
| 12 |
GuiAppName=Kmplayer |
| 13 |
GuiAppBinary=kmplayer |
| 14 |
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep kmplayer`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s |
| 15 |
GuiAppIcon=kmplayer.png |
| 16 |
GuiAppType=Application |
| 17 |
GuiAppProtocols=AT |
| 18 |
GuiAppDesc=Media Player for KDE |
| 19 |
GuiAppVersion=echo 'V=`kmplayer -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 |
| 20 |
|
| 21 |
[Protocol]=AT |
| 22 |
|
| 23 |
(Init)=Include($(CfgDir)/Utils/aliases-at.cfg);\ |
| 24 |
Make(var,TwoWayComm,by_value,false);\ |
| 25 |
Make(var,Device,by_value,/dev/rfcomm0);\ |
| 26 |
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);\ |
| 27 |
Exec(echo 'if [ "x$MOVIE_DIR" == "x" ]; then $(CfgDir)/Utils/message.sh "ERROR: MOVIE_DIR environment variable is not set !"; fi'|bash -f -s); |
| 28 |
|
| 29 |
Cancel=\ |
| 30 |
Exec(echo 'K=`dcop|grep kmplayer`;dcop $K MainApplication-Interface quit'|bash -f -s);\ |
| 31 |
SendCKPD(E); |
| 32 |
|
| 33 |
KLAYER_RESET=Make(var,kmplayer_list,by_value);\ |
| 34 |
Exec(echo 'K=`dcop|grep kmplayer`;if [ "x$K" == "x" ]; then kmplayer& fi;'|bash -f -s) |
| 35 |
|
| 36 |
(Connect)=Macro(KLAYER_RESET) |
| 37 |
|
| 38 |
1=Exec(amixer sset Master,0 5%- -q) |
| 39 |
2=Exec(amixer sset Master,0 toggle -q) |
| 40 |
3=Exec(amixer sset Master,0 5%+ -q) |
| 41 |
|
| 42 |
4=Exec(echo 'K=`dcop|grep kmplayer`;POS=`dcop $K KMediaPlayer position`;NEWPOS=`expr $POS - 10000`;dcop $K KMediaPlayer seek $NEWPOS'|bash -f -s) |
| 43 |
5=Make(var,kmplayer_list,echo 'K=`dcop|grep kmplayer`;P=`dcop $K KMediaPlayer isPlaying`; if [ "x$P" == "xtrue" ]; then true; else NUM=$(kmplayer_list);if [ "x$(kmplayer_list)" == "x" ]; then NUM=1; fi; dcop $K KMediaPlayer openURL `find $MOVIE_DIR -type f|head -$NUM|tail -1`;echo $NUM; fi'|bash -f -s|tail -1) |
| 44 |
6=Exec(echo 'K=`dcop|grep kmplayer`;POS=`dcop $K KMediaPlayer position`;NEWPOS=`expr $POS + 10000`;dcop $K KMediaPlayer seek $NEWPOS'|bash -f -s) |
| 45 |
|
| 46 |
7=Make(var,kmplayer_list,echo 'K=`dcop|grep kmplayer`;if [ "x$(kmplayer_list)" == "x" ] || [ "x$(kmplayer_list)" == "x0" ] || [ "x$(kmplayer_list)" == "x1" ]; then NUM=1; else NUM=`expr $(kmplayer_list) - 1`; fi; dcop $K KMediaPlayer openURL `find $MOVIE_DIR -type f|head -$NUM|tail -1`;echo $NUM'|bash -f -s|tail -1) |
| 47 |
8=Exec(dcop `dcop|grep kmplayer` KMediaPlayer stop) |
| 48 |
9=Make(var,kmplayer_list,echo 'K=`dcop|grep kmplayer`;if [ "x$(kmplayer_list)" == "x" ]; then NUM=1; else NUM=`expr $(kmplayer_list) + 1`;fi; dcop $K KMediaPlayer openURL `find $MOVIE_DIR -type f|head -$NUM|tail -1`;echo $NUM'|bash -f -s|tail -1) |
| 49 |
|
| 50 |
* *=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 "* * - Help 0 - Pause # - Quit" >> $F;kdialog -passivepopup "`cat $F`" 7' |bash -f -s) |
| 51 |
* 1=Macro(KLAYER_RESET) |
| 52 |
* #=Exec(echo 'K=`dcop|grep kmplayer`;if [ "x$K" == "x" ]; then kmplayer& else dcop $K MainApplication-Interface quit; fi;'|bash -f -s) |
| 53 |
0=Exec(dcop `dcop|grep kmplayer` KMediaPlayer pause) |
| 54 |
#=Exec(echo 'K=`dcop|grep kmplayer`;dcop $K MainApplication-Interface quit'|bash -f -s) |
| 55 |
|
| 56 |
[End] |