Notices


Reply
Thread Tools
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#361
Originally Posted by techie View Post
So is the dbus still monitored or not when this option is enabled? What I am trying to do is set @sight to false during dbus action using parameter substitution like you showed, but what is happening is if @sight is checked the command to disable @sight never gets run presumably because the widget is not active maybe.Any workaround to get this done please.
Thanks
DBUS is monitored but @sight is a blocker so if the widget is not @sight, command will not be executed

As I told you, with 1 line of shell script and use of Param Subst you can just handle your scenario.

Something like this... (but by heart, not tested on phone shell)

Code:
xxx=`echo '$QBW_DBUS_VERBOSE_OUTPUT' |  tail -1 | cut -d \" -f 2`;if [ "$xxx" == "locked" ] ; then <action_if_locked>; else <action_if_unlocked>; fi
No need to cry @wolf in vain
__________________
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: 208 | Thanked: 220 times | Joined on Apr 2010
#362
Code:
xxx=`echo '$QBW_DBUS_VERBOSE_OUTPUT' |  tail -1 | cut -d \" -f 2`;if [ "$xxx" == "locked" ] ; then <action_if_locked>; else <action_if_unlocked>; fi
Yup did that, but "locked" executed a command that activated on_sight, so now its counter command tucked
inside "unlocked" never gets executed
I'll get back to you with code
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#363
Originally Posted by techie View Post
Code:
xxx=`echo '$QBW_DBUS_VERBOSE_OUTPUT' |  tail -1 | cut -d \" -f 2`;if [ "$xxx" == "locked" ] ; then <action_if_locked>; else <action_if_unlocked>; fi
Yup did that, but "locked" executed a command that activated on_sight, so now its counter command tucked
inside "unlocked" never gets executed
I'll get back to you with code
Use also $QBW_ON_SIGHT in your script to test your specific condition and forget @Sight update policy
__________________
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: 208 | Thanked: 220 times | Joined on Apr 2010
#364
Originally Posted by No!No!No!Yes! View Post
Use also $QBW_ON_SIGHT in your script to test your specific condition and forget @Sight update policy
Umm..that would mean
1. not setting @sight on at all resulting in execution of commands not intended to run when locked.
2. if @sight is set then all I can do is use $QBW_ON_SIGHTto check its status but that won't help me get it to run at regular intervals.
Look at my code and intended outcome, you will get my point
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#365
Originally Posted by techie View Post
Umm..that would mean
1. not setting @sight on at all resulting in execution of commands not intended to run when locked.
2. if @sight is set then all I can do is use $QBW_ON_SIGHTto check its status but that won't help me get it to run at regular intervals.
Look at my code and intended outcome, you will get my point
Meta code here:

Commands gets executed @timer and @DBUS lock/unlock event

Code:
$QBW_EXEC_REASON == QBW_TIMER_UPDATE?
   Yes:
      CheckTemp
      Underclock(Temp)
      exit
$QBW_EXEC_REASON == QBW_DBUS_MONITOR?
   Yes:
      Event == locked?
         Yes: Underclock()
         No: NormalClock()
      exit
Same widget makes it all!!!
__________________
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
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 208 | Thanked: 220 times | Joined on Apr 2010
#366
Perfect ! will get on to implementing this idea asap.
THANKS!! you have been verrry helpful and patient!

EDIT : One question though during locked phase there still would be update_interval execution right? possibly causing override. Let me put your idea in action first I think there maybe a way out

EDIT 2 : Got it! If i write the dbus status to a file then check it under timer_update, appropriate exit can be planned without any need for @sight here.Thanks

Last edited by techie; 2010-07-13 at 21:57.
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#367
Originally Posted by techie View Post
Perfect ! will get on to implementing this idea asap.
THANKS!! you have been verrry helpful and patient!

EDIT : One question though during locked phase there still would be update_interval execution right? possibly causing override. Let me put your idea in action first I think there maybe a way out

