RSIBreak porting has started & porting problems.
Yes, it’s a bit late to start porting an app now, but I needed a break from Mailody for a while and I need an RSIBreak app for KDE4 anyway and I’m the maintainer of that app, so I feel the need to do something with it.
Anyway, RSIBreak is highly focussed as being a tray application. That means, there is no real main window which should popup when clicking on the tray. And that’s where I’ve some problems. As soon as I open the configuration from the context menu of the tray icon and close it again, RSIBreak exit(0)’s. And it does that for all the about screens as well. I’ve no idea why.
Another problem (or the same?) is that KSystemTrayIcon is no longer a QWidget, that means I can not intercept left clicks on the Icon – or catch the hover event. The latter problem I tackled with hooking into the tooltip event, but that’s far from ideal.
When RSIBreak starts for the very first time or when RSIBreak is started while running, it shows a popup with a screenshot of the system tray with the icon in there. Up to now I used (borrowed code from Konversation though) a QMimeSourceFactory to store the image, like in:
QMimeSourceFactory::defaultFactory()->setPixmap( "systray_shot", QPixmapOfTheTrayIcon );
then i could use that in a dialog:
KMessageBox::information(this,
i18n("<p>RSIBreak is already running<p><p>It is located here:")
+ "<p><center><img source=\"systray_shot\"></center></p><p>",
i18n("Already Running"));
But there is bad news, QMimeSourceFactory is not available in Qt4. The porting document tells me to look at Qt resource system, but that’s not the use case here. So I have the pixmap and I’ve a messagebox, just need to find an easy way to show the image there. I need to peek at Konversation again to see how they solved it.
Just some random issues you run into when porting… The good news is that there will be a RSIBreak ready, probably before the final release of KDE.
Hi.
I have some wishlist items.
Could RSI break collect stats on how much typing has been done, and what kind of typing? For instance could it record stats on
1) How many keypresses
2) How many two-keypresses (Shift+X)
3) How many three-keypresses
4) How many repeated keypresses (Del Del Del etc..)
5) How many same hand sequences for both left and right hands, (qwert all left hand and yuiop all right hand on qwerty layouts).
6) How many bad key combinations (left ctrl with c as opposed to right ctrl with c) – these would be defined as key combinations that you have had to contort your hand to press.
I think such stats would help identify patterns of typing that cause RSI type strain.
A user may discover they have typed twice as much as usual in a day and that explains the pain, or it might be that they have spent an hour copying and pasting and that causes the pain.
The benefit of such knowledge is clear.
Regards
Richard Fletcher
Hi,
Currently this is not possible. We hook into X11′s screensaver feature to find out the idle time of the user. We don’t receive all the keys the user presses or the milage of the mouse.
we do provide statistics about the % of activity.
Toma
You can now download it from the website. Again thanks for reporting.
Ah well, that’s a shame. I hope you can see the value in the idea though.
Regards
Richard
Hi Tom,
I want to download the source tarball for RSI. I could not find a link for it under the Downloads page of rsibreak.org. Can you please point me to it.
Sorry, I could not email you (and am instead writing comment here), as I could not find any contact information (your email) on either RSI break site or your website.
Finally found the tarball at (after some googling and guessing the file name) http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/%5Bpage=127%5D
But I still think you should link it from the project page.
After replacing the wiki site a few weeks back I forgot this probably. I will fix it later this week. Thanks for reporting.
Why not just make a Plasma Widget out of it?
I don’t know if there’s a KDE way of doing it, but Qt4 brings in a new property “quitOnLastWindowClosed” on QApplication that defaults to true. If you’re not doing so already, setting that to false in your initialization should fix the exiting problem.
From what I’ve read, though, plasma widgets will be able to provide notifications and such so plasma might allow you more versatility in the long run…
I agree with Behrnard, I think that RSIBreak is a perfect plasmoid… we’ll have a better thing that the systray in KDE4, so why not use it?
I will first complete the port and then look if I can make it Plasmatic. That was on my todo list already.
Thanks!!!! Works && Committed. You are the hero of the day.
Sounds nice.
please don’t hesitate to ask me any questions or for help along the way of creating a plasmoid out of it. i too think this would be perfect as such a thing and then people could use it on their desktop, panels…
in fact, i bet we could rig it up so that as an option it would popup a full screen overlay with just an rsibreak interface in the middle of it to “enforce” breaks =)