# Niri Window Manager


<img src="/images/niri-logo.svg" alt="Niri" width="100px"
style="float: left; margin-right: 10px; margin-bottom: 10px;" />

There I was: happily using Hyprland and BAM! Brodie Robertson shared
[a video about Niri](https://www.youtube.com/watch?v=r0JUm77inIA) -- a
scrolling window manager. It looked weird but intriguing, so I installed it.
My plan was to see what it was like and go back to Hyprland. But we all know
that's not what happened.

## Background

I've been using tiling window managers for a long time now. Back in late late
2000s/early 2010s, I was introduced to dwm. I ran dwm on my OpenBSD laptop
for several years while also playing around with awesomewm, spectrwm, and cwm.
Then I used a Mac for a while. But when I switched to Linux, I started using 
Ubuntu and its default environment, Gnome. But there were some things I didn't
like about Ubuntu, so I switched to Fedora, still using Gnome. But after a
while, I switched over to Fedora's KDE Spin.  Again, though, I wasn't too
happy with Fedora and I found out about [Arch Linux](/technical/arch-linux/).
Also, I really missed the keyboard-driven goodness that is a tiler.

<img src="/images/qtile-logo.png" alt="Qtile" width="100px"
style="float: right; margin-left: 10px; margin-bottom: 10px;" />

## Qtile

When I installed Arch, I spent some time trying to find a window manager I
liked (bspwm, xmonad, dwm again) and ultimately settled on
[Qtile](/technical/qtile/). I spent a lot of time customizing Qtile and was
very happy with it for years (just over 4 years). But the news recently
about Xorg's future scared me into checking out Wayland. I don't have a
specific article about Xorg in mind, but the news in general. I had tried to
get Qtile working with Wayland in the past but my understanding was that Nvidia
drivers were not supported under Wayland and Qtile just did not work for me,
so I assumed it was Nvidia/Wayland.

But a friend told me he was using Wayland with his Nvidia card no problem so
I tried one more time and after more research, saw that Wayland support for
Qtile is experimental (and they had not implemented some security/locking
protocols that I depended on to lock my screen).

<img src="/images/hyprland-logo.svg" alt="Hyprland" width="100px"
style="float: left; margin-right: 10px; margin-bottom: 10px;" />

## Hyprland

So I was in search of a new Window Manager to run under Wayland. I tried Sway
(having oddly never tried i3) and liked it. But then I saw the sexiness that
is Hyprland. It has fancy animations and looks very modern when pairing it
with a nicely configured Waybar. I spent a while getting Hyprland working
exactly how I wanted (pretty much how I had Qtile working) and made the switch
full-time. I actually really LOVE Hyprland. The IPC (command-line) interface
is very powerful and makes the whole experience with Hyprland very flexible.

<img src="/images/niri.svg" alt="Niri" width="200px"
style="float: right; margin-left: 10px; margin-bottom: 10px;" />

## Niri

But then Brodie posted that video about Niri. As I said, I decided to try it
out and really, REALLY liked it. But in my little bit of research, there
were a few things that didn't work the same as Hyprland that I thought were
deal-breakers.  So I went back.

But every time I created a new window in Hyprland, I wished it was scrolling.
I spent some time trying to make Hyprland work like Niri with Hyprscrolling,
but it wasn't the same.

So I just switched. I abandoned my beautifully working Hyprland environment
for something that just did not work the way I wanted -- all for some sweet,
sweet scrolling!

### Scratchpads

It didn't take me long to get Niri working for me. The biggest thing is that
I utilized scratchpads for my frequently used applications.  For instance,
in Hyprland, I had the Signal Desktop application launch into a scratchpad
that I could easily toggle with a keybinding. So, I'm in Librewolf on my
second monitor, third workspace, I press Super+Shift+A and Signal pops up over
Librewolf.  Super+Shift+A hides it again.  It was beautiful. I used that
set up for Bitwarden Desktop, a Scratchpad Terminal, Yazi (a terminal-based
file manager), my volume control (pavucontrol), my bluetooth manager (blueman),
and a couple other apps.

But Niri does not have scratchpads. So I
[wrote a script](https://git.erdelynet.com/mike/dotfiles/src/branch/main/.local/bin/wm-minimize)
that sets aside a workspace just for "Scratchpads". Instead of showing/hiding
a workspace, now I just send the Signal Desktop window to my "Scratchpad
Workspace".  When I want it back, it changes to a floating window and shows on
my active monitor. Basically the same as scratchpads.

This works because with Niri, I don't actually use any workspaces anymore. I
mean, I use the main one.  And now a second one for "Scratchpads", but I
basically just let new windows scroll to the right as they come up and it's
awesome.

### Configs

You can see my [Niri configs](https://git.erdelynet.com/mike/dotfiles/src/branch/main/.config/niri/config.kdl)
along with other scripts and configuration files I use to make Niri be magic!

## Conclusion

Have you tried Niri yet? Let me know

