Skip to content

My work in KDE for February 2023

Monday, 27 February 2023 | redstrate

New Gamepad KCM

The Joystick KCM is pretty bad shape right now, for numerous reasons:

  • What the heck is a joystick?
  • What is the purpose of this KCM if I can’t even configure anything?
  • Why is it telling me about device paths?
  • What’s up with all of the tables?
The current Joystick KCM

So one of my big “Plasma 6” goals is to rewrite the KCM with a few goals in mind:

  • Re-brand it around “Gamepads” and “Game Controllers” instead of “Joystick”. A lot of people have mentioned they didn’t even know it supported regular game controllers.
  • Based on modern APIs and frameworks such as Solid.
  • QML-based, with clear a symbolic gamepad layout which makes it easier to test a controller. No more tables of buttons!
  • Remap buttons for SDL games along with the regular calibration found in the old KCM.

I’ve been collaborating with Jeremy Whiting on this project, and it’s been going through some technical turmoil but it’s making solid progress:

A picture of the work-in-progress KCM, which dynamically gets the correct buttons for the controller thanks to SDL2. This will pave the way to integrating it better into a GUI.

Next month hopefully we’ll be able to get a proper UI working, now that mapping buttons is mostly sorted.

See my merge request and Jeremy’s UI merge request.

Tokodon changes

I landed a bunch of features in Tokodon this month, including some much needed bugfixes for some rough edges of the project.

Web+ap support

[Feature] I landed support for the web+ap url scheme used to open ActivityPub objects in Tokodon! Just like matrix.to links in NeoChat, these allow linking to ActivityPub objects online. Once everything is in place, we will be one of the first clients to support it!

If you can’t wait, it’s also possible to open up regular https linked posts in Tokodon by passing it as an argument, if you want to hook it up somehow in your browser.

See the merge request and the wishlist bug.

Post language support

[Feature] You can now select the language you’re posting in! You can’t view a post’s language or filter them from within Tokodon yet, but it’s a start1. Your preferred languages (chosen through the Languages & Formats KCM if you’re using KDE) is shown at the top of the list.

Screenshot of the language combo box

See the merge request.

Poll support

[Feature] Tokodon has supported viewing polls already, but not posting them. Now you can create polls! All of your usual options are exposed, including some not even shown on Mastodon Web. This is not merged yet, but will be soon.

Screenshot of creating a poll

See the [merge request]https://invent.kde.org/network/tokodon/-/merge_requests/152).

More Changes

  • [Bugfix] A bunch of Android bugs are squashed, including links not working. I just recently got my PinePhone working again too, so expect more mobile-related work soon! :) See the merge request.
  • [Feature] Soon you’ll be able to configure the network proxy on the login page. See the merge request.
  • [Bugfix] Posting is much more reliable in general, and it’s clearer when an error has occurred. Hopefully no more of your toots get eaten. See the merge request.
  • The README finally includes a screenshot! See the merge request.

NeoChat Notification Badge

[Bugfix] One thing that always irked me with NeoChat is the notification badge. The number never feels right, and no matter how many rooms I read it never changes:

NeoChat Badge

Now the badge will actually update based on your current notification count, hurrah! See the merge request.

PulseAudio KCM

[Feature] Last month I redid the Window Decoration KCM, and this month I did the same for the PulseAudio KCM, although the changes needed where much smaller.

The “new” PulseAudio KCM

See the merge request.

Kirigami and QQC2 Desktop Style

[Bugfix] For Kirigami, I tried to focus on fixing up Dialog behavior to mixed results. I wanted to change the dialog closePolicy, but that’s been more complex than expected. I attempted to fix the extra horizontal scrolling bug in Dialogs2, but that has unintended regressions in Discover and I’m not really happy with the solution. I also have a bunch of OverlaySheet fixes that I need to rebase3 :) So a bunch of half-baked things I should start finishing next month!

[Bugfix] I noticed an issue where Breeze Icons on Android wouldn’t work if you had a custom icon theme in your application - which I tried to fix but I’m not happy with the solution. It looks like the built-in icons index.theme is not installed properly, and I want to figure out if we can fix that first.

