← Back

Plasma 6.8 ate my window gaps

Virginia creeper, filling the gaps

TL;DR

A full update on my Arch workstation upgraded KDE Plasma to 6.8, and Interstitia, my fork of the KWin window-gaps script, stopped gapping properly and dragged windows were abusing others nearby. Version 1.1.3 fixes all that, refactors some ugly code, and tames some bugs.

The bigger change is the old dirty bandaid I finally ripped off to fix it. I promoted Interstitia to “major” project status, gave it a sandbox and a plan-driven workflow, so I can now stop procrastinating on its future.

I knew this day would come

I did a full update on my workstation, KDE Plasma was upgraded, and my desktop was, suddenly and once again, unsightly. I’m not trying to throw shade at the KDE developers, but I got used to seeing gaps around and between all the windows on my desktop and it’s now genuinely tough to look at it without them.

I’ve been maintaining a fork of the original tile-gaps script since I moved to Arch Linux and Plasma 6 (that story is in an earlier post) and found the original, untouched since early 2023, no longer worked. The last version of my fork worked well for about seven months, so I hadn’t felt compelled to touch it.

Then, last week, I lost my precious gaps. And, maddeningly, when I dragged a window anywhere close to another window, both the dragged window and its new neighbor jiggled and morphed about unhelpfully. Blergh.

What actually broke

I built a probe script that logged every drag, tile and geometry change on the live 6.8.2 desktop. Two things broke (the details are in the 1.1.3 pull request):

  • No gaps: KWin 6.8 hands scripts rectangles with only x, y, width and height. The script expected left, right, top and bottom, so no gaps, no snaps.
  • Windows resizing themselves: with the anchors dead, the only code still running was the part that shrinks two windows whenever their edges come close. The probe caught about 50 resizes in one second, hence all the window-drag mayhem.

The fix builds the anchors from x/y/width/height, gives gaps only to windows that are in a KWin tile or maximized, and never resizes a neighbor. I also improved tile snapping and simplified dragging a bit. Plasma 6.5 through 6.7 should still behave as before. The test suite went from 47 to 81, and the new tests replay the signal order from the live log.

Picking a minor project back up

The difficulty in picking this project back up is that the world has changed in the past seven months and I’ve changed with it. My development environment has progressed. I’ve got sandboxes. I run my major projects as plain-text workflows in an Obsidian vault: a prompt note, a plan, my answers, a handoff.

Interstitia, a minor project, had no such sandbox or workflow.

Until now! It has its own development account, its own vault and a desktop activity of its own, and the fix ran through the same loop as everything else I do these days. I’ve bitten the bullet. Unsightly layout begone! The power of Claude compels you!

Is anyone else using it?

I wasn’t sure anyone but me was using the script. There were a few comments when I announced it on Reddit, even one from a straggler who happened by months after the post, but no GitHub issues. So either it was working flawlessly for all who tried it (unlikely), or it was just me grinning at my lovely desktop (very possible).

Then, while writing this post, I found a pull request I hadn’t seen. Felix Jara hit the same bug the day before I fixed it and proposed a fix. So there’s at least one other desktop out there with gaps on it. I missed it for a few days, which says something about my notification settings. It’s really nice to know someone else is running a bit of code I absolutely refuse to go without.

His fix and mine make the same change: wrap KWin’s work area in the script’s geometry class, so the anchors get their edges back from x/y/width/height. 1.1.3 already does that. His branch no longer merges cleanly and doesn’t touch the drop handling, so the fix itself doesn’t need to go in. But I kept his tests. They use a work area that doesn’t start at 0,0 like all my tests do. A panel on the left or a second monitor moves it off. Good stuff.

In the process of relearning how to release a new version, I went to the page on opendesktop.org that serves as the backend for the settings UI for KWin scripts and I saw that Interstitia also has a fan whose name isn’t Felix.

Including myself, there appear to be 3 people who appreciate the aesthetic of clearly separated windows. I wonder if they’ve found the cascade group feature. If so, they’re going to love the next version.

Parting thoughts

1.1.3 is tested live on Plasma 6.8.2 only. If you’re on 6.5 through 6.7 and something’s off, tell me.

Reach out if you use Interstitia and you have an idea about how it could be just a little closer to being 100% absolutely perfect.

High-velocity development on a $20 Claude plan →