maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Share your Widgets! (https://talk.maemo.org/showthread.php?t=59798)

RAZOR 2010-10-27 09:03

Re: Share your Widgets!
 
Here you go:

Code:

: not foundacl.sh: line 4:
: not foundacl.sh: line 5:
: not foundacl.sh: line 8: {
: not foundacl.sh: line 9:
: not foundacl.sh: line 10: }
: not foundacl.sh: line 11:
/home/user/acl.sh: line 12: syntax error: word unexpected (expecting "in")

Second code opens up conky.

techie 2010-10-27 09:24

Re: Share your Widgets!
 
Please be more specific than "it opens conky".Does it open conky with my configuration or the default one.
The zip was recently updated,are you sure you are using the new one?

RAZOR 2010-10-27 10:02

Re: Share your Widgets!
 
Quote:

Originally Posted by techie (Post 852990)
Please be more specific than "it opens conky".Does it open conky with my configuration or the default one.
The zip was recently updated,are you sure you are using the new one?

Not the default one, it opens your version of conky. I've downloaded zip from your post on page 10. That must be the updated version? Can't see any other.

techie 2010-10-28 18:02

Re: Share your Widgets!
 
1 Attachment(s)
Ok thanks.
For those having problem with conky widget, replace the script with the attached one (remove .txt extension) in /home/user/ and report back.
Problem seems to be N900-specific

Code:

#!/bin/sh
TAB=${1}
QBW_HOTSPOT_PRESS=${2}
QBW_ID=${3}
LOC="/home/user"
remember_me()
{
    run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbw$QBW_ID oh.no.more.qbw.set_param_string string:"rememberMe" string:"$QBW_HOTSPOT_PRESS" string:"";
}

case $QBW_HOTSPOT_PRESS in
[123])

    if [ "$QBW_HOTSPOT_PRESS" -ne "$TAB" ]; then
        remember_me
    fi
    TAB=$QBW_HOTSPOT_PRESS;
    ;;
esac
echo -e "\n"
case $TAB in
1)
      echo -e "Texas Instruments OMAP 3430:\n\tARM Cortex A8 (65-nm)\n\tPowerVR SGX530 GPU"
      case $QBW_HOTSPOT_PRESS in
    [456789])
        osso-xterm -e "nohup conky -qdc $LOC/CPU_conky.conf & exit"
            ;;
      esac
    exit 0
    ;;
2)
      echo -e "<span font = \"11\"><b>BL-5J 3.7V 1320mAh Li-Ion battery\n256 MB NAND (UBIFS)\n32GB eMMC:</b></span>"
      echo -e "\t<span font = \"11\">* 768 MB swap  * 2 GB /home (ext3)\n\t* 27 GB  /home/user/MyDocs (VFAT)</span>"
    case $QBW_HOTSPOT_PRESS in
    [456789])
        osso-xterm -e "nohup conky -qdc $LOC/Resource_conky.conf & exit"
              ;;   
    esac   
    exit 1
    ;;
3)
      echo "WLAN 802.11 b/g (wl1251)"
      case $QBW_HOTSPOT_PRESS in
    [456789])
        osso-xterm -e "nohup conky -qdc $LOC/Network_conky.conf & exit"
              ;;
      esac
      exit 2
    ;;
*)
    echo "UNKNOWN TAB $TAB"
    ;;
esac


Dousan 2010-10-29 11:39

Re: Share your Widgets!
 
@techie one question to this new orientation feature in queen beecon widgets, would it be possible for you to tweak your conky cmd/script widget to rotate and bring up conky wondows to fit the orientation the phone is in, portrait/landscape?

Maybe to much work but would be nice if you could (don´t know if it´s doable at all ;)

(Was originally posted in the QBW thread, but removed and posted here instead. More relevence here).

techie 2010-10-29 16:31

Re: Share your Widgets!
 
Quote:

Originally Posted by Dousan (Post 856446)
@techie one question to this new orientation feature in queen beecon widgets, would it be possible for you to tweak your conky cmd/script widget to rotate and bring up conky wondows to fit the orientation the phone is in, portrait/landscape?

Maybe to much work but would be nice if you could (don´t know if it´s doable at all ;)

(Was originally posted in the QBW thread, but removed and posted here instead. More relevence here).

The conky windows are controlled by conky itself and AFAIK the current version of conky does not support orientation.
A newer build of conky might make this possible but even then the configuration files will need to be adjusted accordingly for portrait display.

Dousan 2010-10-29 18:34

