<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<title>zunzuncito - kde</title>
	<subtitle>Wolf&#x27;s humming microblog</subtitle>
	<link href="https://zunzuncito.oriole.systems/tags/kde/atom.xml" rel="self" type="application/atom+xml"/>
	<link href="https://zunzuncito.oriole.systems"/>
	<generator uri="https://www.getzola.org/">Zola</generator>
	<updated>2024-10-19T20:02:17+02:00</updated>
	<id>https://zunzuncito.oriole.systems/tags/kde/atom.xml</id>
	<entry xml:lang="en">
		<author><name>wolf</name></author>
		<title>Night-time icons for Plasma&#x27;s DWD backend</title>
		<published>2024-10-19T20:02:17+02:00</published>
		<updated>2024-10-19T20:02:17+02:00</updated>
		<link href="https://zunzuncito.oriole.systems/26/" type="text/html"/>
		<id>https://zunzuncito.oriole.systems/26/</id>
		<content type="html">&lt;p&gt;For a couple of weeks now I have been using Plasma’s built-in weather report
system. It supports various different sources for weather observations and
forecasts, one of which is my preferred service, &lt;a href=&quot;https:&#x2F;&#x2F;www.dwd.de&quot;&gt;Deutscher
Wetterdienst&lt;&#x2F;a&gt; (DWD). Once the report location is set up, Plasma
displays the current conditions in the tray - clicking on it gives you an
overview of the next 7 days.&lt;&#x2F;p&gt;
&lt;p&gt;I’ve been quite pleased with this; a quick glance at the icon tells you
everything you need to know and the forecast is only one click away. It even
supports DWD’s official warning system. There is one small problem with the tray
icon, however. See if you can spot it:&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;a href=&quot;&#x2F;26&amp;#x2F;icon-day.png&quot;&gt;
		&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;zunzuncito.oriole.systems&amp;#x2F;processed_images&amp;#x2F;icon-day.3653d063dc07f77c.png&quot; alt=&quot;A screenshot of Plasma&amp;#x27;s tray
showing a clipboard icon, a media control icon, and a weather icon. The weather
icon is displaying a sun with few clouds in front. The tray is also showing the
time. It is 23:57.&quot; &#x2F;&gt;
	&lt;&#x2F;a&gt;
	&lt;figcaption class=&quot;smaller&quot;&gt;Something’s not quite right…&lt;&#x2F;figcaption&gt;
	&lt;&#x2F;figure&gt;
&lt;p&gt;That’s right, I couldn’t have possibly taken this image given this post’s
timestamp is before 23:57! Good catch. More importantly, however, the icon is
showing the sun when realistically it’s going to be dark outside. This has been
annoying me to no end, so a couple of days ago I decided to fix it.&lt;&#x2F;p&gt;
&lt;p&gt;Since Plasma already comes with weather icons suited for night-time use, I
really only needed a reliable way to tell when to switch to those. After some
spelunking in DWD’s &lt;a href=&quot;https:&#x2F;&#x2F;dwd.api.bund.dev&#x2F;&quot;&gt;two&lt;&#x2F;a&gt;
&lt;a href=&quot;https:&#x2F;&#x2F;listed.to&#x2F;@DieSieben&#x2F;7851&#x2F;api-des-deutschen-wetterdienstes&quot;&gt;APIs&lt;&#x2F;a&gt;, I
found that the latter contains sunrise and sunset times for its forecast
endpoint. The weather report system was already using this endpoint to fetch
forecast data, so it was a rather simple lookup of two values in the API and
then comparing the current observation time to those.&lt;&#x2F;p&gt;
&lt;p&gt;So, after some preparatory work to make date parsing more robust, I sent a
&lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;plasma&#x2F;plasma-workspace&#x2F;-&#x2F;merge_requests&#x2F;4848&quot;&gt;merge
request&lt;&#x2F;a&gt;
upstream which was promptly approved and merged. Finally I could rest easy after
dusk, not having to worry about a sun chasing me around.&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;a href=&quot;&#x2F;26&amp;#x2F;icon-night.png&quot;&gt;
		&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;zunzuncito.oriole.systems&amp;#x2F;processed_images&amp;#x2F;icon-night.2bcdb9f7fca2c925.png&quot; alt=&quot;A screenshot of Plasma&amp;#x27;s tray
