Skip to content

A Wayfire plugin providing crosshair guides, pixel measurement, and a color picker.

Notifications You must be signed in to change notification settings

mkay/screen-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wayfire Screen-Tools

A Wayfire compositor plugin providing crosshair guides, pixel measurement, and a color picker with magnifying loupe. Based on the crosshair plugin by Scott Moreau.

Features

  • Crosshair guides — full-screen horizontal and vertical lines that follow the cursor
  • Freeze — lock the crosshair at the current cursor position
  • Pixel measurement — click two points to measure pixel distances, displays a rectangle outline with a W x H label
  • Color picker — magnifying loupe showing a grid of pixels around the cursor, copies the selected color to the clipboard via wl-copy
  • Multiple color formats — hex, rgb, hsl, oklch (configurable in WCM)
  • Cancel — press ESC to exit measurement or color picker without committing
  • Separate colors for crosshair and measurement overlays
  • Configurable crosshair fade during measurement
  • Works correctly on scaled outputs

Default Keybindings

Action Binding
Toggle guides Ctrl + F1
Cancel Escape
Freeze crosshair Ctrl + LMB
Toggle Measurement (start, stop, erase) Super + LMB
Toggle Pick color (copy color on exit) Super + RMB

All bindings are configurable via wayfire.ini or Wayfire Config Manager (WCM).

Building

Requires Wayfire 0.11+ development headers.

meson setup build --prefix=/usr/local
meson compile -C build
sudo meson install -C build

Configuration

Add screen-tools to your plugins list in ~/.config/wayfire.ini:

[core]
plugins = ... screen-tools

[screen-tools]
toggle = <ctrl> KEY_F1
cancel = KEY_ESC
freeze = <ctrl> BTN_LEFT
measure = <super> BTN_LEFT
picker = <super> BTN_RIGHT
picker_format = hex
line_color = \#FF0000CC
line_width = 1
measure_color = \#00BFFFCC
measure_font_size = 14
crosshair_measure_opacity = 20
picker_loupe_radius = 4
picker_cell_size = 14

Color Formats

Format Example Output
hex #3A8FD4
rgb rgb(58, 143, 212)
hsl hsl(207, 65%, 53%)
oklch oklch(0.638 0.134 249.5)

Dependencies

  • Wayfire 0.11+
  • wl-copy (from wl-clipboard) for clipboard support

Disclaimer

This project was created with AI assistance. The code has not been thoroughly reviewed. Verify its correctness and suitability before use.

License

MIT

Screencast

Screenshot of the plugin at work

About

A Wayfire plugin providing crosshair guides, pixel measurement, and a color picker.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published