Re: Share your Widgets!
 
Thanks for the answer techie, that makes sense, just would've been nice ;)

chargen 2010-10-31 15:23

Re: Share your Widgets!
 
I'm looking to get just the temperature displayed in a beecon widget. What do I need to edit from this widget to just get the temperature displayed? The 'Command'? Does anyone have an example command they could share?

techie 2010-11-01 08:14

Re: Share your Widgets!
 
Quote:

Originally Posted by chargen (Post 858573)
I'm looking to get just the temperature displayed in a beecon widget. What do I need to edit from this widget to just get the temperature displayed? The 'Command'? Does anyone have an example command they could share?

If you are using the stock kernel then the use this code to display temperature:
Code:

echo `cat /sys/devices/platform/omap34xx_temp/temp1_input` °C
However the values reported by above are not very accurate.I would recommend you install the enhanced power kernel from the repos (Overclocking is not enabled by default so you can use it safely) and use the code below to read temperature:
Code:

echo `cat /sys/class/power_supply/bq27200-0/temp` °C
To get the temperature working in the first place:
Code:

sudo gainroot
modprobe bq27x00_battery

The above will load the temperature module.

To get it to load on boot
Code:

echo bq27x00_battery >> /etc/modules

chargen 2010-11-03 01:22

Re: Share your Widgets!
 
Code:

echo `cat /sys/class/power_supply/bq27200-0/temp` °C
To get the temperature working in the first place:
Code:

sudo gainroot
modprobe bq27x00_battery

The above will load the temperature module.

To get it to load on boot
Code:

echo bq27x00_battery >> /etc/modules
[/QUOTE]



Wow, thanks a ton! That was easier than I expected to implement. I was a bit intimidated by Queen Beecon and still have a lot to learn, but this was pretty easy to get working!
Thanks again

stevomanu 2010-11-03 02:03

Re: Share your Widgets!
 
Quote:

Originally Posted by techie (Post 852921)
Yes the stock and ideal are supposed to perform functions.I am not aware of anyone else having problems with my widget, don't know how you concluded that:rolleyes:
To me it seems the import wasn't completely successful on your device,please try again.
Also read the first post about the widget thoroughly, it is very clear about how to set it up and configure it to your own requirements.

@moepda
Thanks for reporting, however I haven't updated to pr1.3 so can't inspect.In any case No!No!No!Yes! will need to provide a fix in his app so make sure he is aware of it;)

@RAZOR
Please report output of these commands in terminal
Code:

sh /home/user/acl.sh 2 5 id
Code:

osso-xterm -e "nohup conky -qdc /home/user/CPU_conky.conf & exit"

i have same issue here is result from first command
Code:

~ $ sh /home/user/acl.sh 2 5 id
: not foundacl.sh: line 4:
: not foundacl.sh: line 5:
: not foundacl.sh: line 8: {
: not foundacl.sh: line 9:
: not foundacl.sh: line 10: }
: not foundacl.sh: line 11:
/home/user/acl.sh: line 12: syntax error: word unexpected (expecting "in")
~ $

and second command


conky boots up your version ,have tryed your new acl.sh file

but still widget not working !

stevomanu 2010-11-05 16:17

Re: Share your Widgets!
 
techie is sorting the conky widget out , i have helped him with some stuff so hopefully he will sort problem soon !!

thanks techie your a legend ! !

NightShift79 2010-11-09 22:00

Re: Share your Widgets!
 
anything new? :) :)

techie 2010-11-12 06:45

Re: Share your Widgets!
 
1 Attachment(s)
I updated the previous post with the script.
Anyways I added the option to launch my all 3 configurations of conky from the power menu so thought I should share this as well.:)
Put the files accordingly
J_Conky.desktop in /usr/share/applications/hildon/

Conky.sh in /home/user/

ACL.xml in /etc/systemui/

You may optionally use an icon.Put it in hicolor folder

I am going away and even though I will try as much to visit these forums I probably won't be able to post anything new I'm afraid:( Will keep the index updated though, so let's see what you guys have to share:D

stevomanu 2010-11-12 09:12

Re: Share your Widgets!
 
Quote:

Originally Posted by techie (Post 871163)
I updated the previous post with the script.
Anyways I added the option to launch my all 3 configurations of conky from the power menu so thought I should share this as well.:)
Put the files accordingly
J_Conky.desktop in /usr/share/applications/hildon/

Conky.sh in /home/user/

ACL.xml in /etc/systemui/

You may optionally use an icon.Put it in hicolor folder

