Notices


Reply
Thread Tools
Posts: 67 | Thanked: 36 times | Joined on May 2010 @ Claremont (LA), California
#291
Originally Posted by petrelli View Post
My question, how could I hide the output text? I am only interested in the exit code, not in the text.

I imagine I can use awk, but I think it is not too elegant. Is there something I am missing here??

Thx
There are a couple of approaches. You can dump any output by redirecting it to /dev/null:

Code:
mycommand > /dev/null
(if "mycommand" is sufficiently complex, parenthesize it). But I think that if your script produces no output whatsoever, QBW replaces its results with "No Output". So what you really want to do is to do the echo, but not affect the status. That takes a slight bit of shell magic:

Code:
mycommand > /dev/null; s=$?; echo " "; exit $s
Here, $? is the exit status of the previous command (mycommand). You save it in the variable s, do the echo, and then explicitly make s be the exit status.

Warning: don't put blanks around the equals sign. The shell doesn't like that.
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#292
Originally Posted by petrelli View Post
A question:

Working with the "Enable/disable Wi-Fi script" with a beacon, I can see that:
- with the echo "" at the end, there is no exit status passed to the QBW, so the image is always the same (exit 0).
- without the echo "", there is the proper exist status (0 or 2), with the background color of the icon correctly shown. However, I also see all the text output in the screen.

My question, how could I hide the output text? I am only interested in the exit code, not in the text.

I imagine I can use awk, but I think it is not too elegant. Is there something I am missing here??

Thx
Or just hide the results output like this:



__________________
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
 
Posts: 82 | Thanked: 10 times | Joined on Feb 2010
#293
Thanks! I was really thinking in the first option, but about filtering the output to print ... well, to print nothing (but the exit was kept then). But this didn't convince me, so indeed this is what I was searching, how to pass variables between the pipeline.

But, when the kind program has already an easy solution for it, then life is ... well, easier

Thanks for the fast answer =)
 
Posts: 76 | Thanked: 4 times | Joined on Apr 2010
#294
Originally Posted by Lake View Post
Hello,

Is it possible to create a beecon to see the online status of the contacts in my contact book?

Thanks
Hi - just wondering if this is a possibility? To me it would have a distinct advantage over other apps you have to physically access to see online status as you could just see it at a glance with a beecon.

Thanks in advance

Tom
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#295
Originally Posted by Lake View Post
Hello,

Is it possible to create a beecon to see the online status of the contacts in my contact book?

Thanks
Hi and sorry for late response ... technically I don't believe it's a big problem to create a beecon for this.
Only problem is to find the relevant scripts, dbus commands for looping through contact list (or a shorter subset which can be specified in the beecon itself) and fetching the online status.

I suggest you reformulate your question and post it into Fremantle or N900 forum groups and hope someone with sufficient knowledge will be able to answer.

If you find the scripts/command I'll be happy to help in manufacturing the beecon.

I already searched a bit for such scripts but with no success so far.

Ciao.
__________________
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-06-29 at 06:01.
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#296
http://telepathy.freedesktop.org/spe..._Presence.html

This can be a start but I still haven't found how to translate a nickname/contact into the integer that the GetPresences method is looking for as a paramater
__________________
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
 
jehan's Avatar
Posts: 55 | Thanked: 14 times | Joined on Mar 2010
#297
Hi! I'm looking for a method to control the wi-fi power saving level for a defined internet connection with Qeen BeeCon Widget.
Can this be done with dbus calls?

I read the wiki but found no hint - so please can someone here point me to the right direction?
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#298
Still in the brewery and internal testing ... in extras-devel within few days

