quickshell icon indicating copy to clipboard operation
quickshell copied to clipboard

Niri Support

Open Rikiub opened this issue 6 months ago • 6 comments

Niri is a scrollable-tiling windows manager for wayland. Actually it exposes a IPC which can be used.

Would be like an API similar to QuickShell.Hyprland, but for Niri.

Rikiub avatar Jun 07 '25 01:06 Rikiub

An API implementation is possible, however I will not write it personally. I would accept an implementation however I would rather niri implemented a more general IPC mechanism.

To that end I've created a set of wayland protocols that I hope to get compositors to implement in the future to end the per compositor ipc mess for all involved parties at once.

I'm still waiting for @yalter to review the relevant protocols but have someone willing to implement them in niri.

outfoxxed avatar Jun 07 '25 01:06 outfoxxed

The first step, ext-workspace support, is being worked on in niri https://github.com/YaLTeR/niri/pull/1800. Similar work is happening on Quickshell's end as well.

Following that we've mostly finished the design of the workspace creation protocol. Both of those combined brings us to basic support for normal workspace operations.

outfoxxed avatar Jun 17 '25 10:06 outfoxxed

@outfoxxed looks like that has been merged!

domenkozar avatar Aug 25 '25 21:08 domenkozar

Hey folks, I'm interested in having support for niri in Quickshell as well, and understand @outfoxxed's decision to postpone this until some generic Wayland protocols are implemented, which is a good long-term plan.

But since this will inevitably take time to complete, in the meantime, niri users interested in Quickshell don't have a good solution. There's DankMaterialShell, which does support niri, but this is done in QML by shelling out instead of using IPC, which is not ideal. And DMS does too many things I'm personally not interested in.

So I took some time over the weekend to put together a proper QML plugin for niri that uses IPC. I'm sure it's not perfect, but it works well for my simple needs. You can see aditional examples here.

I don't expect interest in merging this into Quickshell, given the planned way forward, and since it can be easily used standalone. There likely won't be any need for this project to exist once the generic Wayland protocols are implemented. But before that happens, hopefully it's useful to someone else as well :blush:

Thanks for your work on Quickshell! :bow:

imiric avatar Oct 13 '25 10:10 imiric

this is done in QML by shelling out

Not really, they listen to the niri event stream properly: https://github.com/AvengeMedia/DankMaterialShell/blob/a17343f40e2c2788d775aef08e55f73ce6e20ae2/Services/NiriService.qml#L154

YaLTeR avatar Oct 13 '25 10:10 YaLTeR

Ah, well, I misread that then... I saw that they do shell out for getting the outputs, and write some niri configuration, which I don't need.

I'd also like this to have other features as well, so hopefully it wasn't a complete waste of my time.

imiric avatar Oct 13 '25 11:10 imiric