showing a clipboard icon, a media control icon, and a weather icon. The weather
icon is displaying a crescent moon with few clouds in front. The tray is also
showing the time. It is 18:57.&quot; &#x2F;&gt;
	&lt;&#x2F;a&gt;
	&lt;figcaption class=&quot;smaller&quot;&gt;… much better!&lt;&#x2F;figcaption&gt;
	&lt;&#x2F;figure&gt;
&lt;p&gt;There’s some more stuff that could be improved in the DWD backend, like station
availability. As far as I can tell, when using the open API, DWD limits access
to weather data depending on whether or not they have the full rights to it. The
API might therefore simply deny access to a station even though it is listed in
in &lt;a href=&quot;https:&#x2F;&#x2F;www.dwd.de&#x2F;DE&#x2F;leistungen&#x2F;klimadatendeutschland&#x2F;statliste&#x2F;statlex_html.html?view=nasPublication&amp;amp;nn=16102&quot;&gt;the official index&lt;&#x2F;a&gt;.
There’s no way to find out which station is accessible except to try them all.
To get around this, the DWD backend uses a &lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;plasma&#x2F;plasma-workspace&#x2F;-&#x2F;blob&#x2F;69a52cd6fbde80b087f59a633b4ff216c27ddff0&#x2F;dataengines&#x2F;weather&#x2F;ions&#x2F;dwd&#x2F;ion_dwd.cpp#L396-403&quot;&gt;very simple
heuristic&lt;&#x2F;a&gt;
based on the first digit of the station ID, since all stations starting with 0
or 1 seem to work. However, this ignores a number of other, still accessible,
stations.&lt;&#x2F;p&gt;
&lt;p&gt;I’m planning to look into this further, hopefully finding a better solution so
that users of the DWD backend have access to as many stations as possible.&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<author><name>wolf</name></author>
		<title>Understanding recent files on KDE Plasma 6</title>
		<published>2024-10-18T17:46:30+02:00</published>
		<updated>2024-10-18T17:46:30+02:00</updated>
		<link href="https://zunzuncito.oriole.systems/25/" type="text/html"/>
		<id>https://zunzuncito.oriole.systems/25/</id>
		<content type="html">&lt;p&gt;Today, prompted by a question on the &lt;code&gt;#kde&lt;&#x2F;code&gt; channel on
&lt;a href=&quot;https:&#x2F;&#x2F;libera.chat&#x2F;&quot;&gt;libera&lt;&#x2F;a&gt;, I looked into how Plasma handles its registry of
recently used folders and documents. Turns out it’s way more complicated than I
first thought.&lt;&#x2F;p&gt;
&lt;p&gt;The question specifically was whether there was a way to programmatically add
files to &lt;a href=&quot;https:&#x2F;&#x2F;okular.kde.org&#x2F;&quot;&gt;Okular’s&lt;&#x2F;a&gt; recently opened documents, so
that’s where I started looking. I was already aware that some apps like Okular
and &lt;a href=&quot;https:&#x2F;&#x2F;apps.kde.org&#x2F;gwenview&#x2F;&quot;&gt;Gwenview&lt;&#x2F;a&gt; keep their own history
independently from the system, and I quickly found out that Okular simply keeps
a list of recently opened files in its configuration file &lt;code&gt;~&#x2F;.config&#x2F;okularrc&lt;&#x2F;code&gt;
of all places.&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;a href=&quot;&#x2F;25&amp;#x2F;recent-okular.png&quot;&gt;
		&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;zunzuncito.oriole.systems&amp;#x2F;processed_images&amp;#x2F;recent-okular.027f08aef7f3b49b.png&quot; alt=&quot;A screenshot of Okular,
KDE&amp;#x27;s PDF document viewer. The application shows its welcome page, with a button
to open a new document beside a list of recently opened documents. The latter
contains an entry for a PDF of the POSIX Base Specifications.&quot; &#x2F;&gt;
	&lt;&#x2F;a&gt;
	&lt;figcaption class=&quot;smaller&quot;&gt;Okular’s welcome page, with recent documents listed.&lt;&#x2F;figcaption&gt;
	&lt;&#x2F;figure&gt;