I am going away and even though I will try as much to visit these forums I probably won't be able to post anything new I'm afraid:( Will keep the index updated though, so let's see what you guys have to share:D

thanks so much now conky widget is working fully , many thanks for all your work dude , such a great job !!

Jayboy5 2010-11-26 05:42

Re: Share your Widgets!
 
Is there any way to run a command to just get the temperature, like if I just wanted to just make my another new queen bee-con widget?? If there is can you tell me the command?

stevomanu 2010-12-10 16:23

Re: Share your Widgets!
 
Quote:

Originally Posted by Jayboy5 (Post 883483)
Is there any way to run a command to just get the temperature, like if I just wanted to just make my another new queen bee-con widget?? If there is can you tell me the command?

here is the command your looking for

Code:

echo `cat /sys/class/power_supply/bq27200-0/temp`°C

DJRedline 2010-12-30 10:22

Re: Share your Widgets!
 
hello,

I have the overclock widget set-up but within temperature i only see 'C'
when i enter -
root
modprobe bq27x00_battery

i get -
FATAL: Module bq27x00_battery not found.

any ideas?

edit - got it working, i had kernel installed but didnt reboot :)

stevomanu 2010-12-30 11:59

Re: Share your Widgets!
 
Quote:

Originally Posted by DJRedline (Post 907389)
hello,

I have the overclock widget set-up but within temperature i only see 'C'
when i enter -
root
modprobe bq27x00_battery

i get -
FATAL: Module bq27x00_battery not found.

any ideas?

edit - got it working, i had kernel installed but didnt reboot :)

try this i think its what your after

Code:


modprobe bq27x00_battery
cat /sys/class/power_supply/bq27200-0/temp

do as root of course

augustthe 2011-01-05 16:10

Re: Share your Widgets!
 
i have a problem i keep on getting WARNING!bad cum check! i'm using the latest queen beecon

ddiscodave 2011-01-05 16:17

Re: Share your Widgets!
 
Quote:

Originally Posted by augustthe (Post 912288)
i have a problem i keep on getting WARNING!bad cum check! i'm using the latest queen beecon

hehe you said cum

augustthe 2011-01-05 16:29

Re: Share your Widgets!
 
Quote:

Originally Posted by ddiscodave (Post 912299)
hehe you said cum

hahaha :D i meant bad checksum! im try to install Overclock Control Panel widget i keep on getting WARNING!bad checksum i m using the latest queen beecon can any body help me out please:)

Xagoln 2011-04-04 06:45

Re: Share your Widgets!
 
Quote:

Originally Posted by augustthe (Post 912309)
hahaha :D i meant bad checksum! im try to install Overclock Control Panel widget i keep on getting WARNING!bad checksum i m using the latest queen beecon can any body help me out please:)

Same problem here. Presumably the export needs to be updated for a newer version of QBC and exported here.

UserM 2011-05-08 10:08

Re: Share your Widgets!
 
Is it possible to fix what I have said, or not? Leave one parameter Mem without these symbols in front http://s016.radikal.ru/i334/1105/d5/efc4d82bdcdb.png

Kabouik 2011-05-09 15:23

Re: Share your Widgets!
 
Since a restoration using Backupmenu, my widget displays temperatures between 250 and 380 °C. It's pretty hot, yes.

I used the following code but it did not solve the issue.
Code:

sudo gainroot
modprobe bq27x00_battery
echo bq27x00_battery >> /etc/modules

Does anybody have an idea of what can lead to such wrong values?

I'm using a modified version of the ideal profile (increased max limit from 850 to 900 MHz). Of course, when triggering the "Temperature" mode of the widget, the temperature is considered too high, so the max clock is set to 600 MHz. When triggering the "Ideal" button (corresponding to my modified ideal profile), it works but I can't benefit from the dynamic switch depending on temperature.

Perhaps I could delete some config files for my kernel to reset it? I don't even know where the modified profiles are stored.

Thanks in advance!

misiak 2011-05-09 15:29

Re: Share your Widgets!
 
Quote:

Originally Posted by Kabouik (Post 1002832)
Since a restoration using Backupmenu, my widget displays temperatures between 250 and 380 °C. It's pretty hot, yes.
[...]

Does anybody have an idea of what can lead to such wrong values?