EDIT 2 : Got it! If i write the dbus status to a file then check it under timer_update, appropriate exit can be planned without any need for @sight here.Thanks
or use either:
$QBW_REMEMBER_ME
or
$QBW_CURRENT_RESULTS_TEXT (echo locked/unlocked to your widget, if you don't need any output to your widget)

__________________
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
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post:
Posts: 489 | Thanked: 404 times | Joined on Dec 2009
#368
This tool is one of the most powerful things I've ever seen on my N900...

Creating new widgets using Queen BeeCon Widget is my new hobby!

This are my first creations:



The clocks buttons let me choose the CPU frequency on-the-go, the two snippets under them monitor the actual frequency and the biggest beecon on the left changes its color in order to alert me when the CPU is overclocked:



The monitoring widgets are all updated by the clocks buttons.

They're all very simple, but they looks great on the N900's desktop!

I just want to say thank you to No!No!No!Yes! for this amazing app, it's as entertaining as a game and as powerful as the Terminal itself, never seen anything like that.

Thank you.
 

The Following User Says Thank You to torpedo48 For This Useful Post:
Posts: 165 | Thanked: 78 times | Joined on Jun 2010
#369
No!No!No!Yes! - Thanks for you great work.

I have used Hide User Agent for some time (my thanks to the author) but i needed to switch between 3 or 4 microb user agent strings. Then i saw your post #342 - Poker Dice Here!!! - and thought that using dbus commands i could do some kind of user agent swither for microb.

This was the result:



There are 4 snippets named Ua-N900, UA-Iphone, UA-Null and UA-Droid. To change the active microb user agent just touch the respective snippet. The current user agent is shown by the red color of the snippet.

The user agent can be switched either with microb running or not running.

The current user agent strings are:

UA-N900 - "Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2b6pre) Gecko/20100318 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900"

UA-Iphone - "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7C97d Safari/528.16"

UA-Null - ""

UA.Droid - "Mozilla/5.0 (Linux; U; Android 2.1; en-us; dream) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2"

To create the widgets:
1 - Copy the 4 user.xxx files in useragents.zip to:
/home/user/MyDocs/.images/queen_beecon_dir/
2 - Create 4 QBW instances
3 - For each QBW instance import the UA-xxx.txt file in qwbUA.zip and take note of the respective Instance ID
4 - "Edit Cmd" for each QBW instance and replace the IDs taking in consideration that in my case:
id2 is UA-N900
id3 is UA-Iphone
id4 is UA-Null
id5 is UA-Droid

instanceTitle=UA-N900
instanceCmd=run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid2 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#ffff00000000" string:"update_layout";run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid3 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#000000000000" string:"update_layout";run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid4 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#000000000000" string:"update_layout";run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid5 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#000000000000" string:"update_layout";cp /home/user/MyDocs/.images/queen_beecon_dir/user.n900 /home/user/.mozilla/microb/user.js ; pkill -f browserui

It works well for me but i am still testing so use this with caution.

Enjoy
Attached Files
File Type: zip useragents.zip (898 Bytes, 284 views)
File Type: zip qwbUA.zip (3.6 KB, 276 views)
 

The Following 6 Users Say Thank You to sacal For This Useful Post:
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#370
Originally Posted by sacal View Post
No!No!No!Yes! - Thanks for you great work.

I have used Hide User Agent for some time (my thanks to the author) but i needed to switch between 3 or 4 microb user agent strings. Then i saw your post #342 - Poker Dice Here!!! - and thought that using dbus commands i could do some kind of user agent swither for microb.

This was the result:



There are 4 snippets named Ua-N900, UA-Iphone, UA-Null and UA-Droid. To change the active microb user agent just touch the respective snippet. The current user agent is shown by the red color of the snippet.

The user agent can be switched either with microb running or not running.

The current user agent strings are:

UA-N900 - "Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2b6pre) Gecko/20100318 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900"

UA-Iphone - "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7C97d Safari/528.16"

UA-Null - ""

UA.Droid - "Mozilla/5.0 (Linux; U; Android 2.1; en-us; dream) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2"

To create the widgets:
1 - Copy the 4 user.xxx files in useragents.zip to:
/home/user/MyDocs/.images/queen_beecon_dir/
2 - Create 4 QBW instances
3 - For each QBW instance import the UA-xxx.txt file in qwbUA.zip and take note of the respective Instance ID
4 - "Edit Cmd" for each QBW instance and replace the IDs taking in consideration that in my case:
id2 is UA-N900
id3 is UA-Iphone
id4 is UA-Null
id5 is UA-Droid

instanceTitle=UA-N900
instanceCmd=run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid2 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#ffff00000000" string:"update_layout";run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid3 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#000000000000" string:"update_layout";run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid4 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#000000000000" string:"update_layout";run-standalone.sh dbus-send --session --type=method_call --dest=oh.no.more.qbw /oh/no/more/qbwid5 oh.no.more.qbw.set_param_string string:"snippetExtBgRGB" string:"#000000000000" string:"update_layout";cp /home/user/MyDocs/.images/queen_beecon_dir/user.n900 /home/user/.mozilla/microb/user.js ; pkill -f browserui

It works well for me but i am still testing so use this with caution.

Enjoy
Great job indeed
I'll give it a mention in the WIKI if you OK with it.
__________________
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
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:31.