BlueGit

timfa kwin-marble

Overview

Activity

NovDecJanFebMarAprMayJunJulAugSepOctNov

34 contributions in the last 12 months

LessMore

Commits, merge requests and comments.

kwin-marble
README.md

Marble – KWin close & minimize effects (Burn-My-Windows variant)

NL – KWin 6 (Plasma 6) sluit-animatie: het venster vormt zich soepel om tot een kleine, glanzende knikker (inhoud blijft zichtbaar), blijft even stil liggen en valt daarna met echte zwaartekracht (constante versnelling vanuit stilstand) 1,5 schermhoogte omlaag, uit beeld.

EN – KWin 6 (Plasma 6) window-close animation: the window smoothly morphs into a small glossy marble (content stays visible), pauses, then drops off-screen under real gravity (constant acceleration from rest) for 1.5 screen heights.

filmstrip

Marble Magic Lamp (minimize)

NL – kwin6_effect_marble_minimize: bij minimaliseren vormt het venster zich net zo om tot een knikker, pauzeert, en valt dan met zwaartekracht (vanuit stilstand) langs een vloeiend S-pad (twee parallelle bewegingen: zwaartekracht richting taakbalk, InOutSine opzij) naar zijn taakbalkknop; in de laatste 10% krimpt hij naar 10%. Herstellen speelt de omgekeerde animatie (knikker stijgt op van de taakbalkknop, pauze, vouwt open). Zelfde instellingen en defaults.

EN – kwin6_effect_marble_minimize: on minimize the window becomes the same marble, pauses, then falls under gravity (from rest) along a smooth S-path (two parallel moves: gravity towards the taskbar, InOutSine sideways) to its taskbar entry, shrinking to 10% over the last 10% of the path. Restore plays it in reverse (marble rises from the taskbar entry, pauses, unfolds into the window). Same settings and defaults. It replaces the active minimize animation (e.g. Magic Lamp).

Installatie / Installation

cp -r kwin6_effect_marble kwin6_effect_marble_minimize ~/.local/share/kwin/effects/

Then enable Marble [Burn-My-Windows variant] in System Settings → Window Management → Desktop Effects (it replaces the active close animation; only one can be active). Log out/in if it does not show up.

Instellingen / Settings

KeyDefaultMeaning
Duration200 msMorph into the marble
Pause400 ms (close) / 300 ms (minimize)Marble rests before falling
Gravity4500 px/s²Fall acceleration; fall time = sqrt(2·distance / g) (close: 1.5 screen heights; minimize: distance to taskbar entry)
BlackMixOuter80 %Black mix on the outer/lower part of the marble (dull "black glass")
BlackMixCenter5 %Black mix on the upper-middle part, where the window shows through; soft gradient between both zones
MixColor0 (Zwart)Mix target: 0–10 named colours (unchanged). 11 Willekeurig: next window → new hue (golden-angle sequence), HSV S=1 V≈0.667. 12 Semiwillekeurig: hue from hash(window.windowClass), same HSV; empty class → black. Values >12 clamp to 12.
MarbleSize42 pxFinal marble diameter, independent of the window size (capped at 90 % of the window's smallest side)

All durations are scaled by Plasma's global animation speed.

Bekende beperking / Known limitation

NL: Als twee vensters tegelijk met hetzelfde effect animeren, geeft KWin het tweede venster een lege snapshot (zie KDE bug https://bugs.kde.org/show_bug.cgi?id=528239). De knikker wordt dan als effen glazen knikker in de gekozen kleur getekend (zonder vensterbeeld) in plaats van zwart. Herstellen tijdens minimaliseren hergebruikt de bestaande snapshot en werkt wel normaal.

EN: When two windows animate with the same effect at the same time, KWin hands the second window an empty snapshot (see KDE bug https://bugs.kde.org/show_bug.cgi?id=528239). That marble is then drawn as a plain glass marble in the chosen colour (no window image) instead of black. Restoring during a minimize reuses the existing snapshot and works normally.

Licentie / License & attribution

GPL-3.0-or-later (see LICENSE). This effect is a modified derivative of the KWin port of Energize B from Burn-My-Windows by Simon Schneegans (GPL-3.0-or-later), whose KWin effect code also credits Martin Flöser and Vlad Zahorodnii. The common shader prelude and main.js structure come from that project; the marble shader, gravity fall and settings are new. Original copyright notices are kept in the source files. Modified by Tim Falken, 2026.