| The Following User Says Thank You to slarti For This Useful Post: | ||
|
|
2013-03-28
, 11:02
|
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#762
|
You can't nest {} like that in Billboard. I'll see what I can do for future versions. You can work around that by doing the checking in the script.


#!/bin/sh DT=$(develsh -c "qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.DataTechnology") NT=$(develsh -c "qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkType org.maemo.contextkit.Property.Get | sed q") NN=$(develsh -c "qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkName org.maemo.contextkit.Property.Get | sed q") wlan='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-wlan-cyan.png>>' umts='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-3g-yellow.png>>' egprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-25g-yellow.png>>' gprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm-red.png>>' hspa='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-35g-green.png>>' echo -n "$NN " if [ $NT == "WLAN" ] then echo -n $wlan else if [ $DT == "GPRS" ] then echo -n $gprs else if [ $DT == "EGPRS" ] then echo -n $egprs else if [ $DT == "UMTS" ] then echo -n $umts else if [ $DT == "HSPA" ] then echo -n $hspa fi fi fi fi fi
|
|
2013-03-28
, 11:41
|
|
Moderator |
Posts: 6,215 |
Thanked: 6,402 times |
Joined on Nov 2011
|
#763
|
|
|
2013-03-28
, 11:48
|
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#764
|
Your strange output seems to be your IMEI that is now posted for all to see

|
|
2013-03-28
, 21:37
|
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#765
|
|
|
2013-03-30
, 02:03
|
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#766
|
|
|
2013-03-30
, 04:02
|
|
Moderator |
Posts: 6,215 |
Thanked: 6,402 times |
Joined on Nov 2011
|
#767
|
test -z "$NN" -o -n "`echo $NN | tr -d '[0-9]'`" && echo $NN
| The Following User Says Thank You to thedead1440 For This Useful Post: | ||
|
|
2013-03-30
, 08:32
|
|
|
Posts: 6,431 |
Thanked: 12,683 times |
Joined on Nov 2011
@ Open Mobile Platform, Innopolis, Russia
|
#768
|
state=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkState org.maemo.contextkit.Property.Get) if [ "$state" = "connected" ] blah-blah fi
| The Following User Says Thank You to coderus For This Useful Post: | ||
|
|
2013-03-30
, 11:34
|
|
|
Community Council |
Posts: 664 |
Thanked: 1,648 times |
Joined on Apr 2012
@ Hamburg
|
#769
|

#!/bin/sh
DT=$(develsh -c "qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.DataTechnology")
NT=$(develsh -c "qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkType org.maemo.contextkit.Property.Get | sed q")
NN=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkName org.maemo.contextkit.Property.Get | sed q)
state=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkState org.maemo.contextkit.Property.Get | sed q)
wlan='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-wlan-cyan.png>>'
umts='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-3g-yellow.png>>'
egprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-25g-yellow.png>>'
gprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm-red.png>>'
hspa='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-35g-green.png>>'
if [[ $state == "connected" && $NT == "WLAN" ]]
then echo -n "{{cyan}}$NN $wlan"
else if [[ $state == "connected" && $DT == "GPRS" ]]
then echo -n "{{yellow}}$NN $gprs"
else if [[ $state == "connected" && $DT == "EGPRS" ]]
then echo -n "{{yellow}}$NN $egprs"
else if [[ $state == "connected" && $DT == "UMTS" ]]
then echo -n "{{yellow}}$NN $umts"
else if [[ $state == "connected" && $DT == "HSPA" ]]
then echo -n "{{yellow}}$NN $hspa"
fi
fi
fi
fi
fi
|
|
2013-03-31
, 05:12
|
|
|
Posts: 6,431 |
Thanked: 12,683 times |
Joined on Nov 2011
@ Open Mobile Platform, Innopolis, Russia
|
#770
|
#!/bin/sh
state=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkState org.maemo.contextkit.Property.Get | sed q)
wlan='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-wlan-cyan.png>>'
umts='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-3g-yellow.png>>'
egprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-25g-yellow.png>>'
gprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm-red.png>>'
hspa='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-35g-green.png>>'
if [[ $state == "connected" ]]; then
NT=$(develsh -c "qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkType org.maemo.contextkit.Property.Get | sed q")
NN=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkName org.maemo.contextkit.Property.Get | sed q)
if [[ $NT == "WLAN" ]]; then
echo -n "{{cyan}}$NN $wlan"
else
DT=$(develsh -c "qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.DataTechnology")
case $DT in
"GPRS") echo -n "{{yellow}}$NN $gprs" ;;
"EGPRS") echo -n "{{yellow}}$NN $egprs" ;;
"UMTS") echo -n "{{yellow}}$NN $umts" ;;
"HSPA") echo -n "{{yellow}}$NN $hspa" ;;
esac
fi
fi
{script: develsh signalbar.sh}
It does work when the property is not empty. For example, {battery?{script:sh battery.sh}} works as expected. When the property is empty, the trouble starts.