queen-beecon (0.1.9.6)
  • New: REVOLUTION!!! Implementation of multiple (9 = grid 3x3) Hot Spots to click on the widget. Clicked Hot Spot Index Position can then be passed to the executed script via Parameter Variables Substitution $QBW_HOTSPOT_PRESS (0=Not Pressed or other update policy,1=Top Left,2=Top Center,3=Top Right,4=Center Left,5=Center,6=Center Right,7=Bottom Left,8=Bottom Center,9=Bottom Right)


    Code:
    [queen-beecon-header]
    version=1.000000
    checksum=2131154
    [queen-beecon-exported-instance]
    widgetType=0
    widgetVisible=1
    operationalStatus=0
    hideCanvas=false
    snippetBgRGB=0
    snippetExtBgRGB=#000000000000
    beecon_lt0_ImgZoom=0
    beecon_lt0_BgRGB=2
    beecon_lt0_ExtBgRGB=#808080808080
    beecon_lt0_ImgFilename=queen-beecon-syserr.png
    beecon_eq0_ImgZoom=0
    beecon_eq0_BgRGB=3
    beecon_eq0_ExtBgRGB=#0000ffff0000
    beecon_eq0_ImgFilename=queen-beecon-appok.png
    beecon_eq1_ImgZoom=0
    beecon_eq1_BgRGB=4
    beecon_eq1_ExtBgRGB=#ffffffff0000
    beecon_eq1_ImgFilename=queen-beecon-appwrn.png
    beecon_ge2_ImgZoom=0
    beecon_ge2_BgRGB=5
    beecon_ge2_ExtBgRGB=#ffff00000000
    beecon_ge2_ImgFilename=queen-beecon-apperr.png
    beecon_idxge2_ImgZoom=0
    beecon_idxge2_BgRGB=11
    beecon_idxge2_ExtBgRGB=#0000ffffffff
    beecon_idxge2_ImgFilename=queen-beecon-index.png
    widWidth=130
    widHeight=130
    instanceTitle=Test HotSpot
    instanceCmd=echo -e "Hot Spot\\nPressed!\\nIndex:\\n<span size='x-large' color='red'>$QBW_HOTSPOT_PRESS</span>"; exit 0
    cmdImgFilename=queen-beecon.png
    cmdImgZoom=0
    cmdFgRGB=1
    cmdExtFgRGB=#000000000000
    cmdTextAngle=0
    cmdVisibilityPosition=2
    cmdImgVisibilityPosition=9
    cmdJustify=0
    cmdExtFont=Tahoma bold italic 13
    cmdFontName=3
    cmdFontSize=12
    resImgFilename=queen-beecon-resimg.png
    resImgZoom=0
    resFgRGB=1
    resExtFgRGB=#ffffffffffff
    resTextAngle=0
    resVisibilityPosition=8
    resImgVisibilityPosition=0
    resJustify=2
    resExtFont=Tahoma bold 11
    resFontName=2
    resFontSize=12
    updOnStartup=false
    updOnClick=true
    updOnDesktop=false
    delayIndex=0
    updNeworkPolicy=0
    customIntervalSecs=0
    updOnDBUS=0
    updOnDBUSBus=0
    updOnDBUSMatchRule=
  • Changed: Logic to purge configuration settings of non-existent QBW instances from configuration file. (Check/Purge performed at every entrance in Settings dialog)
  • Bugfixing: Incomplete unreferentiation of DBUS resources. Fixed.
  • Bugfixing: Incorrect logic for updating when widget desktop was active/on. It was updating also when active widget's desktop was swept off. Now updates content only if "Update on Desktop" is TRUE and Widget's Desktop is being swept on. Fixed.
The implementation of QBW click hot spots opens up a new world ...
Like, for example, something like this...
__________________
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-06-30 at 17:22.
 

The Following 5 Users Say Thank You to No!No!No!Yes! For This Useful Post:
Posts: 76 | Thanked: 4 times | Joined on Apr 2010
#299
Originally Posted by No!No!No!Yes! View Post
http://telepathy.freedesktop.org/spe..._Presence.html

This can be a start but I still haven't found how to translate a nickname/contact into the integer that the GetPresences method is looking for as a paramater
Many thanks for your time spent looking - you do have my real gratitude for pursuing this.
 
Posts: 5 | Thanked: 7 times | Joined on Jul 2010
#300
Hello ,

can me some one pls give me the command for "Battery(%):"
i have deleted the command =(

thanks
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:43.