Notices


Reply
Thread Tools
Posts: 58 | Thanked: 19 times | Joined on Jan 2012 @ Finland
#1001
Well... it seems i dont have permissions to /home/user. I tried to copy my script with Fileboxroot and with WinSCP as root. How do i copy script to /home/user? Excuse my noobness...
 
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#1002
Just use normal filebox.
__________________
────────────────────
Try:My N9 bootvideo
 

The Following User Says Thank You to Mikkosssss For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#1003
Originally Posted by fhutt View Post
A signal strength logo or bar would be great. Even better, a status line similar to the status bar at the top of the home screen would be even better.
Originally Posted by fhutt View Post
I actually thought of another wish (fairly important). A flight mode indicator.
Here's a solution for both in one script (signal.sh):
Code:
#!/bin/sh

percent=$(qdbus --system com.nokia.csd /com/nokia/csd/csnet com.nokia.csd.CSNet.SignalStrength.SignalPercent)
tech=$(develsh -c "qdbus --system com.nokia.csd.CSNet /com/nokia/csd/csnet com.nokia.csd.CSNet.RadioAccess.Technology")
if [[ $percent -ge 15 && $tech == "GSM" ]]
then echo -n "{{yellow}}$percent % {{=$(($percent/100)).$((($percent%100)/10))$(($percent%10))}} <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-gsm-yellow2.png>>"
else if [[ $percent -le 14 && $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 15 && $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 14 && $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
In Billboard put this line:
Code:
{cell-signal-strength?{script: home/user/signal.sh}}{{red}}{cell-signal-strength!Flightmode on <</usr/share/themes/blanco/meegotouch/icons/icon-s-status-flight-mode-red.png>>}
I edited all of the icons (leave the "-color" for the default icons).

The script updates every couple of seconds so expect a slight increase of battery drain.
__________________
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
 

The Following User Says Thank You to Win7Mac For This Useful Post:
Posts: 58 | Thanked: 19 times | Joined on Jan 2012 @ Finland
#1004
Now script file is in /home/user/

I tried
Code:
$ chmod a+x /home/user/network.sh
but no dice..

Last edited by Z3tor; 2013-10-26 at 15:04. Reason: r --> x
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#1005
Originally Posted by Z3tor View Post
I tried
Code:
$ chmod a+x /home/user/network.sh
but no dice..
where you got the "a" from?
correct is
Code:
chmod +x /home/user/network.sh
__________________
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
 

The Following User Says Thank You to Win7Mac For This Useful Post:
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#1006
When you do that it should say nothing.

Then you can just try:

Code:
/home/user/network.sh
If it says "{{white}} 2G" or something script is now working.
__________________
────────────────────
Try:My N9 bootvideo
 

The Following User Says Thank You to Mikkosssss For This Useful Post:
Posts: 58 | Thanked: 19 times | Joined on Jan 2012 @ Finland
#1007
something must be wrong in code.. output is
Code:
:not foundnetwork.sh: line 1: ??#! /bin/sh
:not foundnetwork.sh: line 2:
/home/user/network.sh: line 9: syntax error: unexpected end of file (expecting "fi")
 
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#1008
Try copy script again there might be typos.
__________________
────────────────────
Try:My N9 bootvideo
 
Posts: 58 | Thanked: 19 times | Joined on Jan 2012 @ Finland
#1009
Copied script again in utf-8 format and run. I get:
Code:
sh: -e: unknown operand
 
Posts: 58 | Thanked: 19 times | Joined on Jan 2012 @ Finland
#1010
Ok, got it working by editing script. replaced operand -e with = and replaced command print with echo.

Thanks!
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:45.