Yes, the reason is: you use power kernel 47 and software you use to read temperature is not aware of it. Old kernel reported temperature in grades of Celsius, thus "30" meant 30C. The power-kernel 47 fixes this bug (as the 'old' way was improper and non-standard) and reports remperature in 0.1 grades of Celsius, thus "30" means now 3C. And "300" means 30C. And "280" means 28C. And "285" means 28.5C. So you basically need to divide the reported temperature by 10. So REAL_TEMPERATURE=TEMPERATURE/10, unless someone updates software you use to read temperature (conky?) to be compatible with power kernel 47.

Kabouik 2011-05-09 16:30

Re: Share your Widgets!
 
Oh, thanks for your answer!

So do you know how I should edit the widget to make it take into account 0.1 grades instead of grades? Currently I think the widget is still made for grades, so when it detects a temperature ranging between 200 and 300 units, it must say "Whoo hoo mate, your phone is burning; you wan't me to overclock the CPU? No way!"

I'm speaking about the "Temperature" button of the widget.

misiak 2011-05-09 16:41

Re: Share your Widgets!
 
Quote:

Originally Posted by Kabouik (Post 1002866)
Oh, thanks for your answer!

So do you know how I should edit the widget to make it take into account 0.1 grades instead of grades? Currently I think the widget is still made for grades, so when it detects a temperature ranging between 200 and 300 units, it must say "Whoo hoo mate, your phone is burning; you wan't me to overclock the CPU? No way!"

I'm speaking about the "Temperature" button of the widget.

I don't know how, because I don't know what widget you're talking about (I'm a little bit out of discussion in this thread, have read quickly all pages but still don't know). So, what's the name of widget/app you're talking about? :)

Kabouik 2011-05-09 19:50

Re: Share your Widgets!
 
Well, this one. Sorry, this is the first of the thread so I did not think about the others further in the thread. My fault! :p

I use the version with battery indicator and min freq/max freq.

misiak 2011-05-09 21:48

Re: Share your Widgets!
 
4 Attachment(s)
Quote:

Originally Posted by Kabouik (Post 1002995)
Well, this one. Sorry, this is the first of the thread so I did not think about the others further in the thread. My fault! :p

I use the version with battery indicator and min freq/max freq.

Well... I'm not sure of commands, but (install Leafpad first if you don't have it in your system or use other text editor if you're familiar with it):

STEP 1

Code:

root
leafpad /usr/local/bin/overclock

And add line which I entered below in bold:
Quote:

#!/bin/sh
TEMP=`cat /sys/class/power_supply/bq27200-0/temp`
TEMP=$((TEMP/10))
echo "Temp is :" $TEMP "C"
MAXSPEED="1150"
if [ $TEMP -gt "38" ] ; then MAXSPEED="1000" ; fi
if [ $TEMP -gt "40" ] ; then MAXSPEED="950" ; fi
if [ $TEMP -gt "43" ] ; then MAXSPEED="850" ; fi
if [ $TEMP -gt "45" ] ; then MAXSPEED="750" ; fi
if [ $TEMP -gt "47" ] ; then MAXSPEED="600" ; fi
echo "Setting max as :" $MAXSPEED "Mhz"

kernel-config limits 250 $MAXSPEED
you can also edit MAXSPEED values and temperatures if you need (you may already have different if you edited them earlier, I just posted ones from the default file from this thread).

STEP 2

Then, insted of importing that beecon_OCCP.txt or other beecon_OCCPsomethingsomething.txt file from this thread you should import one of the files I attached to this post (instruction is in http://talk.maemo.org/showpost.php?p...8&postcount=30 ). The change I made is:
Code:

echo -e "TEMPERATURE : <span font = \\"14\\"><b>`cat /sys/class/power_supply/bq27200-0/temp` C</b></span>
to
Code:

echo -e "TEMPERATURE : <span font = \\"14\\"><b>`awk '{ print $1/10}' < /sys/class/power_supply/bq27200-0/temp` C</b></span>
(If you have this widget, you just need to do step 1 and step 2, no need to repeat the whole process from first post of this thread. I also contacted OP via PM to inform him he should change contents of files for future reference ;)

Kabouik 2011-05-09 23:11

Re: Share your Widgets!
 
misiak, marry me now. Please.

It works perfectly. Many thanks for your help, I have to admit I did not expect such detailed and quick answers. I would never have found how to solve the problem myself.

Conky displays temperature in a 200-400 range, but to be honest, it does not matter because now I know that I have to put a decimal in there. For the Queen Widget, the problem was more important because of the overclock automation which was no longer possible. :)

pusak gaoq 2011-05-10 03:56

Re: Share your Widgets!
 
Quote:

