User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
5mo
niri can now include the mouse pointer on window screenshots, a feature that had several more edge cases than I thought before starting to work on it (and it's likely not the ones you think, those ones were easy)

3
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
5mo
Merged another long time overdue niri PR: mouse cursor via metadata in PipeWire screencasts (lets you toggle Show Cursor on/off in OBS), and full mouse cursor support in window casts.

The cursor is visible only when the window is receiving mouse events—if you're moving the mouse on top of something else covering the target window, the cursor won't be (unintentionally) painted.

Thanks
@abmantis for driving this, including debugging a memory bug in PW!

2
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
5mo
Working on a screencast IPC for niri. The idea is to give info to desktop bars to be able to add a screencast indicator whenever something is recording the screen.

Got it hooked up for both PipeWire (obviously) and wlr-screencopy. For the latter there's no good way to tell if something is a screencast so I went with some heuristics.

Here's the icon working on the DMS bar, as well as a popup with the full available info I made for debugging.
blobcat

4
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
5mo
Oh right, for PipeWire I can send the node ID, which DMS can then use to fetch the consumer application name!

1
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
5mo
The screencast IPC is now merged: yalter.github.io/niri/niri_ipc/struct.Cast.html

2
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
5mo
Also added niri msg action stop-cast to force-stop a PipeWire screencast

3
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
working on my new visual style

7
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
So yeah, I'm working on blur for niri. I'm doing "xray blur" first where the idea is that you only include background surfaces, so you pretty much never have to redo the blur—next to zero perf impact unless you have a video wallpaper or smth.

Turns out that it's quite tricky to do well, especially with our Overview. I'm like on my third refactor attempt now but I think I've got a good approach.

During this video there's no reblurring whatsoever, all just drawing cached static textures.

9
2
2
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
Added non-xray blur, based on @drakulix's Smithay/COSMIC implementation.

Keep in mind this blur work is still extremely WIP and with many issues (some visible on the video). It's also still not entirely clear to me how to best structure the code around it in niri. We'll see

5
3
2
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
Alright, getting somewhere! I think I've figured out a good code structure for the xray blur. It now correctly works even inside offscreens (opening animation, and when you drag a window targeting the tiling layout), and it should also work properly with the upcoming screen magnifier (that we have in pull requests).

Still not a single blur re-render in this entire video!

4
1
2
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
you know it's serious when you have to pull out a notebook to figure out the coordinate transforms

3
1
2
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
Today, got xray working on the closing window animations. The reason this needs special treatment is that when a window closes, niri renders a snapshot of its last visible contents to use for the animation. This happens outside the normal rendering path so I needed to thread through the xray background rendering logic as well as the correct window coordinates (since the xray background needs to know where the window is to draw the correct thing).

3
2
2
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
Today: implemented (a limited but useful subset of) both ext-background-effect and org-kde-kwin-blur protocols. Clients use these to request blur on their surfaces without having to configure anything in the compositor. These protocols also allow clients to blur only parts of their surfaces, for example here excluding client-side decoration bars and shadows.

Here are three terminals all with their org-kde-kwin-blur setting enabled.

❤️1
3
0
1
1
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
I moved the niri repo from my personal GitHub to a new org: github.com/niri-wm/niri

I set up a redirect for GitHub Pages, so hopefully all old links keep working

The primary reason to move to an org is giving granular repo permissions, e.g. let Semper triage and manage issues (who's been doing a fantastic work helping with issues, thanks a ton!). This is unfortunately only possible in organizations and not in personal repos

We'll also add more related repos like awesome-niri to the org

2
0
1
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
Niri can block out windows from screencasts. This must work with all other niri features, including background blur. When the window itself is blocked out that's easy, but what if something in the background layer is blocked out?

Certainly turned out to be one of the trickiest pieces of logic to properly support this. Especially the window closing animation which renders a snapshot of the last visible window contents.

2
4
3
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
(the passwords thing here is intentionally on the Background layer, so it's included in the xray blur contents)
1
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
Note that closing a window in the middle of the opening animation takes that exact frame of the opening animation and runs the closing animation using that frame, and blocking out works correctly through all these layers of offscreening and snapshotting
2
0
0
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
I've now implemented proper full region support for ext-background-effect and kde-blur protocols. Clients can use this to shape blur to their rounded corners for example.

Here's the Vicinae launcher [1] that added ext-background-effect support in their last release, with rounded corners and background blur on niri with no extra configuration.

[1]:
github.com/vicinaehq/vicinae

1
0
1
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
niri has reached 20k stars on GitHub! apartyblobcat apartyblobcat

pretty wild tbh

thanks everyone for support!
ablobcatheartsqueeze

6
3
5
0
User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
Alright, I've finished most of the things that I wanted to finish, so I created a pull request for background blur in niri: github.com/niri-wm/niri/pull/3483

Please give it a good test and tell me if anything's broken!

6
2
2
0
User avatar
pancakes nonbinary_cat @pancakes@meow.company
4mo
@YaLTeR i tested it briefly in a niri winit session with kitty
i wasn't personally bothered by the 1st and 3rd listed limitation of non-xray mode
it may be worth mentioning in the docs that some programs have blur disabled in their own settings by default. when i first opened kitty there was no blur and i thought it wasn't working properly
otherwise good work
1
0
1
0

User avatar
Ivan Molodetskikh @YaLTeR@mastodon.online
4mo
@pancakes done
0
0
1
0