Skip to content

hthienloc/dms-quick-capture

Repository files navigation

DMS Quick Capture & Annotate

Upvote on DMS Plugin Registry

Screenshot and vector annotation plugin for DankMaterialShell (DMS).

Screenshot

Requirements

  • DankMaterialShell >= 1.5.2 (scroll capture requires DMS >= 1.5.2)
  • ImageMagick (provides magick/mogrify, required for WebP/JPEG exports, rotation/mirroring, and OCR/QR crop)
  • img2pdf (required for PDF export)
  • tesseract (required for OCR text scanner)
  • zbar (provides zbarimg, required for QR scanner)

Install

# Via DMS CLI
dms plugins install quickCapture

# Or manually
git clone https://github.com/hthienloc/dms-quick-capture ~/.config/DankMaterialShell/plugins/quickCapture

Revert to a previous version

cd ~/.config/DankMaterialShell/plugins/quickCapture
git checkout v3.1.0    # replace with the desired version tag

To go back to the latest release:

git checkout v3.2.0

To track the development branch again:

git checkout main && git pull

Quick Start

Action Result
Left Click (bar icon) Open widget popout
Middle Click (bar icon) Middle click action (configured in settings)
Right Click (bar icon) Right click action (configured in settings)
Drop Image (bar icon) Drag any image onto the icon to annotate
Print (keyboard) Capture using default mode (requires keybind setup)

Typical workflow:

  1. Trigger capture — click the bar icon, use Control Center, or press Print.
  2. Select area — drag to choose the screenshot region.
  3. Annotate — use the toolbar, keyboard shortcuts, or radial menus.
  4. Finish — press Enter (action depends on settings) or Esc to discard.

Scrolling Capture (Stitching): Select a region, scroll the content, then press Enter to finish stitching. Adjust the scroll interval in settings.

Annotation Tools

Tool Selection

Shortcut Tool
1 Pen
2 Line
3 Arrow
4 Rectangle
Q Ellipse
W Text
E Pixelate
R Redact
A Stamp
S Highlighter
D Focus Spotlight
F Color Picker (Ink/Eyedropper)
T Eraser
Z Area Zoom (Callout)
B Backdrop Options
V Select
X Toggle Hide/Show Annotations
Tab Toggle between 2 latest radial presets

Drawing & Editing

  • Thickness: Scroll Mouse Wheel to scale brush / font size.

  • Quick Erase: Middle-click on any element to delete it.

  • Copy / Duplicate: Select a vector with the Select tool (V), then press C to duplicate. Pressing C without a selection pastes the last copied vector at the cursor.

  • Undo: Ctrl + Z.

  • Speech Bubble (Text Tool): Click and drag to draw a speech bubble. The click location defines the tail target point, and the release location is the text bubble. A single click without dragging writes normal text.

  • Leader Line (Stamp Tool): Click and drag to create a stamp with a leader line. The click location points to the target, and the release location places the stamp body. A single click without dragging drops a normal stamp.

  • Shift Constraint: Hold Shift while drawing to constrain shapes:

    Tool Shift Behavior
    Pen Draws straight lines
    Line, Arrow, Highlighter Snaps angle to 15° increments
    Ellipse Perfect circle
    Rectangle, Redact, Pixelate Perfect square

Popover Toolbars & Radial Menus

Interaction Menu / Popover
Right-click on canvas 8 customizable tool presets
Shift+Right-click (Stamp active) Open Stamp Options mini-toolbar (Numeric, Alphabetic, Roman)
Shift+Right-click (Text active) Open Text Options mini-toolbar (Bold, Italic, Underline, Background)
Shift+Right-click (Line active) Open Line Options mini-toolbar (Solid, Dashed, Dotted)

Special Tools

  • Magnifier Lens: Hold G to activate a magnifying circular lens. Scroll Mouse Wheel while holding G to adjust zoom (1.5× – 4×).
  • Area Zoom (Callout): Press Z to draw a magnified callout box. Adjust zoom (100%–500%) with scroll wheel.
  • Text Tool: Supports Bold, Italic, Underline, and auto-contrast Background via the radial menu.

Keyboard Shortcuts

Key Action
Enter Done (save/copy per settings)
Esc Discard & Close
Ctrl + Z Undo last stroke
Ctrl + S Save to file
Ctrl + C Copy to clipboard
Ctrl + A Copy & Save
Ctrl + F Float image to always-on-top window
Ctrl + X Crop / Resize
Ctrl + 14 Select color slots 1 – 4
Ctrl + QR Select color slots 5 – 8 (Q, W, E, R)

Pin-to-Desktop (Float)

  • Ctrl + F in the annotator to export and float the image instantly.
  • Left-click the floating image to return it to the annotator for further editing.
  • Right-click the floating image to minimize it into a small cloud icon.
  • Hover the cloud icon to restore the floating image.
  • Middle-click the floating image to close it.

IPC Commands

Commands that capture or open images accept an action parameter — use edit to open the editor or float to spawn an always-on-top window.

dms ipc call quickCapture <command> [arg] edit|float

dms ipc call quickCapture screenshot region edit   # open editor
dms ipc call quickCapture screenshot region float  # float directly
Command Arguments Description
screenshot mode (region, full, all, output, window, last, scroll) Trigger capture
selectFile action Open file browser to pick an image
fromClipboard action Annotate image from clipboard
openImage path, action Open a specific image in the annotator
close Close the annotator window
showHistory Open Recent Edits history carousel

Keybinding Examples (Niri)

binds {
    Print { spawn "dms" "ipc" "call" "quickCapture" "screenshot" "region" "edit"; }
    Meta+Print { spawn "dms" "ipc" "call" "quickCapture" "screenshot" "window" "edit"; }
    # Float without editor:
    # Control+Print { spawn "dms" "ipc" "call" "quickCapture" "screenshot" "full" "float"; }
}

Roadmap

  • OCR (Optical Character Recognition) text scanner
  • QR Code Scanner
  • Canvas Color Picker (Eyedropper tool)
  • Image Filters (Grayscale, negative, brightness/contrast)
  • Image Backdrop Mode: Support setting a custom image file as the screenshot background
  • Expanded tool option popovers:
    • Arrow tool: Double-headed arrows, line styles (dashed, dotted)
    • Line tool: Line styles (dashed, dotted)
    • Rectangle tool: Border styles (dashed, dotted)
    • Redact tool: Clean text eraser (dominant color/gradient background matcher)
    • Callout tool: Ellipse callout shape support

Credits

  • Gradia Capture — Inspiration for the toolbar layout and backdrop algorithms
  • Flameshot — Inspiration for the radial menu and tool interaction patterns
  • Snapzy — Inspiration for the float image / continue-editing workflow
  • vky and bodify (Discord) — Actively reporting bugs and contributing valuable feedback to help polish and improve the plugin

Thanks to everyone who supported, contributed code, gave feedback, and the DankMaterialShell community.

License

MIT

About

Quick screenshot and annotation plugin for DankMaterialShell

Resources

License

Stars

15 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors