Notices


Reply
Thread Tools
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#731
Originally Posted by slarti View Post
{{red}}{cell-signal-strength!Flugmodus an ✈}{cell-signal-strength?{script: sh signalbar.sh}}
This works for flightmode OFF, but when I turn it ON, the bracket is back at the end of line.

Originally Posted by slarti View Post
{{red}}{cell-signal-strength!Flugmodus an ✈}{cell-signal-strength?{script: sh signalbar.sh}
This works for flightmode ON only.

Originally Posted by slarti View Post
Although, I think this is a bug. IMO every opening bracket should have a closing bracket.
@thp, could you comment plz?

Code:
~ $ develsh
~ $ qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology
Please share complete script.
__________________
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,700 times | Joined on Nov 2011 @ Ängelholm, Sweden
#732
Originally Posted by Win7Mac View Post
Code:
~ $ develsh
~ $ qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology
Please share complete script.
Code:
#!/bin/sh
echo -n $(develsh -c "qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology")
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#733
Can show 3G, Dual, 2G instead of UMTS or GSM?
__________________
The Glorious Lady T.Mavica
Twitter https://twitter.com/TMavica
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#734
Originally Posted by TMavica View Post
Can show 3G, Dual, 2G instead of UMTS or GSM?
I'm also thinking about a modified script, something like this
Code:
#!/bin/sh

mode=$(develsh -c "qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology")
if [[ $mode -e GSM ]]
then print "{{yellow}}2G"
fi
if [[ $mode -e UMTS ]]
then print "{{yellow}}3G"
fi
Please correct to make it work.


Also, I noticed that {cell-network} doesn't work.
__________________
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-23 at 20:53.
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#735
Originally Posted by TMavica View Post
Can show 3G, Dual, 2G instead of UMTS or GSM?
For that, use:

Code:
qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.SelectionMode
(You'll need to run it with develsh)

Originally Posted by Win7Mac View Post
I'm also thinking about a modified script, something like this
Code:
#!/bin/sh

mode=$(develsh -c "qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology")
if [[ $mode -e GSM ]]
then print "{{yellow}}2G"
fi
if [[ $mode -e UMTS ]]
then print "{{yellow}}3G"
fi
Please correct to make it work.
Here is what I have for changing the icon for cell-network:

Code:
#!/bin/sh

tech=$(qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology)
gsm='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm.png>>'
umts='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-3g.png>>'
if [ $tech == "GSM" ]
then echo -n $gsm
fi
if [ $tech == "UMTS" ]
then echo -n $umts
fi
... and for data connection:

Code:
#!/bin/sh

DT=$(qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.DataTechnology)
NT=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkType org.maemo.contextkit.Property.Get | sed q)
wlan='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-wlan.png>>'
umts='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-3g.png>>'
egprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-25g.png>>'
gprs='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm.png>>'
hspa='<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-35g.png>>'
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
Both of these have to be called with develsh instead of sh. You also probably want to handle the no connection case somehow (in BB, in script or leave empty). Tying these to {cell-signal-strength} seem to keep them pretty much up to date, but I'm pretty sure it will use some battery, too.

Originally Posted by Win7Mac View Post
Also, I noticed that {cell-network} doesn't work.
Works for me.
 

The Following 4 Users Say Thank You to slarti For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#736
slarti you script doctor, you're the man!!!
Thanks a million, I'll play around with them and report.

{cell-network} gives me a blank line. This is the 2nd difference I experience, should I reinstall or repair?
I updated to 1.0.8 via store.

Also, is there away to use emoji character in python.py?
__________________
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
 
TMavica's Avatar
Posts: 2,021 | Thanked: 1,060 times | Joined on Apr 2010 @ Hong Kong
#737
Nothing show for cell network channel?

sorry oked

Last edited by TMavica; 2013-03-23 at 22:34.
 
Posts: 239 | Thanked: 70 times | Joined on Oct 2010 @ Germany
#738
doesn't show upcoming events, when events are repeated?
 
Posts: 32 | Thanked: 7 times | Joined on Apr 2012 @ Panamá
#739
I need the center the image, What is the procedure ....
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#740
Many thanks again slarti!
I messed around with the scripts and icons and now have colored, dynamically changing icons for cell- and data-info and battery.
It looks like this now:






For everybody interested, I uploaded the icons to my dropbox: https://www.dropbox.com/sh/ry67p8djb4hidcy/tbRlrVTWQd
If you want other icons, different colors or sizes feel free to ask here or pm me.

Here're the scripts:

signalbar.sh:
Code:
#!/bin/sh

percent=$(qdbus --system com.nokia.csd /com/nokia/csd/csnet com.nokia.csd.CSNet.SignalStrength.SignalPercent)
tech=$(qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology)
if [[ $percent -ge 20 && $tech == "GSM" ]]
then echo -n "{{yellow}}$percent % {{=$(($percent/100)).$((($percent%100)/10))$(($percent%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm-yellow.png>>"
else if [[ $percent -le 19 && $tech == "GSM" ]]
then echo -n "{{red}}$percent % {{=$(($percent/100)).$((($percent%100)/10))$(($percent%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm-red.png>>"
fi
fi
if [[ $percent -ge 20 && $tech == "UMTS" ]]
then echo -n "{{yellow}}$percent % {{=$(($percent/100)).$((($percent%100)/10))$(($percent%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-3g-yellow.png>>"
else if [[ $percent -le 19 && $tech == "UMTS" ]]
then echo -n "{{red}}$percent % {{=$(($percent/100)).$((($percent%100)/10))$(($percent%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-3g-red.png>>"
fi
fi
data-mode.sh:
Code:
#!/bin/sh

DT=$(qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.DataTechnology)
NT=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkType 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 [ $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
battery.sh:
Code:
#!/bin/sh
status=$(qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/bme org.freedesktop.Hal.Device.GetProperty battery.charge_level.percentage)
if [[ $status -eq 100 ]]
then echo -n "{{green}}$status % {{=1.0}}"
fi
if [[ $status -ge 80 && $status -le 99 ]]
then echo -n "{{green}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery8-green.png>>"
fi
if [[ $status -ge 70 && $status -le 79 ]]
then echo -n "{{green}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery7-green.png>>"
fi
if [[ $status -ge 60 && $status -le 69 ]]
then echo -n "{{green}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery6-green.png>>"
fi
if [[ $status -ge 50 && $status -le 59 ]]
then echo -n "{{green}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery5-green.png>>"
fi
if [[ $status -ge 40 && $status -le 49 ]]
then echo -n "{{green}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery4-green.png>>"
fi
if [[ $status -ge 30 && $status -le 39 ]]
then echo -n "{{yellow}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery3-yellow.png>>"
fi
if [[ $status -ge 20 && $status -le 29 ]]
then echo -n "{{yellow}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery2-yellow.png>>"
fi
if [[ $status -ge 10 && $status -le 19 ]]
then echo -n "{{red}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery1-red.png>>"
fi
if [[ $status -ge 1 && $status -le 9 ]]
then echo -n "{{red}}$status % {{=$(($status/100)).$((($status%100)/10))$(($status%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-battery-low-red.png>>"
fi
The battery script can be shortened, I guess.

My remaining issues:
- {cell-signal-strength?{script: develsh signalbar.sh}}{{red}}{cell-signal-strength!Flugmodus an ✈} and
{{red}}{cell-signal-strength!Flugmodus an ✈}{cell-signal-strength?{script: develsh signalbar.sh} gives a "}" only when in flightmode

- {network-name}{network-name? {script: develsh /home/user/data-mode.sh}} also gives a "}" only when no network present

- <</usr/share/...path-to-icon.png>> won't show up if put in BB directly or in python scripts, only from shell scripts
Probably I'm doing sth wrong, I tried
Code:
print ('{{blue}}'+event_date+' '+event_time+' '+title+' '+<</usr/share/themes/blanco/meegotouch/icons/icon-s-calendar.png>>)
as the last line in slartis' events.py

- what about emoji icons in python scripts, possible (not really needed if images would work)?

And here's the mess with the brackets when flightmode on and no active network, any solution for this?:
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-26 at 14:38. Reason: added pic
 

The Following 4 Users Say Thank You to Win7Mac For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 19:52.