[Bugfix] For qqc2-desktop-style, I fixed an odd case where you could select text in TextAreas that explicitly disabled it by using the right-click context menu.

Plasma Welcome

Oliver landed the Plasma Welcome redesign for 6.0, which looks wonderful. As with all great features, this has had it’s fair share of technical issues which I had the pleasure of helping with, including fixing this bug:

Broken Plasma Welcome Toolbar

Embedded KCMs create and manage their own QML engine. Objects like Kirigami.ApplicationWindow are separated though, because that exists in Plasma Welcome’s engine and not the KCMs, which breaks a lot of things including the global toolbar. I figured out that you can inject your own QML engine to KDeclarative, which will fix most of the issues. While doing this, I also simplified embedded KCMs in Plasma Welcome which will help developers creating their custom pages.

Fixed Plasma Welcome Toolbar

There’s one lingering issue – KDeclarative get’s a little bit too greedy with the engine we give it and will try to destroy it to due to std::shared_ptr shenanigans, but fixing it will require changes to the framework. Right now we work around the issue by not assigning a parent, but I want to look into changing that soon.

See Oliver’s merge request.

Fun with Doxygen

This month we had a strange incident where api.kde.org fails to generate a page for IconItem, but why?

The IconItem page is missing!

Of course the first thing I tried was running kapidox locally for plasma-framework, but there’s still a doc page for IconItem generated. Huh. So I started looking into what the binary factory actually does to see if there’s some inherent issue with our system. What I ended up with is a bash script which emulates what binary factory does, but locally.

What I noticed is terrifying, the doc page doesn’t show up here! So I had an idea, what if the problem is that the name is colliding? After some quick global code searches using our LXR, I discovered that Maui recently introduced a new type called IconItem which coincidentally fits within the timeline of IconItem disappearing. How can this even happen in the first place?

I’m no expert in doxygen (is anyone?) but there is something called “tags” which is basically an index of every type that doxygen indexes. Doxygen also uses these tags to interlink doc pages together, so what’s going wrong? Well, kapidox actually runs the doc generation twice, once initially and then another time to interlink dependencies. What I theorize is that when it’s plasma-framework’s turn to generate, doxygen sees that “IconItem” is already in Maui’s tagfile and refuses to generate the page again.

With this new caveat in mind, I submitted two MRs to hopefully fix the documentation problems:

… Except that I forgot about the KF5/KF6 split, which makes this harder. Next month will be focusing on rebasing those into KF5, and then creating KF6-specific MRs if needed (but a lot of fat is being cut here, so it might not be).

KDevelop.org

I took the responsibility of converting the bit-rotting kdevelop.org site to Hugo, which should be live soon! Most of the old site content is brought over (and converted to Markdown) while pages are updated where needed. The new site is now live at kdevelop.org!

See the new repository.

Updating go-kde-org

I opened an MR to update the matrix.to redirector hosted at go.kde.org which should include a link to open in NeoChat! Once it’s merged, I plan on replacing the links on the KDE Community Wiki with these instead of the WebChat links we have now.

Changing Notification History Order

This is something that’s been sitting on my backlog, but I’m super annoyed about the ordering of notification history. Whenever I miss a notification4 I scroll through my notification history. However, it’s ordered seemingly randomly, because it’s sorted by “type and urgency”. That’s not too helpful because neither criteria is really exposed in the UI. I propose changing it to “Date” which makes way more sense for a history view of notifications.

The new, much more improved notification order

See the merge request.


  1. If you’re looking for a way to configure the default posting language, it’s unfortunately not exposed in the Mastodon API yet, including some other preferences. Since the issue hasn’t moved much, I want to look into another way to easily access those settings. ↩︎

  2. Ivan looked into this issue recently and is fixing the issue on the Flatpak KCM end, so my fix may not be needed after all. ↩︎

  3. OverlaySheets were recently overhauled, so these fixes only apply to KF5 now. ↩︎

  4. Which happens surprisingly often, despite me using the default notification timeout… ↩︎