&lt;p&gt;This got me thinking. Maybe it would be a decent idea to instead have Okular
interact with the system history directly. For that I first had to understand
how exactly it worked.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-standard&quot;&gt;The Standard&lt;&#x2F;h3&gt;
&lt;p&gt;The way that I &lt;em&gt;thought&lt;&#x2F;em&gt; Plasma’s system history worked was through
freedesktop.org’s &lt;a href=&quot;https:&#x2F;&#x2F;www.freedesktop.org&#x2F;wiki&#x2F;Specifications&#x2F;desktop-bookmark-spec&#x2F;&quot;&gt;Desktop Bookmark
Specification&lt;&#x2F;a&gt;
. The gist of it is that applications read from and write to a well-known file
&lt;code&gt;$XDG_DATA_DIR&#x2F;recently-used.xbel&lt;&#x2F;code&gt;. Indeed that file existed and it even
contained the relevant entry:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;xml&quot; class=&quot;language-xml &quot;&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&amp;lt;bookmark href=&amp;quot;IEEE%20Standard%20-%20POSIX%20Base%20Specifications,%20Issue%208,%202024.pdf&amp;quot;&amp;gt;
&amp;lt;info&amp;gt;
  &amp;lt;metadata owner=&amp;quot;http:&amp;#x2F;&amp;#x2F;freedesktop.org&amp;quot;&amp;gt;
    &amp;lt;mime:mime-type type=&amp;quot;application&amp;#x2F;pdf&amp;quot;&amp;#x2F;&amp;gt;
    &amp;lt;bookmark:applications&amp;gt;
      &amp;lt;bookmark:application name=&amp;quot;org.kde.okular&amp;quot; exec=&amp;quot;okular %u&amp;quot; count=&amp;quot;1&amp;quot;&amp;#x2F;&amp;gt;
    &amp;lt;&amp;#x2F;bookmark:applications&amp;gt;
  &amp;lt;&amp;#x2F;metadata&amp;gt;
