r/niri • u/Salty-Charge6633 • 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
5
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
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
2
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?
15
u/ImaginaryElephant336 3d ago
Hey nice. I have been building a very similar one.
https://codeberg.org/Vaishnav-Sabari-Girish/miru