Niri Is My New Favorite Wayland Compositor

Download information and video details for Niri Is My New Favorite Wayland Compositor
Uploader:
Brodie RobertsonPublished at:
6/16/2025Views:
10.3KDescription:
Video Transcription
So the other day I put out a video on the general Linux scrolling model.
This is a subset of tiling where the windows still tile, but not in the same sense.
They go next to each other, but we also have a infinite horizontal plane.
Now I know this is not a model for everyone, I totally get that, but I have been really, really liking this.
And today I want
to do a video less on the model itself, more on the desktop I've been using, that being Niri.
Now, for anyone who missed it, Niri is based on the Smithy library, the same library being used in the upcoming Cosmic Desktop by System76.
But for the portal, the desktop portal, the thing to do things like screen sharing and other fun things like that, that makes use of the GNOME desktop portal, which...
Initially seems odd, but the creator of the project, Yolter, also works on the GNOME project, knows how the GNOME portal works, so even though it seems weird, with that context, it does make sense.
Now, unlike various other parts of the stack, I don't really have an issue with the GNOME portal itself.
It's as functional as KDE's, it's far more functional than what WROOTS has, it's about as good as COSMIC's,
It's totally fine, but they are starting to run up to issues with sort of pain points where they want to have a custom portal implementation, so that isn't really out of the question.
And with that stuff out of the way, here we have Niri.
Now, I'm not gonna talk a lot about default keybinds as...
I like to change mine.
I don't really like all the ones out of the box.
If something is weird and maybe interesting, I might mention it.
But I'll save that stuff maybe for another time.
I don't know.
But I will show you the configuration file.
This is in the .config directory in a
folder called niri and then config.kdl.
So as I mentioned different functions you can do and things like that, I'll show you it in the config file itself.
Now as for KDL, you probably haven't heard of that format before.
It's a pretty lightweight format.
It doesn't have any weird like
syntactic sugar that makes it complicated to understand, if you look at this for about five seconds, I think you'll work it out pretty easily.
Now, when I spawn a window, as an example, Alacrity, it doesn't take up the entire screen.
Even though we have infinite space, I could very easily have it do that, and that is something that can be configured.
Now, as for spawning the window itself, this is done with the spawn command.
This is if you want to have a hotkey to spawn a window.
We can also go and set a hotkey overlay title.
So the overlay is this thing right here.
It shows you a bunch of bindings that you think are important.
Now, I never look at this.
It can be very heavily configured if you want to go read the documentation.
And if you want to make sure it doesn't open when you actually...
open the desktop itself you can go and set this option right here hotkey dash overlay skip at startup otherwise every time you restart niri it is going to show you the overlay now when you open a window it does go away so it's not that big of a deal but i never look at it anyway and yeah i don't i don't really find it that useful at least for me
but some people do like it.
Whilst this is the current size of the window, it doesn't have to be like this.
Like most desktops out there, if we go super and then right mouse, we can go and resize with the mouse, but we're on a tailor and we like to have hotkeys for things, so there's better ways to do this.
The switch preset column width is very useful.
So if I press that, it's going to automatically resize the window to various sizes I have preset.
Those sizes are located in the preset column width.
Now,
the config file includes a lot of preset documentation so if you don't really like it you can just go and remove it but if you want to have this be say one of those sizes to be a quarter that would be 0.25 or you want it to be some other stupid size you can set it to be whatever you want or you can even set it to be a fixed size there is also the set column width which either takes a set value or a negative or a positive value
So if we go and resize with that one, that's another thing you can do.
And you can even make it bigger than your screen itself.
Remember, you have an infinite horizontal plane.
I don't really like keyboard resizing, and frankly, I'm probably going to remove it.
And like most good desktops, there is a separate option to maximize the column.
This is maximizing.
And a separate option to full screen it.
If we do that one, it looks like that.
Now, of course, in browsers and video games and things like that, full screen and maximize are often going to act in very different ways.
For something like a terminal, though, it frankly doesn't matter.
And most of the time, I just use maximize.
I just like to have the borders there.
It's just the way I like to do things is, you know, do it the way you want to do it.
And if maybe you've done something like this where you've resized another window and the proportions you've got preset can't really get you to a full screen, what you can do is expand column to available width.
If we run it on this window, now we've taken up the full screen.
So far, I've been changing focus using my mouse, and this is something I like to have the option to do.
I also like to have focus follows mouse.
This I always have enabled.
But because we have this weird infinite scrolling plane, there can be situations where there's like...
portion of a window on the screen so you want to have control over whether it does a jump to that window or it doesn't I like to have jumping but there's a weird case where if there's like a tiny it's it's something like this and there's like a tiny sliver of the window visible but not really visible it's
If you want to make sure that doesn't happen, go and set this to something like max scroll amount 95% and it should go away.
But if you just don't want to do this, if you want to make it so it will never do a jump like this and it will only focus on things that are...
actually visible, unless you go and click on the window, set this down to 0%.
And of course, like any good environment, you have the option of keyboard control as well, with the focus column and a direction, or focus window and a direction.
Now, why is there a separate thing called a column and a window?
This is very important.
So we don't just have to have windows directly side by side.
If I use my super key and then drag a window, I can either move it to a different location,
along the columns, or I can put it below this window.
Okay.
I'm not sure why I had started at that size by default, but whatever.
We can make multiple windows in a single column as well.
So of course, you also have the option of moving windows with your keyboard as well.
That works the same way it's going to work on basically every single tile out there.
Nothing too crazy there.
And of course you can add and remove windows from a column using your keyboard.
Now by default mod plus comma and mod plus period are not set to consume or expel window left and right.
One of them is set to consume and the other is set to expel and then these came from a different set of bindings.
I don't like the default bindings whatsoever.
This is way better because now I can go and add that into a column and then take it out using the exact same binding.
This makes so much more sense to me and I would recommend everyone do the same.
Now when we have multiple windows in a column like say this right here, there is something else we can do.
Toggle column tabbed display.
If I press that, now those windows have been merged together.
But the other window is not gone.
Now, if we go and change focus up and down, we have a tabbed view of those windows.
This can be useful if you want to have, say, let's say you have this right here.
This is your development environment.
And then this here is your documentation.
And you can just easily cycle back and forth.
Now, of course, there are other ways you can do this, but...
It's a nice thing you can do.
It's just a really cool feature that I hadn't really used before because I don't really use tabs, but here we have tabs built directly into the environment.
And whilst we do have this infinite horizontal plane, when you have a lot of windows, this gets very inconvenient very quickly.
So, of course, we do also have access to workspaces as well.
That's going to be your standard bindings by default.
If you want to change to something else, it is the focus workspace.
And you can also have named workspaces as well.
If that's something you like to do, I just generally use numbers.
And whilst this is a tiling adjacent environment, like tilers, we generally also have option to floating windows as well with toggle window floating.
Now, the floating windows are going to be more limited than what you have in something like KDE.
As an example, you don't have window snap and release.
I don't know of a way to enable it, but we can go and resize the window like we can as a regular window.
You can use the key bindings for it if that's the thing you want to do.
And, you know, they just work like floating windows.
I don't really use them that much.
Mainly it's just for the video notes and other things where I'm streaming, making videos, things like that.
But my day-to-day stuff, mostly just doing tiling.
One thing I will say though is when you open up a game in Steam, I would recommend either putting Steam on a separate workspace or making Steam float just so it doesn't do any weird tiling with the game window because some games can be a bit funky with that and require you to go into settings to change resolution and nobody wants to deal with that.
Also, by default, decorations will not be disabled.
I like them disabled in a tiling-like environment, so set prefer no CSD, and then everything is gone.
One important thing I skipped over in my prior video is the window overview on toggle overview.
Now, this is actually really cool and might be one of my favorite overviews I've ever seen.
In this state...
Our keys still work, so I can change window focus in this.
I can spawn windows just fine.
I can move those windows around.
I can close windows.
I can even go and drag that window and put it onto a different workspace.
I don't know why they went this hard with the overview and made it so you can just do everything you can normally do.
but I do really like it.
KDE is dumb.
GNOME is dumb.
COSMIC is dumb.
This is so much better than every other desktop I've ever seen.
Just copy this.
Just get rid of whatever system you're currently using and just
Do this!
It is so much better!
Also, something kind of neat, and not really necessary, is Niri has a built-in screenshot tool.
Now, there are other screenshot tools out there, and you can go and use that, but if we go and press, in my case, Shift-Print, we can go and select whatever I want to screenshot, all this stuff, and we can go and save it.
Now, if you want to go and change the name of the file, it is with the screenshot path option here.
Does it need a built-in screenshot tool?
Not really.
Is it nice to have and not have to dig around and find one that works?
Yeah.
And it's not, look, it's not the most complicated screenshot tool.
It isn't Flameshot, anything like that.
but it does the job.
Now I want to shift gears and talk a bit about customization.
My setup is pretty, pretty straightforward here.
I've not really done anything that crazy.
So let's go over to the wiki.
Now I will say one thing about the wiki.
I do not like GitHub Wiki.
I think it is one of the worst pieces of Wiki software ever created.
It is so bad for the user.
It might be fine for the developer.
And this is nothing against the project itself.
This is just a bad tool that's being used that is like built directly into GitHub.
Because there's no way to search the contents of pages.
We can search for a page.
But...
This is just not exactly that useful.
Unless you know what the option you're looking for is called, which that will make it easy, you can search for that.
If you don't, and you're trying to like fiddle around, trying to find things, it's a bit of a mess.
Anyway, not important.
If I could change it to something else, I would change it to literally anything else, but again, not that important.
Now, there are some really cool features you can do with this, which I haven't really seen anywhere else.
The most notable one is with screencasting.
So you know how on Windows, it'll use, like, DRM to block out windows they don't want you to capture?
Well, in this case, you can choose windows you don't want to be captured.
So if you don't want to have your secrets be shown, your Bitwarden, your whatever other thing that you might be running that you want blocked out of a video...
That can be done directly at the compositor level.
You also have access to an IPC system.
So all of those things we could do inside of the config file, whether that be spawning application or moving a window, anything like that, that can all be done with Niri Message.
And this is entirely scriptable.
This is really cool and is a thing in things like I3 and Sway and plenty of other environments.
But I always like to see it because what it lets you do is...
make the desktop do things that aren't obvious from the configuration.
You can combine certain actions to do things that otherwise would not be possible.
Let's say, for example, you want to go and merge these into a column and then automatically make it tabbed.
That's just two separate actions and that's really easy to do through this system.
There is also full animation configuration.
Now, I'm not really playing around with it that much.
This is just how it looks out of the box.
If you don't like the animations, they can all be turned off.
That's just like an option right here.
You can just disable everything.
Or you can go and configure exactly how they feel and the kinds of animations you want to be using and all of this sort of stuff.
This is always nice to see.
I like that Hyperland kinda made the idea of animations on Weyland a lot more important in the window manager environment, because before that, there weren't really that many things that took it that seriously.
When Sway was the main option people recommended,
Sway's kind of boring in that way.
Of course, you also have window rules, but there is another thing called layer rules.
I would like there to be a good explanation of what a layer shell is here so users understand how they can configure it, but a window rule is for your regular windows, like this browser window, like Alacrity or anything else you want to be using.
That's what you configure for that.
Layer rules, this is for things like your launcher, like your bar, like your wallpaper, things like that.
Once you know which is which, it's pretty easy to know which thing you should be using, but at least initially it can be kind of hard to work it out.
Now, maybe based on the examples that are here,
you can kinda piece together things.
But again, I think a brief description here would go a really long way.
Now, as for your more general styling, like your window borders and things like that, that is gonna be under the layout section.
So this is where you control things like gaps, your preset column width, like your focus ring, your border.
These are two separate things.
So the focus ring and border kinda act in similar ways on a single screen.
With two screens though, one's gonna behave slightly differently.
But if you like the idea of double borders, it does let you do that.
Now, I just use a single one because for me, it just doesn't really make any sense.
Also, with shadows, we don't have to have a black shadow.
If you want to have a green shadow...
It'll look terrible, but like that's the thing you can do.
Also, with the tab indicator, that is fully customizable as well, which is very, very good to see.
Also, the insert hint is this one here where I drag the window around.
Struts are kind of confusing.
Struts are...
kind of extra gaps around the edge of the screen, if that makes sense.
So there's gaps between windows and then struts around the edges.
But the most important thing is X-Wayland support.
Ignoring all the niceties, X-Wayland support is very important.
And you may have heard, X11 is very cursed, so built-in X-Wayland support is not planned at the moment.
But, as I mentioned, I'm playing games on Steam.
I'm not using the Wayland version of Wine because it's kind of... still kind of buggy.
And I can run things like, uh, like X-Eyes.
I wouldn't recommend it, but you can do it.
So, the way that I've done this is using something known as X-Wayland Satellite.
So, over in my configuration, if I search for that one right here...
At startup, I spawn X Wayland Satellite and also set my display to zero.
This is the number for the X11 display.
And by doing that, if you have a different X11 display, if you may be running multiple X11 servers, the number will be different.
But in most cases, you're just going to have the single one.
So zero is the correct number.
And with this, basically whenever I open an X11 window, it just goes and opens the window like you would normally expect.
That is the best and simplest way to do it.
If you want to do other things like using LabWC as a nested compositor, or using GameScope, or using like a rootless X-Wayland window, all of that stuff is, oh sorry, root full X-Wayland window, all of that stuff is documented here as well.
And just because I think it's kind of interesting, I might do a dedicated video talking about these different methods and various other methods you can have X Weyland support without actually having X Weyland support.
Now, this won't be the case for every environment, but in the case of Cosmic, in the case of the very in-progressed Weyland support for things like Cinnamon and XFCE...
you have the option of running a custom compositor, and Niri is using all of those standard protocols, has a lot of those WROOTS protocols implemented, so you can actually use Niri embedded inside a Cosmic, and actually have the Niri experience, but also have all of those niceties of a desktop environment as well.
Keep in mind, not everything is going to work, you might have to do some fiddling around to get things to play nicely, but like on X11, where you could do that, that's a thing here as well.
In the case of GNOME and KDE, things are a bit more tightly integrated, but both of those do have their own scroller plugins anyway, in the form of PPWM for GNOME and Carousel for KDE, so it's not as big of an issue.
On the X11 side of KDE, you were actually able to swap out the window managers you use, it's just not something they kept around going into Wayland.
I have only scratched the surface here.
There is a lot more you can do, a lot more fun to be had.
And if you want some examples, there are plenty of examples out there on Unixporn, on various places out there.
Check out what other people are doing in their config, how they configure their waybar, how they configure other bars, how they just configure Neary in general.
And if you want to go and try it out for yourself, it's available in a lot of places.
Basically, if you have a Linux distro, it's probably going to be there.
It might be out of date in a couple of them.
But at most of them, no issue at all.
And as it is a Rust project, building yourself isn't that difficult.
So that is something you can do as well.
And yeah, I really like Neri.
I think it's a really cool project.
I actually have been daily driving it and I've actually enjoyed configuring an environment again.
It's something I haven't really enjoyed for quite a while.
It's something I've just kind of left behind, but...
It really feels like I'm back to my roots on Linux, trying out something kind of niche, kind of fun.
And hey, if you want to play around with it yourself, that's awesome.
And I highly, highly recommend it.
So if you like the video and you like Neri, be sure to subscribe and like that video and all that fun stuff.
If you really like the video and you want to become one of these amazing people over here, check out the Patreon, Scribes, LiberoPay linked in the description down below.
That's going to be it for me and...
Time to scroll away.
Similar videos: Niri Is My New Favorite Wayland Compositor

I Have No Idea What Mozilla Is Doing Anymore

Fiyat/Performans Canavarı 15.000 oyunlu Retro Konsol İnceleme ! RG36S

GTA 5 Remastered Real Life Weather With Realism Lighting Gameplay On RTX4090 Maxed Out Settings

Run Your Own FARMERS MARKET in The Sims 2!

Scrolling Window Managers Are My New Best Friend

