maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

BluesLee 2011-01-01 20:06

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
hi,

some of my scripts dont work anymore with the latest
qbw version, for instance a command like

if [ $QBW_CLICKS_COUNT -ge 2 ]; then conboy ;fi

a double click is not recognized anymore. changing
the condition to -ge 1 works?!


Blues

No!No!No!Yes! 2011-01-01 20:29

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by BluesLee (Post 909218)
hi,

some of my scripts dont work anymore with the latest
qbw version, for instance a command like

if [ $QBW_CLICKS_COUNT -ge 2 ]; then conboy ;fi

a double click is not recognized anymore. changing
the condition to -ge 1 works?!


Blues

http://wiki.maemo.org/Queen_BeeCon_Widget#Update_Policy

http://wiki.maemo.org/images/thumb/f...px-Snap034.png

Make sure 5 is set to "yes"

SavageBrat 2011-01-01 20:47

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
hi, I've been playing with your program which is very nice,but I'm new with using linux and I have a quick question I made a snippet to run on my desktop to show the cpu speed and this is the command the I use..

echo CPU @ `awk '{print $1/1000" MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`

is this correct,it shows on my desktop but I'm confused on which button to set so it shows automatically when it on 250,500 or 600, without having to click on the snippet. Thank you

James_Littler 2011-01-01 21:06

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Hi, sorry if this has been covered, I can't find much through google so I thought I'd ask.

How do I string a few terminal commands together, so if for example, I was creating a widget to put my wireless card into monitor mode and I wanted to run the following
Code:

sudo gainroot
ifconfig wlan0 down
iwconfig wlan0 mode Monitor
ifconfig up

How would I do so?
I can get a single command to work, but how do I string it together.

Thanks

No!No!No!Yes! 2011-01-01 22:02

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by SavageBrat (Post 909242)
hi, I've been playing with your program which is very nice,but I'm new with using linux and I have a quick question I made a snippet to run on my desktop to show the cpu speed and this is the command the I use..

echo CPU @ `awk '{print $1/1000" MHz"}' /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`

is this correct,it shows on my desktop but I'm confused on which button to set so it shows automatically when it on 250,500 or 600, without having to click on the snippet. Thank you

You need a system event to be real-time notified about CPU frequency changes but I can't think of any right now which signals changes in this area. (DBUS, other ...)
However you can use timer or desktop switch policies to have a very rough update.
Ciao.

No!No!No!Yes! 2011-01-01 22:07

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by James_Littler (Post 909251)
Hi, sorry if this has been covered, I can't find much through google so I thought I'd ask.

How do I string a few terminal commands together, so if for example, I was creating a widget to put my wireless card into monitor mode and I wanted to run the following
Code:

sudo gainroot
ifconfig wlan0 down
iwconfig wlan0 mode Monitor
ifconfig up

How would I do so?
I can get a single command to work, but how do I string it together.

Thanks

Like this?
http://talk.maemo.org/showpost.php?p...7&postcount=11

James_Littler 2011-01-01 23:22

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Currently I have this as my command

Code:

#!/bin/sh

# gain superuser rights.

if [ `id -u` != 0 ] ; then
    exec sudo gainroot <<EOF
exec sh $0 $*
EOF
        exit $?
fi 

# put your code below

ifconfig wlan0 down;
iwconfig wlan0 mode Monitor;
ifconfig wlan0 up;

exit;

I have it set to update at click but it's not doing anything.
When I check iwconfig it says I'm still in managed mode.

James_Littler 2011-01-02 11:04

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
I've still not managed to get this to work. Ideas anyone?

No!No!No!Yes! 2011-01-02 11:17

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
Quote:

Originally Posted by James_Littler (Post 909373)
Currently I have this as my command

Code:

#!/bin/sh

# gain superuser rights.

if [ `id -u` != 0 ] ; then
    exec sudo gainroot <<EOF
exec sh $0 $*
EOF
        exit $?
fi 

# put your code below

ifconfig wlan0 down;
iwconfig wlan0 mode Monitor;
ifconfig wlan0 up;

exit;

I have it set to update at click but it's not doing anything.
When I check iwconfig it says I'm still in managed mode.

Have you tried the script from a shell prompt as user: "user" (your credentials when running script from qbw)?

James_Littler 2011-01-02 11:40

Re: [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread
 
terminal exits faster than I can see whats happening
iwconfig says its still in managed mode


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

vBulletin® Version 3.8.8