Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please update for Plasma 6 #12

Closed
wolftune opened this issue Mar 4, 2024 · 25 comments
Closed

please update for Plasma 6 #12

wolftune opened this issue Mar 4, 2024 · 25 comments

Comments

@wolftune
Copy link

wolftune commented Mar 4, 2024

I love this, but it won't work in plasma 6. Can it get updated?

@wojnilowicz
Copy link
Owner

Thanks, and regarding your question: yes it can, but it may take some time. Firstly, porting to Plasma 6 seems not to be trivial. Secondly, Workrave itself crashes on KDE's Wayland, and the version that probably doesn't crash is still in beta.

@wojnilowicz
Copy link
Owner

I've updated my plasmoid to Plasma 6. Here is how you can try it out:

git clone -b kf6-port --depth=1 https://github.com/wojnilowicz/workrave-applet.git
cd workrave-applet
kpackagetool6 -t Plasma/Applet --install src

I still haven't switched to Plasma 6 so it's mainly untested. The applet should work in the X11 session. Stable Workrave crashes constantly on Wayland. I didn't test the beta version that says it has fixes for Wayland.

@wolftune
Copy link
Author

wolftune commented Apr 2, 2024

you would like me to test or might as well wait for the Workrave update? I can test if you are requesting it

@wojnilowicz
Copy link
Owner

You asked for a Plasma 6 version of the plasmoid. It's here for you to use it. If plain Workrave works for you, then my plasmoid should work as well. Not requesting anything.

@wolftune
Copy link
Author

wolftune commented Apr 3, 2024

I just meant about testing sooner vs later. I very much want to use this, but Workrave itself is not yet working for me, so the full functioning will be both Workrave and this plasmoid. And if you would like me to test the plasmoid even though Workrave is still needing update to support kde-idle, I could do that. Otherwise, I will wait for Workrave to be updated and then test this then. Thanks so much!

@wojnilowicz
Copy link
Owner

Testing my plasmoid while Workrave is not working won't help me. Thanks anyway.

@wolftune
Copy link
Author

wolftune commented Apr 4, 2024

okay, when Workrave is updated to work with KDE 6, I'll happily then use it with your plasmoid

@jjramsey
Copy link

okay, when Workrave is updated to work with KDE 6, I'll happily then use it with your plasmoid

