Remix.run Logo
bashtoni 3 days ago

One thing I love about Hyprland (and Sway, which I was using before it) is the ability to have a key-combination which takes me straight to where I want.

Is this possible on Niri, where the virtual desktop expands infinitely?

gorgoiler 3 days ago | parent | next [-]

Not OP, but my take on this from using i3/sway for years was realizing that I often had two kinds of windows open.

Important long lived ones would be on workspaces where I could jump to them by number. I would have sound mixer and music on 1, mail and instant messaging on 2, browser on 3, then dev stuff or admin tasks etc on 4+. These would stretch horizontally, of course.

What I found was the “+” in “4+” could often be quite a lot of windows. I might have to reference some PDF in order to fill out a form in another PDF, and open a new browser window to manage some other reference document, and screenshots for the final draft, and terminals for taking temporary notes, maybe an image editor to trim screenshots, etc.*

With niri, I still have the “1234” layout but these are now rows with keyboard shortcuts. The ad hoc windows that get pushed onto and popped off my mental context stack grow rightwards… as a stack!

For me, niri’s brilliance is giving me those two axes. Known topics with keyboard navigation on the vertical axis. Ad-hoc tasks within each topic on a push/pop context stack on the horizontal axis.

*Ironically, these multi-window tasks were always the most mundane! Form filling for a mortgage application, say, or managing a report review for multiple authors. Software engineering — one of the more complicated things one can do on a computer, is all very neatly contained inside an IDE / tmux+vim+sh.

bashtoni 2 days ago | parent [-]

OK, this sounds interesting enough for me to give it a try. I actually think the two axis approach would work well for the way I work.

chills 3 days ago | parent | prev | next [-]

In addition to sibling commenter, niri exposes everything over an IPC accessible via its cli (or a socket), so if you wanted, say, a keybind to switch to your terminal, no matter where it is, you could bind it to this:

  niri msg action focus-window --id $(niri msg --json windows | jq '.[] | select(.app_id=="foot") | .id')
boomskats 3 days ago | parent [-]

Nice! I have a jq/ipc based abomination of a run-or-raise equivalent that works spectacularly well, including cycling windows in order. I keep saying I'll stick it in a repo.

yencabulator 2 days ago | parent | prev [-]

Niri has workspaces. By default they're dynamic and removed when left empty, but you can name them (in config or on the fly) and they become permanent. My current workspaces are

  1: notes
  2: browser
  3: code
  4: mail
  5 onward: dynamic or named on the fly