&amp;lt;&amp;#x2F;info&amp;gt;
&amp;lt;&amp;#x2F;bookmark&amp;gt;
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Okular then seemed to write to both &lt;code&gt;recently-used.xbel&lt;&#x2F;code&gt; and &lt;code&gt;okularrc&lt;&#x2F;code&gt; when
instead it could simply access the former directly and keep all history entries
out of its configuration file. What’s more, having Okular forget its history
would only clear the entry in &lt;code&gt;okularrc&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The most prominent place in which system history is displayed is in
&lt;a href=&quot;https:&#x2F;&#x2F;apps.kde.org&#x2F;dolphin&#x2F;&quot;&gt;Dolphin’s&lt;&#x2F;a&gt; “Recent Files” panel. After clearing
Okular’s history entry I still found the document there, so it seemed obvious to
assume that it uses &lt;code&gt;recently-used.xbel&lt;&#x2F;code&gt;. Dolphin lets you forget specific
entries from history, so I confidently deleted the entry there and re-checked
the file. Weirdly, the entry was still there even though Dolphin didn’t show it
anymore…&lt;&#x2F;p&gt;
&lt;p&gt;It was time to delve into the code. Untangling all the interconnected parts took
a while, but after a good 10 minutes, I finally knew what was going on: &lt;strong&gt;There
was another history provider.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-other-standard&quot;&gt;The Other “Standard”&lt;&#x2F;h3&gt;
&lt;p&gt;This is where I have to mention KDE’s activities. Activities are a
&lt;a href=&quot;https:&#x2F;&#x2F;pointieststick.com&#x2F;2024&#x2F;02&#x2F;06&#x2F;whats-going-on-with-activities-in-plasma-6&#x2F;&quot;&gt;somewhat&lt;&#x2F;a&gt;
&lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;plasma&#x2F;kactivitymanagerd&#x2F;-&#x2F;issues&#x2F;6&quot;&gt;ill-defined&lt;&#x2F;a&gt;
concept but they basically boil down to the idea of providing a different
computing space depending on what you are doing at the moment. In reality the
most obvious user-facing activity feature in Plasma 6 is that you can customize
your task bar and wallpaper per activity so you could consider it an extension
of virtual desktops - applications open on one activity won’t be shown once you
switch to another.&lt;&#x2F;p&gt;
&lt;p&gt;Crucially, however, the activity subsystem
&lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;plasma&#x2F;kactivitymanagerd&#x2F;&quot;&gt;&lt;code&gt;kactivitymanagerd&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; is
also used to manage recently opened files. I imagine the plan is (or was) to
enable tracking file history per activity, but in all my testing I could not get
this to work - history seems to be global. So what this essentially means is
that an application might, and most probably will:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Keep its own history, most of the time through
&lt;a href=&quot;https:&#x2F;&#x2F;api.kde.org&#x2F;frameworks&#x2F;kconfigwidgets&#x2F;html&#x2F;classKRecentFilesAction.html&quot;&gt;KRecentFilesAction&lt;&#x2F;a&gt;
and a simplistic history implementation. The data here is exclusively accessed
by the application itself.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Keep its history in the desktop-agnostic &lt;code&gt;recently-used.xbel&lt;&#x2F;code&gt; file. In KDE’s
case this usually does not happen in the application itself but instead through
its &lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;frameworks&#x2F;kio&quot;&gt;KIO&lt;&#x2F;a&gt; framework. Other desktop
systems might read and display this data, but KDE seems to be write-only:
history is appended, but never shown to the user.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Keep its history in an &lt;a href=&quot;https:&#x2F;&#x2F;www.sqlite.org&#x2F;&quot;&gt;SQLite&lt;&#x2F;a&gt; database under
&lt;code&gt;~&#x2F;.local&#x2F;share&#x2F;kactivitymanagerd&lt;&#x2F;code&gt;, managed by a daemon. This is what you see in
Dolphin and what you can manage under “Recent Files” in the system settings.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;It also means that if you want to tweak history management, forget documents or
folders, or turn the thing(s) off, you have to look in a multitude of places:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If the application provides a setting to manage or disable its own history,
use that. If that’s not available (like in Okular) you’re out of luck. Disabling
an application’s own history will not impact the other two history providers -
you will still see recent files in Dolphin and elsewhere in the system.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;There’s been
&lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;frameworks&#x2F;kio&#x2F;-&#x2F;merge_requests&#x2F;1670&quot;&gt;ongoing&lt;&#x2F;a&gt;
&lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;plasma&#x2F;plasma-workspace&#x2F;-&#x2F;merge_requests&#x2F;4560&quot;&gt;work&lt;&#x2F;a&gt; to
streamline management of entries in &lt;code&gt;recently-used.xbel&lt;&#x2F;code&gt;, spurred by &lt;a href=&quot;https:&#x2F;&#x2F;bugs.kde.org&#x2F;show_bug.cgi?id=480276&quot;&gt;this
bug&lt;&#x2F;a&gt;. You may also use the
undocumented &lt;code&gt;UseRecent&lt;&#x2F;code&gt;, &lt;code&gt;MaxEntries&lt;&#x2F;code&gt;, and &lt;code&gt;IgnoreHidden&lt;&#x2F;code&gt;
&lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;frameworks&#x2F;kio&#x2F;-&#x2F;blob&#x2F;57342c46bf3789cd6f7b07ec33086a24f26223ad&#x2F;src&#x2F;core&#x2F;krecentdocument.cpp#L512-515&quot;&gt;options&lt;&#x2F;a&gt;
read from &lt;code&gt;~&#x2F;.config&#x2F;kdeglobals&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Tweak &lt;code&gt;kactivitymanagerd&lt;&#x2F;code&gt; history in system settings under “Recent Files”.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;forgetting-history&quot;&gt;Forgetting History&lt;&#x2F;h3&gt;
&lt;p&gt;With all this in mind my immediate reaction is to shy away from the whole
endeavour to have Okular interface with the system history - there’s too many
moving parts, some of which aren’t even yet well-defined on KDE’s side.&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<author><name>wolf</name></author>
		<title>A plethora of bug fixes</title>
		<published>2024-10-14T20:33:27+02:00</published>
		<updated>2024-10-14T20:33:27+02:00</updated>
		<link href="https://zunzuncito.oriole.systems/24/" type="text/html"/>
		<id>https://zunzuncito.oriole.systems/24/</id>
		<content type="html">&lt;p&gt;For whatever reason I’ve been uncovering software bugs at an unprecedented rate
in the past 10 days. This is by no means a bad thing, I enjoy hunting down and
fixing bugs, but it does mean that the additional overhead of drafting a post
about each bug becomes a bit too much. So instead here’s a quick overview - the
linked patches and merge requests will have more information, if you are
interested.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;trash-size-calculation-in-kio&quot;&gt;Trash size calculation in KIO&lt;&#x2F;h3&gt;
&lt;p&gt;I noticed this one pretty much right after starting to use
&lt;a href=&quot;https:&#x2F;&#x2F;apps.kde.org&#x2F;dolphin&#x2F;&quot;&gt;Dolphin&lt;&#x2F;a&gt; but did not end up looking into it
until quite a bit later: when displaying the size of the items in the trash, the
application would always show 0 bytes. This would also cause the automated
cleanup of items to fail - Dolphin simply believed that the trash was empty.&lt;&#x2F;p&gt;
&lt;p&gt;KDE uses the &lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;frameworks&#x2F;kio&quot;&gt;KIO&lt;&#x2F;a&gt; framework to provide
management of the trash. A &lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;frameworks&#x2F;kio&#x2F;-&#x2F;commit&#x2F;0ab81b6bac953b12b454bef4874946bb7fc8db85&quot;&gt;recent
commit&lt;&#x2F;a&gt;
had changed the construction of a
&lt;a href=&quot;https:&#x2F;&#x2F;doc.qt.io&#x2F;qt-6&#x2F;qdiriterator.html&quot;&gt;QDirIterator&lt;&#x2F;a&gt; in a way that would
make it ignore all items when iterating over the trash directory. Thankfully the
fix was straightforward and it was &lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;frameworks&#x2F;kio&#x2F;-&#x2F;merge_requests&#x2F;1729&quot;&gt;merged
quickly&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;git-shortlog-1-segfaults-outside-of-a-git-repository&quot;&gt;git-shortlog(1) segfaults outside of a git repository&lt;&#x2F;h3&gt;
&lt;p&gt;This one I uncovered as I was writing a small script to give me an overview of
commit authors in all the git repositories I had cloned locally. I was happily
scanning through my source directory using the
&lt;a href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-shortlog#Documentation&#x2F;git-shortlog.txt---authorltpatterngt&quot;&gt;&lt;code&gt;--author&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;
flag for &lt;code&gt;git-shortlog(1)&lt;&#x2F;code&gt; to generate this, fully expecting git to complain
about the few non-git directories I had. Instead of complaints, however, I got a
segfault.&lt;&#x2F;p&gt;
&lt;p&gt;Turns out that a &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;git&#x2F;git&#x2F;commit&#x2F;ab274909d4&quot;&gt;change back in
May&lt;&#x2F;a&gt; stopped setting SHA1 as the
default object hash. This was done to progress the slow-moving &lt;a href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;hash-function-transition&quot;&gt;transition to
stronger hash functions&lt;&#x2F;a&gt; but
inadvertently broke &lt;code&gt;git-shortlog(1)&lt;&#x2F;code&gt; whose argument parsing machinery expected
a default hash algorithm to be set. I sent &lt;a href=&quot;https:&#x2F;&#x2F;public-inbox.org&#x2F;git&#x2F;20241011183445.229228-1-wolf@oriole.systems&#x2F;T&#x2F;#u&quot;&gt;a
patch&lt;&#x2F;a&gt;
upstream.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;an-infinite-loop-in-plasmashell&quot;&gt;An infinite loop in plasmashell&lt;&#x2F;h3&gt;
&lt;p&gt;I regularly use the
&lt;a href=&quot;https:&#x2F;&#x2F;docs.kde.org&#x2F;stable5&#x2F;en&#x2F;plasma-desktop&#x2F;plasma-desktop&#x2F;activities-interface.html&quot;&gt;Activities&lt;&#x2F;a&gt;
functionality in Plasma 6 and switch through my activities using Plasma’s
built-in activity manager. A couple of days ago I managed to make &lt;code&gt;plasmashell&lt;&#x2F;code&gt;,
the provider for Plasma’s desktop and task bar, freeze - I had hit the “up
arrow” key in the activity filter text box when there were no results visible.
This was perfectly reproducible, so I went to investigate.&lt;&#x2F;p&gt;
&lt;p&gt;The cause of the issue was a do-while construct not handling a specific sentinel
value, making it loop infinitely. For this one I also opened a &lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;plasma&#x2F;plasma-desktop&#x2F;-&#x2F;merge_requests&#x2F;2574&quot;&gt;merge
request&lt;&#x2F;a&gt;
upstream.&lt;&#x2F;p&gt;
</content>
	</entry>
	<entry xml:lang="en">
		<author><name>wolf</name></author>
		<title>KDE Plasma 6 and two bugs</title>
		<published>2024-09-18T21:16:12+02:00</published>
		<updated>2024-09-18T21:16:12+02:00</updated>
		<link href="https://zunzuncito.oriole.systems/19/" type="text/html"/>
		<id>https://zunzuncito.oriole.systems/19/</id>
		<content type="html">&lt;p&gt;For the last couple of months I have been running &lt;a href=&quot;https:&#x2F;&#x2F;swaywm.org&#x2F;&quot;&gt;sway&lt;&#x2F;a&gt; on
my main desktop system after having been forced away from
&lt;a href=&quot;https:&#x2F;&#x2F;hub.darcs.net&#x2F;raichoo&#x2F;hikari&quot;&gt;hikari&lt;&#x2F;a&gt; because of its practically halted
development and incompatibility with newer
&lt;a href=&quot;https:&#x2F;&#x2F;gitlab.freedesktop.org&#x2F;wlroots&#x2F;wlroots&#x2F;&quot;&gt;wlroots&lt;&#x2F;a&gt; versions.&lt;&#x2F;p&gt;
&lt;p&gt;I never felt completely satisfied with it and the whole experience was rather
joyless, so about a week ago I decided to give &lt;a href=&quot;https:&#x2F;&#x2F;kde.org&#x2F;announcements&#x2F;megarelease&#x2F;6&#x2F;&quot;&gt;KDE Plasma
6&lt;&#x2F;a&gt; a try after a surprisingly
decent experience on the &lt;a href=&quot;https:&#x2F;&#x2F;neon.kde.org&#x2F;&quot;&gt;KDE Neon&lt;&#x2F;a&gt; live image.&lt;&#x2F;p&gt;
&lt;p&gt;Whilst undoubtedly greater in its complexity and code size than sway, to me
Plasma 6 seems like one of the last decent desktop environments still remaining.
It’s incredibly customisable (but still comes with good defaults), looks nice
out of the box, and most importantly seems to care about providing a nicely
integrated and featureful experience. This even includes a companion app on
Android, &lt;a href=&quot;https:&#x2F;&#x2F;kdeconnect.kde.org&#x2F;&quot;&gt;KDE Connect&lt;&#x2F;a&gt;. It remains to be seen
whether it will fully convince me in the long run, but for now I am very
satisfied with it.&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;a href=&quot;&#x2F;19&amp;#x2F;kde-plasma.png&quot;&gt;
		&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;zunzuncito.oriole.systems&amp;#x2F;processed_images&amp;#x2F;kde-plasma.67631c40d6568bd3.jpg&quot; alt=&quot;A picture of the KDE Plasma 6 desktop
environment, with a browser window, a terminal, and an instance of Dolphin, a
file manager.&quot; &#x2F;&gt;
	&lt;&#x2F;a&gt;
	&lt;figcaption class=&quot;smaller&quot;&gt;KDE Plasma 6 with a few windows open&lt;&#x2F;figcaption&gt;
	&lt;&#x2F;figure&gt;