@wolftune How do you compile the beta Workrave? I know that to get it to work under LabWC, I had to add -DHAVE_WAYLAND:BOOL=TRUE to the CMake command line used to configure the build (see rcaelers/workrave#523 (comment)). While LabWC is different from KWin, the two compositors should use the same idle-notify protocol.

@wolftune
Copy link
Author

@jjramsey I would ask that at https://github.com/rcaelers/workrave/discussions not on this issue about the applet
I haven't tested the beta myself yet. I am eager to have it all working but am not able to prioritize testing everything myself at this time. My vague impression is that there's a kde-notify that is distinct from idle-notify but I'm not sure

@jjramsey
Copy link

I would ask that at https://github.com/rcaelers/workrave/discussions not on this issue about the applet

Just FYI, I wasn't asking for advice on compiling Workrave. I was asking how you compile it, because I wanted to know if you had done it correctly. You had commented on the issue about Workrave's Wayland support (rcaelers/workrave#523), so I figured you had at least tried the Workrave beta.

My vague impression is that there's a kde-notify that is distinct from idle-notify but I'm not sure

FWIW, I had been keeping my eye on the idle-notify protocol, and as far as I can tell, it started as a KWin protocol and then got adapted into a proper Wayland one (see the next to last paragraph in https://www.phoronix.com/news/Wayland-Protocols-1.27). It should be implemented in KWin now (https://invent.kde.org/plasma/kwin/-/merge_requests/2959).

@jjramsey
Copy link

I can verify that the Plasma 6 version of the applet works for me, using the Workrave beta compiled for Wayland.

@arturaz
Copy link

arturaz commented May 11, 2024

I've updated my plasmoid to Plasma 6. Here is how you can try it out:

I want to note that on OpenSUSE Tumbleweed the qdbus executable is called qdbus6, not qtbus-qt6, so the applet should check for both names, as otherwise it says "Workrave is not installed".

arturaz@localhost:~/Software/workrave-applet> qdbus6 org.workrave.Workrave
/
/org
/org/gtk
/org/gtk/Profiler
/org/workrave
/org/workrave/Workrave
/org/workrave/Workrave/UI
/org/workrave/Workrave/Core
/org/workrave/WorkraveApplication

I believe the solution is to add this to main.qml:

  Plasma5Support.DataSource {
    id: qDBusQt6AlternativeNameCheck
    engine: 'executable'
    interval: 0
    connectedSources: ["qdbus6"]
    onNewData: function(sourceName, data) {
      if (!interval)
        return
      if (data.stderr.length > 0) {
      } else {
        dbusExecutableName = "qdbus6"
      }
      workraveCheckDBus.interval = 1
      interval = 0
    }
  }

@wojnilowicz
Copy link
Owner

@arturaz, thank you for this valuable piece of information. I'll be checking for qdbus6 as well.

@arturaz
Copy link

arturaz commented May 13, 2024

After using it for some time I can confirm that Plasma 6 version works perfectly fine on X11 session as well.

Information for package workrave:

Repository : Main Repository (OSS)
Name : workrave
Version : 1.10.50-3.2
Arch : x86_64
Vendor : openSUSE
Installed Size : 14,1 MiB
Installed : Yes
Status : up-to-date
Source package : workrave-1.10.50-3.2.src
Upstream URL : http://www.workrave.org
Summary : Recovery and prevention of Repetitive Strain Injury program
Description :
Workrave is a program that assists in the recovery and prevention of Repetitive Strain Injury (RSI). The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit.

@wojnilowicz
Copy link
Owner

I've updated my plasmoid to Plasma 6. Here is how you can try it out:

I want to note that on OpenSUSE Tumbleweed the qdbus executable is called qdbus6, not qtbus-qt6, so the applet should check for both names, as otherwise it says "Workrave is not installed".

arturaz@localhost:~/Software/workrave-applet> qdbus6 org.workrave.Workrave
/
/org
/org/gtk
/org/gtk/Profiler
/org/workrave
/org/workrave/Workrave
/org/workrave/Workrave/UI
/org/workrave/Workrave/Core
/org/workrave/WorkraveApplication

I believe the solution is to add this to main.qml:

  Plasma5Support.DataSource {
    id: qDBusQt6AlternativeNameCheck
    engine: 'executable'
    interval: 0
    connectedSources: ["qdbus6"]
    onNewData: function(sourceName, data) {
      if (!interval)
        return
      if (data.stderr.length > 0) {
      } else {
        dbusExecutableName = "qdbus6"
      }
      workraveCheckDBus.interval = 1
      interval = 0
    }
  }

qdbus-qt6 is needed on Fedora, so I cannot remove it. I've added a script to the applet to detect the qdbus name used by user's distribution. Here is how you can try it out:

git clone -b kf6-port --depth=1 https://github.com/wojnilowicz/workrave-applet.git
cd workrave-applet
kpackagetool6 -t Plasma/Applet --upgrade src

if you already have installed my applet, or

git clone -b kf6-port --depth=1 https://github.com/wojnilowicz/workrave-applet.git
cd workrave-applet
kpackagetool6 -t Plasma/Applet --install src

if you don't have it installed at the moment.

@wolftune
Copy link
Author

Hi, I gave up on waiting for the full Wayland release and had other wayland problems, so I tried switching my system back to x. Workrave is working (not the beta, the normal older version), but the widget is not. I'm seeing the qdbus error message. I'm using KDE Neon.

@wojnilowicz
Copy link
Owner

wojnilowicz commented Sep 11, 2024

Hi, I gave up on waiting for the full Wayland release and had other wayland problems, so I tried switching my system back to x. Workrave is working (not the beta, the normal older version), but the widget is not. I'm seeing the qdbus error message. I'm using KDE Neon.

This one?

Please make sure that the command qdbus org.workrave.Workrave works without issues in your terminal.

Does this command work for you?
If not, then do you have the qt6-tools-dev-tools package installed?
I haven't tested it myself. Just inferring from what I found about their packages.

@wolftune
Copy link
Author

Yes, that message, and it works as in:

$ qdbus org.workrave.Workrave
/
/org
/org/workrave
/org/workrave/WorkraveApplication
/org/workrave/Workrave
/org/workrave/Workrave/Menu
/org/workrave/Workrave/Core
/org/workrave/Workrave/UI
/org/gtk
/org/gtk/Profiler

I don't have qt6-tools-dev-tools but that is a "Dummy transitional" package. I do have qt6-tools and I just now added qt6-tools-dev though initially I'm seeing no difference.

@wojnilowicz
Copy link
Owner

My bad. I wrote a script for detecting a qdbus name that doesn't work on Ubuntu's dash. I just pushed a fix to the kf6-port branch.

You can update your applet as explained in this comment or copy this file to your /home/$USER/.local/share/plasma/plasmoids/org.kde.workraveApplet/contents/script where $USER is your username.

Thanks a lot for reporting this.

@wolftune
Copy link
Author

Works!! Yay! Guessing I don't need qt6-tools-dev after all right?

@wojnilowicz
Copy link
Owner

Glad to hear 🙂 I'm not sure about qt6-tools-dev. After all, it asked me to install qtchooser to have qdbus, so maybe it's not needed.

@wolftune
Copy link
Author

qt6-tools-dev not needed indeed, confirming

I think the only thing left to close this issue is to do a normal release

@wojnilowicz
Copy link
Owner

The normal release has been done as the 0.4.0 version, so closing now.
I finally switched to Plasma 6 and it works fine for me, but please let me know, should you have any issues with.

@wolftune
Copy link
Author

wolftune commented Nov 3, 2024

FYI, I see the README updated, but the GitHub "about" section still says "KDE Plasma 5 applet for displaying Workrave timers."

@wojnilowicz
Copy link
Owner

FYI, I see the README updated, but the GitHub "about" section still says "KDE Plasma 5 applet for displaying Workrave timers."

Indeed 🙂 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants