Skip to content

About

Windows 11 style Snap Layouts flyout for KDE Plasma 6: hover a window's caption buttons

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Snap Layouts Hover

Package

Windows 11 style Snap Layouts for KDE Plasma 6, triggered the way Windows does it: rest the pointer on a window's caption buttons and pick a layout.

A KWin script. No dependencies, no daemon, no configuration files outside KDE's own settings.

The flyout

What it does

  • Rest the pointer for about 250 ms on the top-right caption strip of a window (its minimize/maximize/close buttons) and a flyout with eight layouts opens below them.
  • Every preview shows the app icons that would fill its zones: the hovered window goes into the zone under the pointer, the next windows into the remaining zones, so you see the result before clicking.
  • Hover a zone to highlight it. Click it: that window goes there, then the remaining zones are filled with your other windows on the same screen (topmost first). Picking a layout always rearranges the zones, even when they overlap the previous arrangement.
  • With "Only show it when another window is open" (default), the flyout stays away while there is nothing to arrange.
  • Closes on click, on minimize/maximize/close, or when the pointer leaves neither stealing keyboard focus nor keeping the pointer.

Layouts

halves 2/3 + 1/3 thirds wide middle (1/4 + 1/2 + 1/4)
left + right stacked quarters right + left stacked main 2/3 + right stacked

Requirements

  • KDE Plasma 6 (tested on 6.7.5, Wayland). X11 is untested.
  • Nothing else. The flyout is plain QML in a KWin declarative script.

Install

Download snaplayoutflyout-<version>.kwinscript from Releases:

kpackagetool6 --type KWin/Script --install snaplayoutflyout-1.1.2.kwinscript

Then open System Settings > Window Management > KWin Scripts, tick Snap Layouts Hover and click Apply.

Building it yourself:

./tools/package.sh
kpackagetool6 --type KWin/Script --install dist/snaplayoutflyout-1.1.2.kwinscript

Settings

System Settings > Window Management > KWin Scripts > Snap Layouts Hover > Configure

Option Default Meaning
Show the flyout on hover on Master switch
Hotspot width 72 px Width of the trigger strip, from the window's right edge
Hotspot height 0 0 = titlebar height
Hover delay 250 ms How long the pointer must rest
Fill the other zones with the other windows on Automatic fill after a click
Only show it when another window is open on Hide it with a single window

Known limits

  • KWin does not expose decoration button rectangles, so the trigger is the top-right strip of the window frame, not the exact glyph. This also covers client-side decorated apps (Chromium, GTK), whose buttons KWin cannot see.
  • Picking a layout with fewer zones than open windows leaves the extra windows where they are, possibly covered. Same as Windows 11.
  • Zones are set as window geometry, so KDE's shared resize handle between quick-tiled windows does not apply.

Development

./dev-reload.sh        # load the working copy into the running KWin
./dev-reload.sh hover  # same, and open the flyout once for a screenshot

Logs:

journalctl --user -f | grep snaplayoutshover

License

MIT, see LICENSE.

About

Windows 11 style Snap Layouts flyout for KDE Plasma 6: hover a window's caption buttons

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages