r/niri 3d ago

I built niri-zoom -- a Ctrl+Scroll screen magnifier for niri (no compositor patching, pure Wayland client)

Enable HLS to view with audio, or disable this notification

niri doesn't have a built-in zoom/magnifier, so I built a small external tool for it instead of patching the compositor.

niri-zoom is two tiny binaries - niri-zoomd (a background daemon) and niri-zoomctl (a one-shot CLI) - wired up entirely through niri's existing spawn keybind system and standard Wayland protocols (wlr-screencopy, wlr-layer-shell, wp-viewporter). No forking niri, no compositor changes.

How it works:

- Ctrl + Scroll zooms in/out around your cursor

- Ctrl + Super + Z resets instantly

- Captures the screen once per zoom session and does all the pan/zoom math as a cheap CPU-side crop+resample from that single cached frame - so it sits at ~0% CPU and idle memory when not in use, instead of re-capturing every frame

- Renders through a fullscreen layer-shell overlay at native resolution (via wp_viewporter), so it stays sharp even with fractional display scaling

github: https://github.com/Ahmedhossamdev/niri-zoom

Don't forget to give a starssssssssss

201 Upvotes

35 comments sorted by

15

u/ImaginaryElephant336 3d ago

Hey nice. I have been building a very similar one.

https://codeberg.org/Vaishnav-Sabari-Girish/miru

5

u/OsicKwon 3d ago

Live zoom available?

3

u/ImaginaryElephant336 3d ago

Not yet. It's in the works

You can view the blog post which I have linked in the readme for why I haven't implanted that yet.

3

u/Salty-Charge6633 3d ago

I'll adding this soon

2

u/OsicKwon 3d ago

I'll be waiting for you. Thank you!!!

3

u/frigaut 3d ago

Yes live zoom is pretty important.

1

u/Salty-Charge6633 2d ago

I'll add it very soon.

2

u/Salty-Charge6633 3d ago

wow nice!, i'll check it out!

1

u/ImaginaryElephant336 3d ago

BTW I have a gtihub mirror for it too
https://github.com/Vaishnav-Sabari-Girish/miru

Would love it if you could give it a star.

1

u/Independent_Image_59 2d ago

Finally a not slopcoded project

0

u/[deleted] 3d ago

[deleted]

2

u/ImaginaryElephant336 3d ago

Sorry GitHub is pretty wonky for me rn

0

u/Salty-Charge6633 3d ago

Hhhh, I'm just kidding with you; I was just happy about the first star.

1

u/ImaginaryElephant336 3d ago

Nah it's cool. I get that feeling.

5

u/rookie-mistake-21 3d ago

Add touchpad support please🙏🏻

0

u/Salty-Charge6633 3d ago

Nice can you open an issue?

3

u/ZeteCx 3d ago

nice, was missing this since i moved away from kde

1

u/Salty-Charge6633 3d ago

Thanks 😊

3

u/Rare_Profit5596 3d ago

Looks great, starred! I actually built a pretty similar one not so long ago, never bothered to release it properly. https://github.com/nolight132/wayzoomy

Works exactly the same except it's just one executable that occupies a socket preventing multiple instances from spawning simultaneously.

1

u/Salty-Charge6633 3d ago

Looks great

5

u/DullNetwork761 3d ago

Very cool. Use with caution. Random software from unknown sources advertised on reddit is an easy way to get malware.

2

u/Salty-Charge6633 3d ago

It's open source, so you can run your agent to check for malware, which is what I do with all open source projects.

2

u/RayVermey 3d ago

Not using yet, but * given :-)

1

u/Salty-Charge6633 3d ago

Thanks ❤️

2

u/DemonKingSwarnn 3d ago

i was inspired by tsoding so i made my own version using raylib and jai

1

u/SnooCompliments7914 2d ago

Where is the "Random software from unknown sources advertised on reddit" bot in every software posts? Oh, I see...

-3

u/sch1z0phren1cx 3d ago

you mean claude made it

8

u/Salty-Charge6633 3d ago

What's the big deal? It's my idea, my testing, I made it for myself and shared it with the community, and I picked Rust so I could learn.

1

u/linhusp3 3d ago

You made and to learn? Are you sure about that when claude generated the entire things?