maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

SallyJane 2010-04-24 16:06

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
I'm trying to create a 2G/3G toggle widget.

When I copy and paste the (rather long) 2g3g.sh script from here

http://wiki.maemo.org/Desktop_Comman...cripts#2G.2F3G

into the Command field of the AddCmd settings, all that is entered is the first line of the script

*!/bin/sh

No!No!No!Yes! 2010-04-24 21:16

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by SallyJane (Post 626026)
I'm trying to create a 2G/3G toggle widget.

When I copy and paste the (rather long) 2g3g.sh script from here

http://wiki.maemo.org/Desktop_Comman...cripts#2G.2F3G

into the Command field of the AddCmd settings, all that is entered is the first line of the script

*!/bin/sh

You cannot paste it directly into QBW.
You need to connect to X-Terminal for that and then...:
Code:

~ $
cd /home/user
cat > 2g3g.sh
<here you paste the script>
#!/bin/sh
if [ `dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | awk '/b/ {print $2}'` -eq 1 ]; then
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2
else
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1
fi

<then you press CTRL-D and you get the prompt again>

~ $ chmod 755 2g3g.sh

Now you can "AddCmd": /home/user/2g3g.sh

... and see what happens.

No!No!No!Yes! 2010-04-26 16:05

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
:cool: We are now in... Extras Repository eventually!!! :D Yayyyyy!!! :D

No!No!No!Yes! 2010-04-27 00:12

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
N900 Mini Monitor... preview. Still testing output formatting and minor issues!

http://i44.tinypic.com/14iei6f.jpg

No!No!No!Yes! 2010-05-05 20:12

[Announce] Queen BeeCon Widget - GPRS Compact Data Monitor
 
1 Attachment(s)
This is in very early stages of development so it doesn't deserve its proper thread...
It's just a proof of concept for handling persistency of configuration data across multiple command executions... Furthermore PR1.2 is supposed to bring changes to counters position so... let's wait a little bit more for final version.

Customize Queen BeeCon Widget (>=v0.1.4) to display:
GPRS Compact Data Monitor

The Beecon will show plenty of Data Plan information and statistics, plus changes background according to data plan capacity consumption.

http://i39.tinypic.com/f1mpn6.jpg
http://i43.tinypic.com/14u7uva.jpg

http://i42.tinypic.com/o79k5y.png http://i42.tinypic.com/2ly3ejo.png http://i43.tinypic.com/2wlvlao.png http://i40.tinypic.com/5wkwld.png

Code:

