Active Topics

 



Notices


Reply
Thread Tools
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#771
Dears,

Can we add the function to show wifi signal strength on standby screen?

@+
 

The Following User Says Thank You to tonyhuynh For This Useful Post:
Posts: 64 | Thanked: 117 times | Joined on Aug 2010
#772
Hi, first i'd like to thank you for this wonderful app and the great support.

Then for my question.

I've been thinking of making a script that displays a row of icons to indicate certain programs are still running.
I'd do this for apps that i often forget to turn off (example, noticing at work that a wifi remote app is still running uselessly since the evening before) or for apps that consume a lot of battery, as a reminder.

Example:
Code:
#!/bin/sh

check_process() {
  [ "$1" = "" ]  && return 0
  [ `pgrep -n $1` ] && return 1 || return 0
}
empty='<</home/user/billboard/icons/empty.png>>'
check_process "qremot"
[ $? -eq 0 ] && echo -n "$empty " || echo -n "<</home/user/billboard/icons/qremot-red.png>> "
check_process "camera-ui"
[ $? -eq 0 ] && echo -n "$empty " || echo -n "<</home/user/billboard/icons/camera-red.png>> "
The script displays a single row of icons.
I made all icons and the empty image the same size so they would be on the same location every time whether or not other apps are (in)active.
One could off course display different color icons depending if the app is active, instead of an empty image.


Now i'm wondering how often a script like this would be called, cause i wouldn't want it to use too much battery.


Also, how do i find the process names of apps?
In the example above, camera-ui is apparently not linked to the camera app, but a process that is always active.

Similarly i'd like to do such an icon for the 'ToggleWlanScan' app, to remind me when i've turned wlanscan off, but i don't think there's an active process involved. Is there a way to check whether this is active from billboard?

Last edited by SaiKo; 2013-04-01 at 02:04.
 
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#773
@SaiKo camera-ui have prestart mode as daemon. and many others system apps too.
i think you should use python and check active x-windows, not processes.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 
Posts: 64 | Thanked: 117 times | Joined on Aug 2010
#774
Originally Posted by coderus View Post
@SaiKo camera-ui have prestart mode as daemon. and many others system apps too.
i think you should use python and check active x-windows, not processes.
If i do 'xwininfo -root -children -int' camera-ui is listed 3 times although the app isn't activated.

How would python get the truly active windows?

Thank you.
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#775
Originally Posted by coderus View Post
@Win7Mac this style of coding more intelligent...
Absolutely, very much appreciated!
And should save some battery too, I guess?
My idle raised a few mA since I updated and I think it's all the scripts to blame...
Is there a difference -batterywise- in using emojis and .png's?

+1 for wifi signal strength, probably even the bar?

So there is no way of making
"percent=$(qdbus --system com.nokia.csd /com/nokia/csd/csnet com.nokia.csd.CSNet.SignalStrength.SignalPercent)"
upate in a script as often as calling {cell-signal-strength} in BB?

@thp: will it be possible to nest scripts in next version or make it possible via some additional code? - That would give pretty much room for creativity, I think.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Posts: 56 | Thanked: 13 times | Joined on Mar 2012 @ Novosibirsk, Russia
#776
Hello,
Returning to size of icons in "meecast-icon-src" i've got a question: is it possible to change the size of output icon on the fly. Probably write some script that will retrieve icon having {meecast-icon-src} as parameter, resize it to some given size and put to some known path, from which billboard will show it. There are 2 questions in fact:
1. How to resize icon from command line
2. Will this mode of operation be supported by billboard: how will it notice change of resized icon? Maybe script should output path to the file and entire command for billboard should look like:
<<script: my_resize.sh {meecast-icon-src} 20 20>>

Thanks,
Serge.

Update: it seems I found answer on 2nd question upper in thread: looks like script shoud output the file name in form <</some/path/resized_icon.png>>, so the only 1st question remains.

Last edited by Loginin; 2013-04-02 at 03:14.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#777
Originally Posted by SaiKo View Post
If i do 'xwininfo -root -children -int' camera-ui is listed 3 times although the app isn't activated.

How would python get the truly active windows?
This function:

https://github.com/harmattan/camerra...camerra.py#L41

returns True if the camera UI is on top, False otherwise.
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#778
Is there something similar to
state=$(qdbus --system com.nokia.icd2.context /org/maemo/contextkit/Internet/NetworkState org.maemo.contextkit.Property.Get | sed q)
for cellular connection?
So that I can use something like <if [[ $state == "disconnected" ]]; then blah> in a script to check if flightmode is activated?
Still trying to make it work in the signalbar script...
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#779
A small teaser of what's coming in Billboard 1.0.9..

 

The Following 11 Users Say Thank You to thp For This Useful Post:
Posts: 79 | Thanked: 31 times | Joined on Oct 2011
#780
Just wondering if anyone else has this problem, but when using the {Meecast-icon} parameter, it works, but the icon itself never updates. all the descriptions and stations update fine, just the icon stays the same all the time.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:48.