logoalt Hacker News

nickjjyesterday at 10:01 PM0 repliesview on HN

=== 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.