View Single Post
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#496
Originally Posted by Zvjer View Post
I can confirm that wazapp-status in 1.0.7 does not do it's job. My wazapp crashed a few minutes ago, and I did not start it again because I'm waiting on the standby screen to see if billboard will understand that wazapp is crashed but no - it still says "online".
The reason for this is the same as with the current music track being the last played video player when the Videos app gets closed - the app that sets the context property does not update it, and there's nothing Billboard can do about it (short from periodically checking which programs are still running, which I won't do for battery usage and simplicity reasons).

Here's how to fix the problem: Wazapp should update the contextkit property when it crashes. "But how can a program do something when it crashes?" i hear you say. There are several possibilities, for example implement a signal handler for SIGSEGV that cleans up things like the contextkit property, or wrap the executable in a script that does the clean-up work after the program has exited (one could check the exit code to find out if it was a normal or abnormal termination). And for "normal termination" of the application, one can use atexit(3) as a means to do clean-ups (in case it's not possible to modify other parts of the code directly.

In that case, when Wazapp reports the right status in its ContextKit property, everything will work right. I won't change Billboard, as ContextKit properties are a nice and simple way to get quick updates (as soon as the value changes) while still having very low battery usage (no polling or expensive "alive" checks).

Originally Posted by Zvjer View Post
Right now I'm on a WiFi router with broken internet connection. Nothing works, but wazapp thinks he is online, but it's not. Billboard thinks we are online too. Useless plugin? NHF.
Again, what Wazapp thinks is something that Billboard has no influence over. If it reports "online", that's a bug in Wazapp.

As far as Billboard goes, what does "thinks we are online too" mean? There's no "online" status as such in Billboard proper. What we have is the network name (obviously you *are* connected to Wifi network "XYZ" if you are connected to it - even if it does not have an uplink to Teh Internets), and the presence status (this again comes from the presence framework, and there's nothing we can do here to fix this).

Of course, you can write a script that checks if there's a real internet connection (but then, how far do you go? pinging google.com is enough? what about hotspots in cafes with login pages? do you try to open a webpage? what if that server is down, and the rest of the internet is up? you see, "being connected to the internet" isn't that easy to determine, and you don't want to constantly send traffic if you are on a battery budget, or worse - a limited data plan).

In short: Can it be done? Probably yes. Is it worth it? Probably no.

Originally Posted by Win7Mac View Post
Here's what I can't get to work:
  • - {{blue}}{events}{events? ☚} only works as desired if there's 1 event.
    If there's 2 or more, only the first is shown blue (the rest is white) and only the last has the ☚ (which is obvious)
Yes, {{color}} only goes to the end of the current line for now. What you could do is set the global color to blue, and then prefix every line that you don't want to have in blue with the desired color. At least this works as long as you don't have any other multi-line fields (for scripts, you can modify them to output the color prefix on every line).
 

The Following 3 Users Say Thank You to thp For This Useful Post: