Active Topics

 



Notices


Reply
Thread Tools
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#1
Hi, Folks.
Based on an idea and widget by cpscotti ("Desktop Command Execution Widget" R E S P E C T & Kudos, Dude!) and due to personal needs, I forked developments towards:

Queen BeeCon Widget
AT FULL POWER!




Queen BeeCon Widget is a highly customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for Maemo 5 Fremantle and the N900.

The Widget is based on the execution of external Shell/OS Commands which can be either as simple as one-liner statements or as complex as articulated shell scripts, which, for example, fetch, parse and aggregate contents retreived from the system, other applications or the Internet.

There are two basic Widget types, Beecons and Snippets:

Beecons are small hexagonal cells whose background color or associated image/icon changes according to the executed Command Exit Status.

Beecons can handle virtually unlimited Command Exit Status:
  • <0 Normally notifying system errors in esecuting the script/command
  • 0 Returned when script/command successfully completes
  • 1 Used to report a warning condition
  • 2 If script/command needs to notify some application error conditions
  • <=126 Other exit status which can be handled for displaying user defined icons/images

Snippets are normal text/graphic boxes with fixed background color and images which is not influenced by the executed Command Exit Status.

See WIKI

Enjoy, No!No!No!Yes!
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras

Last edited by No!No!No!Yes!; 2010-09-24 at 06:35.
 

The Following 124 Users Say Thank You to No!No!No!Yes! For This Useful Post:
9000, acvetkov, ade, AnasSyria, archl, arnoldux, arvind, ashwin, asys3, Baaart, backstabber8, Bahador, bbns, bigears5000, Blaizzen, blipnl, BluesLee, BruceL, bunanson, Bundyo, cheve, chill, corduroysack, cube48, Cue, CutterSlade, D4rKlar, dadoabdallah, Dancairo, Dany-69, DARKFiB3R, DarkShadowSwE, dee, Dousan, eefo, elie-7, Estel, etuoyo, famdango, fatcobrah, ffha, fgs, fnordianslip, Fumanchu, g-man, goetz, gttnnn, Gusse, G_Gus, hardy_magnus, Haus3r, inuyasha0209, jakiman, janne.palo, jchammons, John McClane, Joseph9560, jpala16, jurop88, K.Singh, kik, krk969, kulas, Lake, LippiVan, lolloo, lorul2, low, magic_doc, Maj3stic, malfunctioning, mamad CJ, mannakiosk, mece, melisa queen, Mentalist Traceur, mikec, MINKIN2, MohammadAG, mosiomm, Mr.bot, mrsellout, Natan_xy, nikigo, NvyUs, oliforum, OVK, palmmanpalm, pantera1989, pfontana77, praveenchand, qole, qwerty12, ramshidjafar, SallyJane, Schturman, sethkha, SHARP66, sifo, skalogre, snap, Sourav.dubey, stayloa, stevomanu, talou, techno2001, Tinnet, Tiran, torpedo48, Tovalisa, tuxsavvy, udaychaitanya16, uros, vdx29, vkv.raju, Wanker, woody14619, XiliX, xperto, Zentenario, zimon
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#2
Moved to WIKI
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras

Last edited by No!No!No!Yes!; 2010-04-20 at 08:18.
 

The Following 4 Users Say Thank You to No!No!No!Yes! For This Useful Post:
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#3
Moved to WIKI
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras

Last edited by No!No!No!Yes!; 2010-04-20 at 08:19.
 
Posts: 2,014 | Thanked: 1,581 times | Joined on Sep 2009
#4
I find this app to be both cool and a little confusing, but I suspect thats because Its so comprehensive. Purely as a way of monitoring items at a glance however its great, though perhaps a little space consuming on the desktop.
__________________
Class .. : Power Poster, Potential Coder
Humor .. : [*********] Alignment: Chaotic Evil
Patience : [***-------] Weapon(s): +2 Logic Mace
Agro ... : |*****-----] Relic(s) : G1, N900

 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#5
Here is the Normal version of the "Rootfs(%):" command:
Code:
df | awk '$1 == "rootfs" {print $5}'
Here is the equivalent Beeconified version of the "Rootfs(%):" command which you can replace:
Code:
df | awk 'BEGIN { FS="[ %]+" } $1 == "rootfs" { print $5 "%"; if ($5 < 90) exit 0; else if ($5 < 95) exit 1; else exit 2 }'
With the beeconified version of the command, the awk statement will return:
Exit Status 0 (Green Beecon) for less the 90% rootfs file system full
Exit Status 1 (Yellow Beecon) for less the 95% rootfs file system full
Exit Status 2 (Red Beecon) for 95% or more rootfs file system full

Last edited by No!No!No!Yes!; 2010-02-22 at 16:48.
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 2,014 | Thanked: 1,581 times | Joined on Sep 2009
#6
Originally Posted by No!No!No!Yes! View Post
Here is the Normal version of the "Rootfs(%):" command:
Code:
df | awk '$1 == "rootfs" {print $5}'
Here is the equivalent Beeconified version of the "Rootfs(%):" command which you can replace:
Code:
df | awk 'BEGIN { FS="[ %]+" } $1 == "rootfs" { print $5 "%"; if ($5 < 90) exit 0; else if ($5 < 95) exit 1; else exit 2 }'
With the beeconified version of the command, the awk statement will return:

