maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

No!No!No!Yes! 2011-01-13 09:11

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by dr_frost_dk (Post 919081)
That works if i use exit code.....But im having a hard time to get it to work since im using AWK, heres a line from the script, where would i put the 'exit 1' code?

echo $x | awk '{if ($1 > 3900 && $1 <= 4050) printf "%1.3fV - %3.1f", $1 / 1000, 70 + ($1 - 3900) / 10}'

i have tried many different ways but cant seem to get it to use exit code......

You have solved ... I guess?!

dr_frost_dk 2011-01-13 10:38

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
kind off, used a more basic code "sh", not so elegant but it gets the job done.

Side Question:
why is the sh in the N900 terminal not "advanced" enough to use
Code:

if [[ $x -ge 3660 && $x -lt 3800 ]];then
as in my new beecon V1.2 i had to use
Code:

if [ $x -ge 3660 ];then if [ $x -lt 3800 ];then
which is kinda stupid double work.... and that's why i used AWK instead, and of course i still use AWK because it is easier to calculate in and can make it look "pretty" with #.### and ###.# like the old qbasic way (print using), sadly that's my only programming language i am a custom to since i started in about 1994, before that C64 :D
Code:

if [ $x -ge 3660 ];then if [ $x -lt 3800 ];then
echo $x | awk '{printf "%1.3fV - %3.1f", $1 / 1000, 15 + ($1 - 3660) / 4}{print "%"}'
exit 1
fi;fi

But the new V1.2 really helps to get a quick overview of the battery level, with the colors
BLUE - (85% - 100%) - Full charge
GREEN - (50% - 85%) - Still good
YELLOW - (15% - 50%) - Getting Low
ORANGE - (5% - 15%) - Start thinking about finding your charger
RED - (0% - 5%) - I told you to find that charger!!!

Next Version maybe with voice control so that it screams at you when it is low :D

No!No!No!Yes! 2011-01-13 10:53

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by dr_frost_dk (Post 919392)
kind off, used a more basic code "sh", not so elegant but it gets the job done.

Side Question:
why is the sh in the N900 terminal not "advanced" enough to use
Code:

if [[ $x -ge 3660 && $x -lt 3800 ]];then
as in my new beecon V1.2 i had to use
Code:

if [ $x -ge 3660 ];then if [ $x -lt 3800 ];then
:D

cond1 -a cond2 True if both cond1 and cond2 are true.
cond1 -o cond2 True if either cond1 or cond2 is true.

Have a look at this for further references

dr_frost_dk 2011-01-13 11:05

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Nice :), V1.2 will be soon replaced with V1.3

Thank you so much.
The code would not work, the one with && worked in ubuntu terminal so i thought i would be the same in maemo terminal.
But i just have to use -a instead of &&

Battery thread updated

dr_frost_dk 2011-01-13 23:23

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
a little problem have arrived.....

i cannot get the blue color on since i can't figure out how to get "exit code -1", if i use
Code:

exit -1
it gives exit code 2???

how do i use exit code -1?

the color now gets orange when charge is over 85%......

dr_frost_dk 2011-01-14 08:58

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
BUMP.

Anybody knows the exact command to get exit code -1

No!No!No!Yes! 2011-01-14 09:28

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by dr_frost_dk (Post 920069)
BUMP.

Anybody knows the exact command to get exit code -1

awk '{exit -1}'

however -1 is used to return some system error condition, so expect some extra output to be displayed

dr_frost_dk 2011-01-14 09:52

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
awk didn't work, it just crashed my hildon-desktop and now i have to add ALL my widgets again, it's good that they know their position

well im just going to use 4 colors, but thats ok
so now it's:
GREEN
YELLOW
ORANGE
RED

James_Littler 2011-01-15 10:39

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Sorry for jumping in guys but I need a bit of help.

How do I start a terminal session with a command and leave it running?
e.g. how would I create a widget to open xterminal then run 'sudo kernel-config show' and leave the window open?

Thanks

seasharkvvv 2011-01-16 22:00

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
hi im having trouble getting day and night beecon working. it looks great and i would really like it working. i didnt understand step 2. ccredit to the devlopers.

cheers, 1st post,,day 1 of getting new n900,,wanted to get the best widget :P after getting an amzing loopable wallpaper :( :P

i will no longer be a noob soon :cool:


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

vBulletin® Version 3.8.8