|
2010-04-24
, 21:16
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#102
|
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
~ $ 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
The Following User Says Thank You to No!No!No!Yes! For This Useful Post: | ||
|
2010-04-26
, 16:05
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#103
|
The Following 2 Users Say Thank You to No!No!No!Yes! For This Useful Post: | ||
|
2010-04-27
, 00:12
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#104
|
The Following User Says Thank You to No!No!No!Yes! For This Useful Post: | ||
|
2010-05-05
, 20:12
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#105
|
[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
The Following 4 Users Say Thank You to No!No!No!Yes! For This Useful Post: | ||
|
2010-05-14
, 08:15
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#106
|
The Following 4 Users Say Thank You to No!No!No!Yes! For This Useful Post: | ||
|
2010-05-14
, 17:43
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#107
|
|
2010-05-14
, 18:10
|
Posts: 150 |
Thanked: 80 times |
Joined on Dec 2009
|
#108
|
The Following User Says Thank You to Sash For This Useful Post: | ||
|
2010-05-14
, 18:20
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#109
|
|
2010-05-14
, 19:25
|
|
Posts: 700 |
Thanked: 846 times |
Joined on Nov 2009
|
#110
|
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?
echo "<span font=\"15\"><b>`date +"%A, %-Y-%m-%-d - Vecka %W"`</b></span>"
The Following User Says Thank You to No!No!No!Yes! For This Useful Post: | ||
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