Exit Status 0 (Green Beecon) for less the 90% rootfs file system full
Exit Status 1 (Yellow Beecon) for less the 95% rootfs file system full
Exit Status 2 (Red Beecon) for 95% or more rootfs file system full
Very cool - One imagines this can be applied to pretty much any % based command.
__________________
Class .. : Power Poster, Potential Coder
Humor .. : [*********] Alignment: Chaotic Evil
Patience : [***-------] Weapon(s): +2 Logic Mace
Agro ... : |*****-----] Relic(s) : G1, N900

 
late666's Avatar
Posts: 144 | Thanked: 75 times | Joined on Dec 2009 @ Israel
#7
It's a cool idea, but I think a more elegant way to do this is to stick to the half transparent black rectangle like the one in the original desktop command execution widget..
It would also save up on space.
 

The Following User Says Thank You to late666 For This Useful Post:
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#8
Originally Posted by Bratag View Post
Very cool - One imagines this can be applied to pretty much any % based command.
Sure... see also following Beeconified version of a "ping -q -c 3 server1" command to test server1 responsiveness:
Code:
ping -q -c 3 server1 | awk 'BEGIN { FS="[ \/]+"; rt=0 } $1 == "round-trip" { rt=1; print $6 "\n" $7 "\n" $8 "\n(ms)"; if ($8 < 100) exit 0; else if ($8 < 200) exit 1; else exit 2 } END { if ( rt == 0 ) exit -1 }'
The awk statement will return:
Exit Status 0 (Green Beecon) for round-trip max below 100ms
Exit Status 1 (Yellow Beecon) for round-trip max between 100 and 200 ms
Exit Status 2 (Red Beecon) for round-trip max above 200ms
Exit Status -1 (Grey Beecon) for server1 unresponsiveness
 

The Following 2 Users Say Thank You to No!No!No!Yes! For This Useful Post:
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#9
Originally Posted by late666 View Post
It's a cool idea, but I think a more elegant way to do this is to stick to the half transparent black rectangle like the one in the original desktop command execution widget..
It would also save up on space.
Ciao,
I discussed about this matter with cpscotti, the current maintainer of DCEW, before I went public. We both agreed with the fact that both tools can have supporters and admirers especially if we move the topic into the "elegance" vs. "versatility" vs. "simplicity" vs. "practicality" vs. "completeness" vs. "complexity" vs. "beautifulness" vs. "coolness" vs. "hackishness" debate.
Due to my personal needs, for home and for work, I dedicated two, out of the four desktops, to monitoring widgets and I rely more on a visual/chromatic experience than on a plain textual feedback.
Furthermore, on the todo list there is also an open mind in developing a graphic architecture with far more freedom for the end-users to design and plug in their favourite visual "geometry", being that basic shapes or multi-area/clickable icons with alpha channel.
Thank you for your feedback. Bye.
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#10


And now... let's get ready for the 2010 MLB season...

Before using this Beecon make sure you have "wget" package installed:

Start X-Terminal and type:
Code:
Nokia-N900-51-1:/home/user/MyDocs# wget
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
Nokia-N900-51-1:/home/user/MyDocs#
If you don't receive the above output you need to install the package:
Code:
apt-get install wget
Beecon provides periodic updates for matches of your favourite MLB team:
Code:
wget -q -O - http://m.mlb.com/scores/`date +%Y%m%d`/ | awk 'BEGIN{t="NYY";m=0}/<td>.+<\/td>/{split(gensub(/<[^>]*>/,"","g"),a);if(a[1]!=t && a[3]!=t && a[4]!=t)next;m=1;if(a[2]=="vs."){print a[1] "\n" a[3] "\n" a[4],a[5];exit 1}print a[1],a[2] "\n" a[4],a[5] "\n" a[6];if((a[4]==t&&a[5]>a[2])||(a[1]==t&&a[2]>a[5]))exit 0;if(a[5]==a[2])exit 1;else exit 2}END{if(m==0){print "No\nMatch!\n";exit 1}}'
Just replace the:
Code:
t="NYY"
with one of the predefined abbreviations:
ATL, LAD, NYY, TOR, FLA, NYM, BOS, BAL, CIN, WSH, SD, PHI, SF, PIT, CHC, HOU, CLE, CWS, DET, KC, MIL, STL TB, TEX, MIN, OAK, LAA, SEA, COL, ARI.

Set update interval as you like and enjoy...

Beecon will return:
Exit Status 0 (Green Beecon) if team is winning
Exit Status 1 (Yellow Beecon) if match is tied up or no match for the day or match starting later on
Exit Status 2 (Red Beecon) if team is losing the match



Last edited by No!No!No!Yes!; 2010-02-24 at 17:35.
 

The Following 2 Users Say Thank You to No!No!No!Yes! For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 05:28.