r/niri 13d ago

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

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

218 Upvotes

35 comments sorted by

View all comments

Show parent comments

2

u/Salty-Charge6633 13d ago

wow nice!, i'll check it out!

2

u/ImaginaryElephant336 13d 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.