Skip to content

feat(regionSelector): screenshot annotation editor on Super+Shift+S - #206

Open
xdvi wants to merge 5 commits into
snowarch:mainfrom
xdvi:feat/screenshot-annotation-editor
Open

feat(regionSelector): screenshot annotation editor on Super+Shift+S#206
xdvi wants to merge 5 commits into
snowarch:mainfrom
xdvi:feat/screenshot-annotation-editor

Conversation

@xdvi

@xdvi xdvi commented Jul 23, 2026

Copy link
Copy Markdown

Summary

Mod+Shift+S opens region capture in an annotation editor instead of copying immediately — crop and draw before export.

Single overlay (no phases): dims the screen, drag a resizable crop, toolbar from the start. New IPC region screenshotEdit and self-contained ScreenshotEditor.qml / AnnotationColorPicker.qml; copy/search/ocr/record stay unchanged.

Tools: pen, line, rectangle (rounded, optional fill), circle/ellipse (optional fill), arrow, text (bold/italic/underline/strikethrough + font size), highlighter, blur, auto-numbered counters.

Editing:

  • Per-object color and stroke; selection retargets picker/slider
  • Move, resize handles
  • Toolbar: duplicate (Ctrl+D) and delete (Del / Backspace) for the focused selection
  • Undo/redo (Ctrl+Z / Ctrl+Y)
  • HSV picker + saved colors persisted (regionSelector.customColors, lastCustomColor, lastStrokeWidth)
  • Blur via downscaled region patch (cheap, one FBO per blur)

Export / shortcuts:

  • Ctrl+S or Done → save to screenshots folder only
  • Ctrl+C or copy button → clipboard only (no permanent file)
  • Esc or close → discard
  • Multi-monitor: one interactive output; crop export via ShaderEffectSource (avoids DPR/scale mismatch)

Keybind change

Mod+Shift+Sregion screenshotEdit (was instant region screenshot).

  • Defaults updated (70-binds.kdl, dots)
  • Migration 031 rebinds niri users; skipped if the bind was customized
  • Instant region screenshot still available (snip menu / IPC)

Commits

  1. feat(regionSelector): add screenshotEdit annotation editor
  2. feat(config): persist annotation colors and stroke width
  3. feat(keybinds): bind Super+Shift+S to screenshotEdit
  4. docs: document screenshotEdit function and keybind
  5. fix(dock): hide dock while screenshot editor is open

Testing

  • inir restart && inir logs — no TypeError/ReferenceError
  • niri multi-monitor: capture, crop (incl. fast drag), resize handles/edges
  • Tools, recolor/restroke, move/resize, toolbar duplicate/delete, Ctrl+D/Del, undo/redo
  • Ctrl+S / Done → file in screenshots folder
  • Ctrl+C / copy → clipboard only
  • Migration 031 idempotent; skips customized binds
  • qs -c inir ipc call region screenshotEdit opens editor

@xdvi
xdvi force-pushed the feat/screenshot-annotation-editor branch 2 times, most recently from da60f05 to 54ff306 Compare July 24, 2026 04:24
xdvi added 5 commits July 23, 2026 23:29
Unified capture-crop-annotate overlay for screenshotEdit: dimmed screen,
resizable crop, pen/line/rect/circle/arrow/text/highlight/blur/counter,
per-object color/stroke, undo/redo, duplicate and delete (toolbar + Del).

Multi-monitor: one interactive output, stable drag (no focus thrash).
Export crops via ShaderEffectSource. Ctrl+S/Done save to disk; Ctrl+C/copy
button clipboard only; Esc discards.
Saves the annotation editor custom colors, last picked color, and last
stroke width across sessions.
Mod+Shift+S opens the annotation editor instead of an instant copy.
Migration 031 rebinds niri users and skips customized binds.
@xdvi
xdvi force-pushed the feat/screenshot-annotation-editor branch from 54ff306 to 13bf0a1 Compare July 24, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant