maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [SOLVED][QUESTION] to all programmers and database specialists... (https://talk.maemo.org/showthread.php?t=75161)

geekgirl74 2011-07-22 19:29

[SOLVED][QUESTION] to all programmers and database specialists...
 
Hi,

I wonder if it is possible to show the number of unread messages and calls via a certain command in desktop command execution widget? All I've managed to find out is that the information seems to be stored in /home/user/.config/hildon-desktop/notifications.db. How could I query it via commandline? I'm dreaming of placing tiny widgets besides my application icons, for example the number of unread emails close to the icon for modest.

Thanks in advance and sorry if I've overlooked an existing thread.
Cheers.

ammyt 2011-07-22 19:38

Re: [QUESTION] to all programmers and database specialists...
 
Quote:

Originally Posted by geekgirl74 (Post 1056378)
Hi,

I wonder if it is possible to show the number of unread messages and calls via a certain command in desktop command execution widget? All I've managed to find out is that the information seems to be stored in /home/user/.config/hildon-desktop/notifications.db. How could I query it via commandline? I'm dreaming of placing tiny widgets besides my application icons, for example the number of unread emails close to the icon for modest.

Thanks in advance and sorry if I've overlooked an existing thread.
Cheers.

What if I'm not a specialist database programmer? Can I help :p?
Code:

sqlite3 /home/user/.rtcom-eventlogger/el.db "select count(id) from events where event_type_id = 7 and is_read=0"
Shows the number of unread SMSes

Code:

sqlite3 /home/user/.rtcom-eventlogger/el.db "select count(id) from events where event_type_id = 3"
Shows the number of missed calls

geekgirl74 2011-07-22 19:43

Re: [QUESTION] to all programmers and database specialists...
 
That's great, thank you :)
But it shows this message:

Nokia-N900:/home/user# sqlite3 /home/user/.rtcom-eventlogger/el.db "select count(id) from events where event_type_id = 7 and is_read=0"
SQL error: no such table: events

Am I missing something?

EDIT: this seems to work, when I use el-v1.db instead, but that file is 2 days old on my system and doesn't contain my test mail... el.db is a 0-sized file :(

geekgirl74 2011-07-22 23:59

Re: [QUESTION] to all programmers and database specialists...
 
well, I found it... it's a little different from what you directed me :D

For SMS:
Nokia-N900:~$ sqlite3 /home/user/.config/hildon-desktop/notifications.db "select count(id) from notifications where icon_name='general_sms'"
1

For Mails:
Nokia-N900:~$ sqlite3 /home/user/.config/hildon-desktop/notifications.db "select count(id) from notifications where icon_name='qgn_list_messagin'"
1

1 was the result, I had one mail and one sms, both unread :)

eefo 2011-07-23 06:14

Re: [SOLVED][QUESTION] to all programmers and database specialists...
 
so is it a widget yet or you are still using the command to run it ?

geekgirl74 2011-07-23 10:58

Re: [SOLVED][QUESTION] to all programmers and database specialists...
 
I'm actually using the "Desktop Command Execution Widget".
This is the result (just look at the top left and top right application icon):
http://img837.imageshack.us/img837/5/screenshot28da.png
The number is updated whenever I receive new mail or message...

eefo 2011-07-23 11:54

Re: [SOLVED][QUESTION] to all programmers and database specialists...
 
Quote:

Originally Posted by geekgirl74 (Post 1056747)
I'm actually using the "Desktop Command Execution Widget".
This is the result (just look at the top left and top right application icon):
http://img837.imageshack.us/img837/5/screenshot28da.png
The number is updated whenever I receive new mail or message...

nice one .
and what about for the missed calls ?

geekgirl74 2011-07-23 11:59

Re: [SOLVED][QUESTION] to all programmers and database specialists...
 
thx :)
the missed calls number is not yet realized, cause I'm not sure about how I want the info to be displayed (note: there's still the "Phone" button on the dock...)

eefo 2011-07-23 12:03

Re: [SOLVED][QUESTION] to all programmers and database specialists...
 
Quote:

Originally Posted by geekgirl74 (Post 1056791)
thx :)
the missed calls number is not yet realized, cause I'm not sure about how I want the info to be displayed (note: there's still the "Phone" button on the dock...)

lol yes .
but does that command which ammyt shared for the missed calls work ?

and yeah little thing :$
what are the update setting of your sms widget ?

geekgirl74 2011-07-23 12:16

Re: [SOLVED][QUESTION] to all programmers and database specialists...
 
Quote:

Originally Posted by eefo (Post 1056797)
lol yes .
but does that command which ammyt shared for the missed calls work ?

and yeah little thing :$
what are the update setting of your sms widget ?

yes, the missed calls command works great :) have to admit that I wasn't interested that much in the number of missed calls but in the number of received mails/messages... thanks to ammyt and after some further research I found out how to query at least these basic things ;)
right now the update interval for the sms/im widget is 1 min.


All times are GMT. The time now is 16:22.

vBulletin® Version 3.8.8