Active Topics

 



Notices


Reply
Thread Tools
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#451
Originally Posted by slarti View Post
Thanks, that works. I guess something changed in the way this works with 1.7?
It's always been that way

{propertyname?abc} is "output abc if propertyname is not empty"
{propertyname!abc} is "output abc if propertyname is empty"

The "not empty" part is also why {wazapp-status?abc} doesn't do what you expect - it won't be empty when you are offline (it will evaluate to "offline" instead).

The reason why the "?" doesn't output the property name is that you can do something like this:

Code:
{song?Now playing: }{song}{song?
}
 

The Following User Says Thank You to thp For This Useful Post:
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#452
Thanks, the Bluetooth status icon scripts have been merged. I wonder if we should also (in a subdirectory) include scripts such as resetting the data counters, forcing the update by re-setting the text, etc.. in the "billboard-scripts" repository, even if some of them don't really depend on Billboard - what do you think?
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#453
Originally Posted by coderus View Post
can be done by Timed script
[offtopic]

Coderus, do you know how to set an event to the timed daemon using a shell or python script? I know that on the system bus there is:

Code:
com.nokia.time /com/nokia/time com.nokia.time.add_event(QDBus
RawType::(iuuuuus(a{ss} x)
but I have no idea how to use this. Do you?

[/offtopic]
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#454
Originally Posted by thp View Post
Thanks, the Bluetooth status icon scripts have been merged. I wonder if we should also (in a subdirectory) include scripts such as resetting the data counters, forcing the update by re-setting the text, etc.. in the "billboard-scripts" repository, even if some of them don't really depend on Billboard - what do you think?
Probably a good idea. There is some demand for these and some sort of a repo for them can't hurt.

Edit: I just remembered there is one more script that has to do with Billboard in the ProfileMatic thread.

Last edited by slarti; 2013-01-05 at 16:34.
 

The Following User Says Thank You to slarti For This Useful Post:
Posts: 12 | Thanked: 16 times | Joined on May 2010 @ Sweden
#455
Hi !
I would like a 'nameday' (swedish) script, it would be nice to show it on the Billboard screen.
Has anyone the knowledge to do that ? ( I can't).
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#456
Originally Posted by Sir_Krokofant View Post
I would like a 'nameday' (swedish) script, it would be nice to show it on the Billboard screen.
If by "nameday" you mean something like this:

http://stjarnhimlen.se/ndag/ndag2001.html

Then you could start by transforming that page into a text file (one day per line) in a way that you can parse by a script and then write a small shell script that greps the right day out of it, e.g.:

Code:
~ $ cat nameday.txt 
01.01. Nyårsdagen
02.01. Svea
...
08.01. Erland
...
~ $ awk "/^$(date +%d.%m.)/ { print "'$2'" }" nameday.txt
Erland
So the "nameday.txt" contains the names on each line (DD.MM. NAME), and the awk command gets today's name based on that. I've added a script to billboard-scripts, but you will have to write (copy'n'paste or process) your nameday.txt yourself
 

The Following 3 Users Say Thank You to thp For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,701 times | Joined on Nov 2011 @ Ängelholm, Sweden
#457
@slarti i only used Timed in C++. not sure about python module for timed.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#458
Originally Posted by coderus View Post
@slarti i only used Timed in C++. not sure about python module for timed.
Well, I haven't found one... I'm guessing it's a struct of some kind you have to feed it but I'm completely clueless as to what the syntax is. Oh well, I guess I'll manage with ProfileMatic and it's timing rules.
 
Posts: 498 | Thanked: 836 times | Joined on Jun 2012 @ Finland
#459
Hi

I would like to use the "color-battery-bar" property in such a way, that it would change color when battery level goes below 30%. I have tried to find it out myself, but as I know absolutely nothing about coding this is not easy.

I tried with http://docs.python.org/2/tutorial/ and came up with idea of using an IF-statement. But I can't make it to work, maybe somebody could help me? I am way too lost here...

if [ {color-battery-bar} {battery} >30 ]
then
echo {{green}}"%"
else
echo {{red}}"%"
 
Posts: 12 | Thanked: 16 times | Joined on May 2010 @ Sweden
#460
Originally Posted by thp View Post
If by "nameday" you mean something like this:

http://stjarnhimlen.se/ndag/ndag2001.html

Then you could start by transforming that page into a text file (one day per line) in a way that you can parse by a script and then write a small shell script that greps the right day out of it, e.g.:

Code:
~ $ cat nameday.txt 
01.01. Nyårsdagen
02.01. Svea
...
08.01. Erland
...
~ $ awk "/^$(date +%d.%m.)/ { print "'$2'" }" nameday.txt
Erland
So the "nameday.txt" contains the names on each line (DD.MM. NAME), and the awk command gets today's name based on that. I've added a script to billboard-scripts, but you will have to write (copy'n'paste or process) your nameday.txt yourself
Looks nice and simple, will try it, thanks !
 
Reply


 
Forum Jump


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