&lt;p&gt;This last week was mostly spent learning about the desktop environment and
setting everything up exactly how I want it to be, but there were two notable
bugs to squash as well.&lt;&#x2F;p&gt;
&lt;p&gt;The first one reared its ugly head once I enabled backwards-compatibility with
Qt5-based apps. I have a couple of such apps still, most prominently
&lt;a href=&quot;https:&#x2F;&#x2F;www.mumble.info&#x2F;&quot;&gt;Mumble&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;quassel-irc.org&#x2F;&quot;&gt;Quassel IRC&lt;&#x2F;a&gt;.
Once the latter was built against the KFramework libraries, no more
notifications were shown…&lt;&#x2F;p&gt;
&lt;p&gt;Fixing this ended up taking about two days, most of which were spent discovering
exactly how
&lt;a href=&quot;https:&#x2F;&#x2F;api.kde.org&#x2F;frameworks&#x2F;knotifications&#x2F;html&#x2F;index.html&quot;&gt;KNotifications&lt;&#x2F;a&gt;
work. KDE provides apps with a tighter integration to the notification service,
allowing users to specify which types of notifications to show, and how.
Applications specify their notifications by shipping an &lt;code&gt;&amp;lt;app&amp;gt;.notifyrc&lt;&#x2F;code&gt; file.
KDE ties this file to the application by matching its base name to the name
given to the application (usually through a call to
&lt;code&gt;QCoreApplication::applicationName&lt;&#x2F;code&gt; or when creating
&lt;a href=&quot;https:&#x2F;&#x2F;api.kde.org&#x2F;frameworks&#x2F;kcoreaddons&#x2F;html&#x2F;classKAboutData.html&quot;&gt;KAboutData&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;It turns out that Quassel had recently been
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;quassel&#x2F;quassel&#x2F;commit&#x2F;020c163421691fa37330826df92ac0a248721290&quot;&gt;patched&lt;&#x2F;a&gt;
to fix an issue where desktop environments did not show its icon correctly. This
required a call to &lt;code&gt;setDesktopFileName&lt;&#x2F;code&gt; in &lt;code&gt;KAboutData&lt;&#x2F;code&gt; to make environments
aware of the connection. However, Quassel’s application name was
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;quassel&#x2F;quassel&#x2F;commit&#x2F;020c163421691fa37330826df92ac0a248721290#diff-c72daad7d2269a2ee21584002ef1f30f4415335358a6c6f7e7296d3290a51a91R117&quot;&gt;changed in the same commit&lt;&#x2F;a&gt;,
severing its link with the name given through its &lt;code&gt;quassel.notifyrc&lt;&#x2F;code&gt; file. This
seems to have been done in addition to the &lt;code&gt;setDesktopFileName&lt;&#x2F;code&gt; call and was not
necessary to solve the issue the commit was trying to address.&lt;&#x2F;p&gt;
&lt;p&gt;I prepared a &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;quassel&#x2F;quassel&#x2F;pull&#x2F;619&quot;&gt;pull request&lt;&#x2F;a&gt; fixing
this issue by reverting part of the offending commit.&lt;&#x2F;p&gt;
&lt;figure&gt;
&lt;a href=&quot;&#x2F;19&amp;#x2F;notification.png&quot;&gt;
		&lt;img src=&quot;https:&amp;#x2F;&amp;#x2F;zunzuncito.oriole.systems&amp;#x2F;processed_images&amp;#x2F;notification.061a2c93574b054b.png&quot; alt=&quot;A picture of a
notification from Quassel IRC saying &amp;#x27;yay for notifications&amp;#x27;.&quot; &#x2F;&gt;
	&lt;&#x2F;a&gt;
	&lt;figcaption class=&quot;smaller&quot;&gt;Glad to
have these back&lt;&#x2F;figcaption&gt;
	&lt;&#x2F;figure&gt;
&lt;p&gt;The second bug I randomly came across whilst perusing &lt;code&gt;journalctl&lt;&#x2F;code&gt; and seeing
the following error from &lt;a href=&quot;https:&#x2F;&#x2F;apps.kde.org&#x2F;dolphin&#x2F;&quot;&gt;Dolphin&lt;&#x2F;a&gt;, KDE’s file
manager:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code&gt;QString(View)::contains(): called on an invalid QRegularExpression object
(pattern is &amp;#x27;\A(?:file:&amp;#x2F;&amp;#x2F;&amp;#x2F;home&amp;#x2F;wolf&amp;#x2F;[Z-A]&amp;#x2F;?)\z&amp;#x27;)
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Seeing this immediately made me wonder whether Dolphin plugs a URL straight into
a regular expression without escaping it, and the answer, of course,
&lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;system&#x2F;dolphin&#x2F;-&#x2F;blob&#x2F;5c069471fccc41051b967be69f95655b3e0b73ef&#x2F;src&#x2F;dolphinviewcontainer.cpp#L554-557&quot;&gt;is yes&lt;&#x2F;a&gt;.
I spent most of today’s afternoon hunting this issue down and preparing a &lt;a href=&quot;https:&#x2F;&#x2F;invent.kde.org&#x2F;system&#x2F;dolphin&#x2F;-&#x2F;merge_requests&#x2F;831&quot;&gt;merge
request&lt;&#x2F;a&gt; that fixes
it in an elegant way.&lt;&#x2F;p&gt;
</content>
	</entry>
</feed>
