taj-ny / kwin-effects-forceblur

Blur any window on KDE Plasma 6
GNU General Public License v3.0
107 stars 7 forks source link

Update to Plasma 6 #7

Closed D3SOX closed 3 months ago

D3SOX commented 3 months ago

Can this be ported to Plasma 6?

taj-ny commented 3 months ago

Yes, I'll start working on it later today. I'll also try to make it a plugin instead of a fork.

D3SOX commented 3 months ago

Sounds great, thank you! Really missing this after upgrading from 5.27 (X11) to 6.0.1 (Wayland)

taj-ny commented 3 months ago

The blur region can be specified in the kwin_blur property of QWindow and that would be the best approach, since it would also work with any fork of the blur plugin, such as LightlyShaders. I spent a few hours trying to set it but it just wouldn't work for some reason.

if (auto internal = w->internalWindow()) {
    internal->setProperty("kwin_blur", w->rect().toRect());
}

https://github.com/KDE/kwin/blob/1ddcb4e288c4f7dcecdc94efccd655b7e3666d30/src/plugins/blur/blur.cpp#L242

So I forked the whole blur plugin instead. The plugin is called Blur+ and can be found in Desktop Effects. Any other blur effects should be disabled, otherwise blur may be applied twice.

I've pushed it to the plugin branch, but it's still work in progress and decoration blurring doesn't work yet. I also only tested it on 6.0.0, since 6.0.1 isn't available yet in nixpkgs. For building instructions see https://github.com/a-parhom/LightlyShaders/tree/plasma6.

D3SOX commented 3 months ago

Works perfectly fine for my usecase (on 6.0.1), thank you!

D3SOX commented 3 months ago

I created an initial AUR package as I don't like when something isn't managed via package manager

taj-ny commented 3 months ago

Here are the changes I've made recently:

taj-ny commented 3 months ago

https://github.com/taj-ny/kwin-forceblur/releases/tag/v1.0.0

D3SOX commented 3 months ago

Great work, will update the package accordingly

D3SOX commented 3 months ago

Updated the git package and created one for releases: https://aur.archlinux.org/packages/kwin-effects-forceblur

taj-ny commented 3 months ago

This effect doesn't conflict with LightlyShaders. LightlyShaders provides two effects: a fork of the blur effect that doesn't have the corner bug (this is the one it conflicts with), and an effect that rounds the corners of the window (no conflicts with this one).

D3SOX commented 3 months ago

Thanks for the heads-up, will remove the conflict