|
2011-05-16
, 19:39
|
|
Posts: 623 |
Thanked: 289 times |
Joined on Jan 2010
@ UK
|
#1232
|
Can somebody confirm that the beecon attached in file (or in previous post) shows strange text during charging?
Maybe someone knows why? Cause in test window this text is not there? where is it from?
hal-device bme | awk -F"[. ]" '$5 == "is_charging" {chrg = $7}; $5 == "percentage" {perc = $7} END if (chrg == "false") {print perc "%"; exit (perc>10 ? 0 : perc>3 ? 1 : 2)} else {print "Chrg"; exit 3}'
exit 255
The Following User Says Thank You to JonWW For This Useful Post: | ||
|
2011-05-16
, 21:19
|
Posts: 146 |
Thanked: 76 times |
Joined on Feb 2010
@ Poland
|
#1233
|
I've been meaning to get back to you on this one;
snip...
The problem is that when on charge awk exits with 255 not -1 as you would expect, even so junk text should not be displayed even if it exits with 255.
This is a bug in QBW I would say. Create a QBW with the only command as:and you get the same error.Code:exit 255
The Following User Says Thank You to Robb For This Useful Post: | ||
|
2011-05-19
, 06:35
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1234
|
|
2011-05-24
, 18:20
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1235
|
With the existing calendar widgets there is always the drawback that tasks are not shown, or only one of them/the number of tasks. As the tasks are stored in a sqlite database and can be easily drawn from this database, I decided to create myself a simple widget showing the next tasks: the widget in the red box in the screenshot attached.
It's simple and displays the next 5 tasks with the following command, each task in a separate line:
If you would like to import this widget into QBW, please use the exported file calendar_tasks.txt attached to this post.Code:sqlite3 /home/user/.calendar/calendardb 'select substr(Summary,0,30) from Components where ComponentType="2" order by DateStart limit 5;
You can modify the number of tasks shown by changing the number after "limit", and you can change the line length of the ouput lines by modifying the "30" in the substr(....,30) call in the code snippet.
Disclaimer: Please be aware that this code snippet/widget accesses your calendar database. If you don't change the command, it shoud be a harmless read-only access, but there may be some issues when this command and the calendar app access the database at the same time. I will take no responsibility for your calendar databases if you use this command/widget!
Have fun!
Goetz
|
2011-05-24
, 19:01
|
Posts: 41 |
Thanked: 13 times |
Joined on Mar 2010
@ Mainz, Germany
|
#1236
|
hi.
am very interested to put MY TASKS on my n900 desktop, i try your way but nothing happens, am wondering if i can create a qbw command so it will show me my calendar TASK
|
2011-05-24
, 19:19
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#1237
|
As the tasks don't change very often, I have set the update strategy to only on clicking. Have you tried clicking the beecon after importing it and putting it to the desktop? Then it should show 5 tasks (if there are any).
But now there is a much better way: Calendar Home Widget can be set to display next calendar events, or calendar events and tasks, or only tasks. So you could use this widget to display your tasks on the desktop.
|
2011-05-25
, 19:02
|
Posts: 41 |
Thanked: 13 times |
Joined on Mar 2010
@ Mainz, Germany
|
#1238
|
yes i did install the calendar Home Widget its like the n900 original calendar and nothing happens, maybe i did something wrong , please can you explain to me step by step how to create this qbw command so i will display the task
thank you .
|
2011-05-26
, 03:33
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#1239
|
So far iv done a date widget and a memory widget..
Attachment 10934
The mem widget shows (left > right) RootFS, Mass Mem, Mem Card.
|
2011-05-27
, 21:43
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#1240
|
Why not:
PHP Code:
if [ "$QBW_EXEC_REASON" == "QBW_STARTUP_UPDATE" ]; then
/usr/bin/fmtx_client -p$(if [ $(cut -d. -f1 /proc/uptime ) -lt 100 ]; then echo 0; else /usr/bin/fmtx_client | /bin/grep -q '^state=enabled' ; echo $? ; fi) | /usr/bin/awk -F "=" '($1=="state") {print $2}' && echo "echo 118 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level" | sudo gainroot | echo ""
echo "OFF";
exit 0;
fi;
if [ "$QBW_CURRENT_RESULTS_TEXT" == "ON" ]; then
/usr/bin/fmtx_client -p$(if [ $(cut -d. -f1 /proc/uptime ) -lt 100 ]; then echo 0; else /usr/bin/fmtx_client | /bin/grep -q '^state=enabled' ; echo $? ; fi) | /usr/bin/awk -F "=" '($1=="state") {print $2}'
echo "OFF";
exit 0;
else
/usr/bin/fmtx_client -p$(if [ $(cut -d. -f1 /proc/uptime ) -lt 100 ]; then echo 0; else /usr/bin/fmtx_client | /bin/grep -q '^state=enabled' ; echo $? ; fi) | /usr/bin/awk -F "=" '($1=="state") {print $2}'
echo "ON";
exit 1;
fi;
Maybe someone knows why? Cause in test window this text is not there? where is it from?
Remember to click Thanks! if this post is of any help