Omahub
← All plugins
A

Caliper

by Angus McRitchie

Freeze the screen, measure any gap, sample any pixel, and copy the colour or the distance without leaving your work.

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
aa018de
Scanned
1 month ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

None
AI risk level
None
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
aa018de
Reviewed
1 month ago

The plugin is a screen measurement and color picker tool that captures the screen and provides pixel-level readouts. The code is transparent, uses standard system utilities (grim, ImageMagick, jq, wl-copy) for its intended purpose, and contains no obfuscation, network access, persistence, or destructive operations. The deterministic scan found no issues, and manual review of the provided source reveals no dangerous behavior beyond the expected screen capture functionality.

  • The plugin captures the screen, which is a privacy consideration, but this is clearly the intended function and is disclosed in the README.
  • The use of a bash subprocess with `dd` and `od` to read pixel data is unconventional but not a security risk as all inputs are internally generated and numeric.
How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/angus-mcritchie/omarchy-caliper --enable
Developer Tools #Hyprland #quickshell

Caliper

Freeze the screen, measure any gap, sample any pixel, and copy the colour or the distance without leaving your work.

Press the hotkey and the desktop stops. From that moment you are working on a still image: a crosshair that snaps to edges, a magnifier showing individual pixels, and a drag that measures. Escape puts everything back.

Why freezing matters

A measuring tool that works on the live screen has to fight the compositor for input, and anything under the pointer can move while you are reading it. Caliper takes one capture, shows it fullscreen, and measures that. Nothing moves while you work, and the interaction is simple enough to be exact.

Sharp freeze, sensible numbers

The capture is taken at native resolution, so the frozen desktop is pixel-sharp and a sampled colour is the true colour on screen rather than a resampled approximation of it.

Positions and measurements are reported in logical pixels, which is the unit you would write in a stylesheet. On a fractionally scaled display a 24px gap reads as 24, and the device-pixel figure is shown alongside it so nothing is hidden from you.

Capturing at logical scale instead was tried, and it makes the whole frozen desktop visibly soft: a 2880-wide capture drawn onto a 3840-wide panel. Sample in device pixels and convert for display; do not capture small.

Edge snapping

The crosshair looks up to six pixels around the pointer for a luminance step and lands on the nearest one. Placing a measurement by eye is a pixel or two out every time, and a pixel or two is the whole difference between 24 and 26. The nearest strong edge wins rather than the strongest in range, so the boundary you are pointing at beats a harder edge further away. Press s to turn it off.

Colour

The readout is the exact captured pixel, not an interpolation: hex, RGB, and position. Press p on one colour and then hover another to get their WCAG contrast ratio and whether it passes AA or AAA, which is the number an accessibility review will actually ask for.

Keys

Key Action
drag measure a distance; the readout shows width, height and diagonal
c copy the colour as hex
r copy the colour as RGB
m copy the current measurement
p pin the current colour as the contrast reference
s toggle edge snapping
space clear the measurement
esc or right click close

Install

omarchy plugin add https://github.com/angus-mcritchie/omarchy-caliper.git --enable

Remove it again with:

omarchy plugin disable angus.caliper     # keep it installed, stop loading it
omarchy plugin remove  angus.caliper     # delete it

Then bind it. In ~/.config/hypr/bindings.lua:

o.bind("SUPER + SHIFT + I", "Caliper (measure & pick)", "omarchy-shell angus.caliper toggle")

SHIFT + I mirrors the inspect shortcut in browser devtools, and is unbound in stock Omarchy. Any spare combination works; the command is what matters:

omarchy-shell angus.caliper toggle

Requirements

grim for the capture, ImageMagick for the pixel plane, jq, and wl-copy for the clipboard. All but ImageMagick already ship with Omarchy.

How pixels are read, and one thing to know if you fork this

The capture is written twice: a PNG for display, and a raw RGB plane at the same native resolution. Reading a pixel is a seek into that plane, which costs about two milliseconds; decoding the PNG per sample cost sixty-seven. A 13x13 block around the cursor is read when the pointer settles, and it serves both the colour readout and the edge search. The crosshair and the magnifier are pure transforms, so they stay live while the numbers settle.

The obvious approach, a QML Canvas with getImageData, is the wrong tool here and fails quietly. A Canvas carries the monitor's device-pixel-ratio, so drawImage lands the capture in device pixels while getImageData reads logical ones. On a fractionally scaled display the two disagree: readings near the origin come back exact and everything further out is silently wrong. It is worth knowing before you spend an afternoon on it.

Licence

MIT.