Notices


Reply
Thread Tools
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#761
Originally Posted by herno24 View Post
Yes, i don't know, i works because via terminal it shows the path of the icons but billboard desn't show it.
The magic line is this:

{script: develsh signalbar.sh}

Originally Posted by thp View Post
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 and removing the {network-name? } around it.
I may have been the one to suggest doing this...
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.

Originally Posted by Win7Mac View Post
And how do I call network-name with a script?
Code:
networkname=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkName org.maemo.contextkit.Property.Get | sed q)
 

The Following User Says Thank You to slarti For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#762
Originally Posted by thp View Post
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.
As {cell-signal-strength} gets updated most often in BB, it'd be nice to be able to tie any script to it.
Calling it via script only like in 1.0.7 doesn't update that often.

Originally Posted by slarti View Post
It does work when the property is not empty.
There really is no such thing as calling an empty state of a service?

So I merged {network-name} into data-mode.sh and have a strange output... when no network present:

With this script
Code:
#!/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
So what workaround, put a dummy dbus service and adjust the output of it?


Also, I wonder what happens with shades of a color in LPM, like here:
Attached Images
 
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member

Last edited by Win7Mac; 2013-03-28 at 11:44.
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#763
Your strange output seems to be your IMEI that is now posted for all to see
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#764
Originally Posted by thedead1440 View Post
Your strange output seems to be your IMEI that is now posted for all to see
If you really think so then thank you for posting here instead of sending me a discrete pm...

But it's not, the number changes randomly.
I posted the script, no IMEI gets called, it's the networkname when no data network present.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member

Last edited by Win7Mac; 2013-03-28 at 21:39.
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#765
I've reworked some icons, they're all single color with transparent background now:
https://www.dropbox.com/sh/ry67p8djb4hidcy/tbRlrVTWQd
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#766
I don't understand why a data-connection is detected when obviously there isn't/shouldn't be one.
Is it possible to put a condition in the script for network-name that if it's numbers only (like a wildcard for any number-only), it outputs nothing?
Other ideas of getting rid of the numbers from network-name?
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#767
Win7Mac,

If you want to check for a number in your output and give an empty output while giving a non-empty output when there is an alphabet with the number you could use test this way:

Code:
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:
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#768
Code:
state=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkState org.maemo.contextkit.Property.Get)
if [ "$state" = "connected" ]
blah-blah
fi
isn't it what you searching for?
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#769
^^ Exactly! Thanks coderus.
This works as desired:
Code:
#!/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
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#770
@Win7Mac this style of coding more intelligent:
Code:
#!/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
__________________
Telegram | Openrepos | GitHub | Revolut donations

Last edited by coderus; 2013-03-31 at 05:15.
 

The Following 2 Users Say Thank You to coderus For This Useful Post:
Reply


 
Forum Jump


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