logoalt Hacker News

_rousboundtoday at 8:25 PM2 repliesview on HN

For people that went from i3wm to Niri, I would love to be convinced.

Being a i3wm(now sway) user, I tried Niri but found the following points a little bit uncanny:

- (Cropping) Sometimes when I scroll by shifting focus, a little bit like 10% of the window I pushed to the left keeps appearing. I tried to configure Niri in such a way that never a tiny fraction of a window be cropped but couldn't manage. Not sure I missed some config though.

- (Scratchpads) No scratchpads. There's workaround that I saw using extension scripts, but felt cumbersome to use(not the script itself, I just wished it was native feature on Niri). I use scratchpads a lot for "global" apps like email, discord, obsidian so I can open them on any workspace I am at, then make them disappear completely after.

- (Spatial Memory) By being used to i3wm I am comfortable pushing different applications so they can fit on a single screen. In i3wm i have "perfect vision" of a workspace. Niri style keeps me "forgetting" what's to the left and right. I know I can zoom out, but feels like friction upon my short term memory.

I would love to receive any suggestion so I overcome these points that I stumbled upon. Soon I might be trying Niri again on a more work environment(my first try was on a PC connected to TV, so more media focused usage).


Replies

nickjjtoday at 10:01 PM

=== SCRATCHPADS ===

I've avoided needing them because of 2 niri features:

- You can quickly tap alt+tab to focus the last previously focused window (assignable to a custom bind if you want)

- niri's CLI is very easy to work with so you can build a general purpose "launch or focus" shell script in a few lines of code

If you have something like Discord or any app you want to only be opened once, you can "launch or focus" it and now it's running somewhere. Somewhere as in, you can control which workspace it's on at your discretion.

Then if you launch it again from anywhere, you'll jump right to it instead of launching a 2nd instance and you can tap alt+tab to go back to exactly where you were before.

A nice effect is after it's been launched once it never interferes with your existing windows since nothing is getting opened again.

I'm after the end result of "let me access this program quickly no matter where I am", it doesn't need to literally follow me around every workspace to do that.

The launch or focus model can be applied to GUI apps and also TUIs.

=== SPATIAL MEMORY ===

niri's overview gives you a holistic view of everything. Status bars can also show you which workspaces are in use (and even open apps if you want that).

In addition to that, certain launchers like Walker have shortcuts to let you switch windows. This means you're only ever 1 global hotkey away from seeing a list of every window that's open and being able to fuzzy find switch to it in a second. I use this all the time. If you're not using Walker you can build this in a few lines of code since niri's CLI gives you a list of open windows.

My dotfiles have both things set up https://github.com/nickjj/dotfiles.

zaiktoday at 8:52 PM

> pushing different applications so they can fit on a single screen. In i3wm i have "perfect vision" of a workspace.

What does this mean?

show 1 reply