[queen-beecon-header]
version=1,000000
checksum=5739874
[queen-beecon-exported-instance]
widgetType=0
operationalStatus=0
hideCanvas=true
snippetBgRGB=0
beecon_lt0_ImgZoom=0
beecon_lt0_BgRGB=2
beecon_lt0_ImgFilename=queen-beecon-syserr.png
beecon_eq0_ImgZoom=0
beecon_eq0_BgRGB=3
beecon_eq0_ImgFilename=gprsmon-green.png
beecon_eq1_ImgZoom=0
beecon_eq1_BgRGB=4
beecon_eq1_ImgFilename=gprsmon-yellow.png
beecon_ge2_ImgZoom=0
beecon_ge2_BgRGB=5
beecon_ge2_ImgFilename=gprsmon-red.png
beecon_idxge2_ImgZoom=0
beecon_idxge2_BgRGB=11
beecon_idxge2_ImgFilename=queen-beecon-index.png
widWidth=175
widHeight=110
instanceTitle=Gprs Compact Data Monitor
instanceCmd=SD=20100414;RP=2M;U=0;D=0;T=600;red=95;yellow=90;echo `gconftool-2 --get /system/osso/connectivity/network_type/GPRS/gprs_reset_time` `gconftool-2 --get /system/osso/connectivity/network_type/GPRS/gprs_tx_bytes` `gconftool-2 --get /system/osso/connectivity/network_type/GPRS/gprs_rx_bytes` | awk -v r=$red -v y=$yellow -v U=$U -v D=$D -v T=$T -v SD=$SD -v RP=$RP -v N=$(date -d "`echo $SD | cut -c 5-6` `echo $SD | cut -c 7-8` `echo $SD | cut -c 1-4`" +%s) -v CD=`date "+%Y%m%d"` '{x=0;M=1048576;SDd=substr(SD,7,2);SDm=substr(SD,5,2);SDy=substr(SD,1,4);i=substr(RP,1,length(RP)-1);u=$2/M;if(U>0)Uu=($2/M)/U*100;d=$3/M;if(D>0)Dd=($3/M)/D*100;t=($2+$3)/M;if(T>0)Tt=($2+$3)/M/T*100;Xm=nXm(SDd,SDm,SDy,i,RP,N);LR=strftime("%Y%m%d@%H%M",$1);if(Uu>=y||Dd>=y||Tt>=y)x++;if(Uu>=r||Dd>=r||Tt>=r)x++;if(x>2)x=2;printf("SD:%s RP:%3s\\nNR:%s\\nU%4dM(%4dM-%3d%%)\\nD%4dM(%4dM-%3d%%)\\nT%4dM(%4dM-%3d%%)\\nLR:%s\\n",SD,RP,Xm,u,U,Uu,d,D,Dd,t,T,Tt,LR);exit x;}function Dy(d,m,y){m=(m+9)%12;y=int(y-m/10);return 365*y+y/4-y/100+y/400+(m*306+5)/10+(d-1);}function nXm(d,m,y,i,RP,N){split("31,28,31,30,31,30,31,31,30,31,30,31",dm,",");CDd=substr(CD,7,2);CDm=substr(CD,5,2);CDy=substr(CD,1,4);if(index(RP,"D")>0){s=strftime("%Y%m%d",N+86400*(i-1));od=substr(s,7,2);om=substr(s,5,2);oy=substr(s,1,4);} else {om=(m+i)%12;oy=y+int((m+i)/12);od=d;while(od>dm[om])od--;if (((oy%4==0&&oy%100!=0)||(oy%400==0))&&om==2&&d>28)then od++;}return sprintf("%4d%02d%02d D:%4d",oy,om,od,-1*int(Dy(od,om,oy)-Dy(CDd,CDm,CDy)));}'
cmdImgFilename=gprsmon.png
cmdImgZoom=0
cmdFgRGB=1
cmdVisibilityPosition=0
cmdImgVisibilityPosition=5
cmdJustify=0
cmdFontName=3
cmdFontSize=12
resImgFilename=queen-beecon-resimg.png
resImgZoom=0
resFgRGB=0
resVisibilityPosition=5
resImgVisibilityPosition=5
resJustify=0
resFontName=14
resFontSize=11
updOnStartup=false
updOnClick=true
updOnDesktop=false
delayIndex=4
updNeworkPolicy=0

Change specific parameters (explained inside the image above) at the very beginning of the command line...

No!No!No!Yes! 2010-05-14 08:15

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Current developments are now focused on providing Inter Process Communication among QBW instances and with other Applications.

This feature is under design/development as I would like to release the much complete and customizable IPC mechanism possible, like for example:
  • Give impulse to a Beecon for content update
  • Give impulse to a Beecon for layout update
  • Give other beecons one-shot alternative scripts to execute
  • Remotely change QBW settings
  • Retrieve other beecon's last executed commands exit status
  • Provide to non graphical programs and daemons a suitable interface for displaying information on precustomized beecons on screen (for example Dbus Scripts for displaying events on the system/session DBUS like cell IDs changes, available WLANs and the like)
I encourage you to suggest possible enhancements or wishlists in this area.

There are infinite possibilities ... just stay tuned!!!

AlMehdi 2010-05-14 17:43

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
I am sure this is written somewhere but can't get it to work.

echo `date +"<span size=\\"15\\"><b>%A, %-Y-%m-%-d - Vecka %W</b></span>"`

What am i doing wrong? Also i am trying to make a button to switch my kernel-setting to use limits. In this case i don't want the "root shell enabled" output. Just want the bg to show. Is it possible to get output not to show?

Sash 2010-05-14 18:10

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by AlMehdi (Post 658666)
Is it possible to get output not to show?

Under Command Result Settings choose the position to be hidden, then the output won't show up.

AlMehdi 2010-05-14 18:20

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by Sash (Post 658701)
Under Command Result Settings choose the position to be hidden, then the output won't show up.

Ahh.. great! thanks. ;)

No!No!No!Yes! 2010-05-14 19:25

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by AlMehdi (Post 658666)
I am sure this is written somewhere but can't get it to work.

echo `date +"<span size=\\"15\\"><b>%A, %-Y-%m-%-d - Vecka %W</b></span>"`

What am i doing wrong? Also i am trying to make a button to switch my kernel-setting to use limits. In this case i don't want the "root shell enabled" output. Just want the bg to show. Is it possible to get output not to show?

Ciao,
this will work ...
Code:

echo "<span font=\"15\"><b>`date +"%A, %-Y-%m-%-d - Vecka %W"`</b></span>"
BTW: why bothering using Pango Markup Tags when you can stick to native QBW formatting settings from here:
http://i43.tinypic.com/2rrmgea.jpg


All times are GMT. The time now is 12:00.

vBulletin® Version 3.8.8