Originally Posted by gft2k1 (Post 781407)
Thanks to techie, this is my last version of OCCP (with code :)) who change the color of displayed temperature, frequency, battery and rootfs in according to status..............:D

i love this widgets but would you mind sharing the default.png for this widgets???
the default.png from the first post is not compatible with these codes....
please share the default.png or do i have to make one myself...

cipper 2011-05-10 11:35

Re: Share your Widgets!
 
Quote:

Originally Posted by misiak (Post 1003075)
TEMP=$((TEMP/10))

i think that
TEMP=$(( $TEMP / 10 ))
is the right one

misiak 2011-05-10 11:50

Re: Share your Widgets!
 
Quote:

Originally Posted by cipper (Post 1003371)
i think that
TEMP=$(( $TEMP / 10 ))
is the right one

Yes, but both are correct (there is no 'right' one in the meaning that only one works). When you use $(( expression )) you don't need to add '$' in front of variables in expression. If you don't believe me, try running:
Code:

FILE_TEMP=`cat /sys/class/power_supply/bq27200-0/temp`
echo "Temp got from file: " $FILE_TEMP
MISIAK_TEMP=$((FILE_TEMP/10))
echo "Misiak way: " $MISIAK_TEMP
CIPPER_TEMP=$(($FILE_TEMP/10))
echo "Cipper way: " $CIPPER_TEMP

The result is the same ;)

EyeVisions 2011-05-10 17:08

Re: Share your Widgets!
 
Olaaa

Thx al ready i only get a bad checksum error? i follow the normal guide i know direct importing the file give those errors. what do i wrong this time :D

thx

cipper 2011-05-10 20:21

Re: Share your Widgets!
 
Quote:

Originally Posted by misiak (Post 1003378)
Yes, but both are correct (there is no 'right' one in the meaning that only one works). When you use $(( expression )) you don't need to add '$' in front of variables in expression.

uao, I wasn't aware about this exception!

Quote:

Originally Posted by misiak (Post 1003378)
If you don't believe me...

of course I trust, too easy to check

thank you for the info!!

misiak 2011-05-10 20:38

Re: Share your Widgets!
 
Quote:

Originally Posted by cipper (Post 1003666)
uao, I wasn't aware about this exception!


of course I trust, too easy to check

thank you for the info!!

No problem ;) The whole $(( )) construction is pretty naughty. If you write scripts sometimes and need it, you can read more in this bash scripting tutorial: http://www.softpanorama.org/Scriptin...ressions.shtml

niqbal 2011-05-10 20:55

Re: Share your Widgets!
 
Quote:

Originally Posted by Kabouik (Post 1002832)
Since a restoration using Backupmenu, my widget displays temperatures between 250 and 380 °C. It's pretty hot, yes.

I used the following code but it did not solve the issue.
Code:

sudo gainroot
modprobe bq27x00_battery
echo bq27x00_battery >> /etc/modules

Does anybody have an idea of what can lead to such wrong values?

I'm using a modified version of the ideal profile (increased max limit from 850 to 900 MHz). Of course, when triggering the "Temperature" mode of the widget, the temperature is considered too high, so the max clock is set to 600 MHz. When triggering the "Ideal" button (corresponding to my modified ideal profile), it works but I can't benefit from the dynamic switch depending on temperature.

Perhaps I could delete some config files for my kernel to reset it? I don't even know where the modified profiles are stored.

Thanks in advance!

with kernel v47 use this instead

Code:

awk '{ print $1/10}' </sys/class/power_supply/bq27200-0/temp

mr_pingu 2011-05-10 21:15

Re: Share your Widgets!
 
Quote:

Originally Posted by niqbal (Post 1003695)
with kernel v47 use this instead

Code:

awk '{ print $1/10}' </sys/class/power_supply/bq27200-0/temp

Just added °C to the end to make it complete

Code:

awk '{ print $1/10 " °C"}' </sys/class/power_supply/bq27200-0/temp

misiak 2011-05-10 21:32

Re: Share your Widgets!
 
Quote:

Originally Posted by mr_pingu (Post 1003711)
Just added °C to the end to make it complete

Code:

awk '{ print $1/10 " °C"}' </sys/class/power_supply/bq27200-0/temp

Stupid question: where is '°' character on N900's keyboard? I cannot find it :P

Edit: ok, I got it. In stock virtual keyboard in symbols&numbers screen after clicking "shift" it's on "0" key :D (easy ^^)


All times are GMT. The time now is 10:26.

vBulletin® Version 3.8.8