View Single 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