maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Support thread] Billboard Standby Screen (https://talk.maemo.org/showthread.php?t=84507)

Z3tor 2013-10-26 13:37

Re: [Support thread] Billboard Standby Screen
 
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...:o

Mikkosssss 2013-10-26 13:42

Re: [Support thread] Billboard Standby Screen
 
Just use normal filebox. :)

Win7Mac 2013-10-26 14:13

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by fhutt (Post 1382279)
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.

Quote:

Originally Posted by fhutt (Post 1382295)
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.

Z3tor 2013-10-26 15:01

Re: [Support thread] Billboard Standby Screen
 
Now script file is in /home/user/

I tried
Code:

$ chmod a+x /home/user/network.sh
but no dice..

Win7Mac 2013-10-26 15:13

Re: [Support thread] Billboard Standby Screen
 
Quote:

Originally Posted by Z3tor (Post 1382541)
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

Mikkosssss 2013-10-26 15:14

Re: [Support thread] Billboard Standby Screen
 
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.

Z3tor 2013-10-26 15:33

Re: [Support thread] Billboard Standby Screen
 
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 2013-10-26 15:50

Re: [Support thread] Billboard Standby Screen
 
Try copy script again there might be typos.

Z3tor 2013-10-26 16:03

Re: [Support thread] Billboard Standby Screen
 
Copied script again in utf-8 format and run. I get:
Code:

sh: -e: unknown operand

Z3tor 2013-10-26 16:17

Re: [Support thread] Billboard Standby Screen
 
Ok, got it working by editing script. replaced operand -e with = and replaced command print with echo.

Thanks!


All times are GMT. The time now is 21:44.

vBulletin® Version 3.8.8