Skip to content

About

Fast, lightweight Wayland screenshot tool

Topics

Resources

Contributing

Stars

163 stars

Watchers

3 watching

Forks

Repository files navigation

LumineCapture
LumineCapture

Fast, lightweight Wayland screenshot tool

KDE Plasma COSMIC niri Hyprland GNOME

Preview

preview

Features

  • Speed. Starts instantly. The project is built with a focus on speed and optimization and avoids heavy libraries. You can see the comparison with Flameshot & Spectacle with benchmarks here.
  • Functionality. :
    • OCR: fast text scanning, with the option to download and choose a specific model
    • Pin
    • Color picker
    • Basic annotations: pen, highlighter, line, arrow, rectangle, circle, numbered arrows, text, redact (blur or pixelate)
  • Native on Wayland.

Usage

LumineCapture supports different launch options, here is the most basic one:

With GUI:

  • lumine-capture
    ╰─> Takes a screenshot of the whole workspace.

  • lumine-capture -m
    ╰─> Takes a screenshot of the monitor under the pointer.

  • lumine-capture -r
    ╰─> No editor and no annotations, just drag a region; the screenshot is taken as soon as you release the mouse button (by default it is both saved and copied).

without GUI :

  • lumine-capture -f (full workspace)
  • lumine-capture -f -m (current monitor)
  • lumine-capture -w (active window, currently works only on KDE)

Important: by default every screenshot is also saved as a file and copied to the clipboard, even if in the editor you only chose to copy or pin it. There are two ways to change that:

  1. -t <letters> decides what happens to the screenshot for this launch, where the letters are:

    • s saves it to the screenshots folder, ~/Pictures/screenshots/<year-month>/ by default
    • c copies it to the clipboard
    • p pins it to the screen
    • o writes the PNG to stdout for piping to utilities and other tools
    • r copies the recognized text to the primary selection (middle click). It works only with -r ocr: screenshot ignores r, since vast majority of apps paste only text with the middle click

    The letters can be used in any order, even scp; they don't get in each other's way. A bare -t means nothing on its own, only what you pick in the editor.

  2. to in the config does the same for every launch without -t, with the same letters:

    [general]
    to = "c"

    An empty value (to = "") stops it from doing anything with the screenshot on its own. -t overrides it.

In detail (lumine-capture -h)
lumine-capture [MODE] [OPTIONS]
lumine-capture --ocr-daemon [serve|status|stop|calibrate]

Modes (without one, the editor opens):
  -f, --full           Capture the screen right away, no editor
  -w, --window         Capture the active window right away (KDE Plasma only)
  -r, --region [ocr]   Drag a region, releasing the mouse immediately takes the shot.
                       With ocr, reads the text in it instead. Unlike OCR in the editor,
                       it doesn't show any scanning progress: it closes, and when the scan
                       finishes, shows a notification with the outcome.
                       Recommended to use with -t, see below

Options:
  -m, --monitor        Only the monitor under the pointer
  -d, --delay <SECONDS>
                       Take the shot this long after the launch, e.g. -d 3 or -d 0.5
  -t, --to <LETTERS>   What to do with the shot: c copy, p pin, s save, o write the PNG
                       to stdout, in any order and mix, e.g. -t pc. Defaults to general.to
                       in the config. In the editor, Enter and a double click do this, and
                       any other finish adds it. A bare -t means nothing by default.
                       Only for -r ocr: r copies the text to the primary selection (middle
                       click). Screenshots ignore r, apps paste only text with the middle click
  -o, --output <DIR>   Save the shot into this directory instead of the configured
                       one, creating it if needed; implies s in --to
  -n, --nonotify       Disable notifications for this launch
  -s, --speed          Print how long each startup step took to stderr
      --config <PATH>  Use this config file instead of the default location
      --print-default-config
                       Print the default config.toml and exit
  -h, --help           Print this help and exit
  -V, --version        Print the version and exit

Keyboard shortcuts

Local

These shortcuts are available in the editor. All of them can be changed in the `[keys]` section of the config file.
Keys Description
S Set the Selection as the tool (choose or adjust the capture area)
V Set the Pick as the tool (select, move and resize annotations)
O Set the OCR as the tool (recognize text, select it and copy)
G Set the Eyedropper as the tool (pick a color from the screen)
T Set the Text as the tool
P Set the Pen as the tool
H Set the Highlighter as the tool
D Set the Line as the tool
A Set the Arrow as the tool
R Set the Rectangle as the tool
C Set the Circle as the tool
N Set the Numbered arrow as the tool
X Set the Redact as the tool (blur
←, ↓, ↑, → Move the selection
Shift + ←, ↓, ↑, → Move the selection faster
Alt + ←, ↓, ↑, → Resize the selection
Alt + Shift + ←, ↓, ↑, → Resize the selection faster
Return Finish with general.to (copy and save by default)
Ctrl + C Copy to the clipboard and finish
Ctrl + S Save as a file and finish
Ctrl + P Pin to the screen and finish
Esc Quit without taking the screenshot
Ctrl + Z Undo the last modification
Ctrl + Shift + Z, Ctrl + Y Redo the next modification
Ctrl + A Select the whole monitor under the cursor
Delete, Backspace Delete the selected annotation
Space Toggle the visibility of the toolbar and the settings panels
M Toggle the magnifier
[, ] Decrease / increase the size (width or font) of the current tool
Double click on the selection Finish with the default action, same as Return
Right Click Clear the selection
Mouse Wheel Change the tool's size (width or font)
Hold Shift while drawing Straight line, snaps to horizontal or vertical (Pen, Highlighter, Line, Arrow)

With the OCR tool active, Return and Ctrl + C copy the selected text, and Ctrl + A selects all recognized text. With the Eyedropper they copy the picked color.

Global

  • bind them in your bind settings, that's the only proper way on Wayland.
    • On KDE you can import few launch commands binds from lumine-capture-shortcuts-kde.kksrc in System Settings -> Keyboard -> Shortcuts -> Import -> Custom Scheme, but kde import feature is quite unstable.

Installation

Packages are on the releases page.

GNOME is not supported yet.

Packages are built for x86_64 & ARM64 (aarch64), except for Arch package, its x86_64 only.

Fedora 43+

From the Copr repository

sudo dnf copr enable netflate/lumine-capture
sudo dnf install lumine-capture

or a single package from the releases page:

sudo dnf install https://github.com/Netflate/LumineCapture/releases/download/v0.3.0/lumine-capture-0.3.0-1.$(uname -m).rpm

Ubuntu 24.04+ / Debian 13+

wget https://github.com/Netflate/LumineCapture/releases/download/v0.3.0/lumine-capture_0.3.0-1_$(dpkg --print-architecture).deb
sudo apt install ./lumine-capture_0.3.0-1_$(dpkg --print-architecture).deb

Arch Linux

curl -LO https://github.com/Netflate/LumineCapture/releases/download/v0.3.0/lumine-capture-0.3.0-1-x86_64.pkg.tar.zst
sudo pacman -U lumine-capture-0.3.0-1-x86_64.pkg.tar.zst

or build it yourself from the PKGBUILD (the only way for ARM on arch):

git clone https://github.com/Netflate/LumineCapture && cd LumineCapture/packaging/arch && makepkg -si

aerynOS

sudo moss it lumine-capture

Speed Comparison (LumineCapture vs Flameshot vs Spectacle)

every test ran on a dual-monitor setup, so each screenshot covered the whole workspace (both screens), which made every run a bit slower. Compare the tools with each other rather than looking at the absolute numbers.

1) In optimal conditions:

The measurement for each of the three started exactly one frame before the command execution, so the actual time is approximately 0.10 ms lower for each one. It's also important to note that the Spectacle measurement might be unfair. I decided to end the measurement exactly when the application is fully initialized and ready to use, and that's when the toolbar starts appearing, not immediately after the screen dims. This is because Spectacle hasn't loaded the toolbar by that point. The measurement ends at the frame when the toolbar animation starts

first

2) In high CPU usage condition:

second

3) Saving a full-workspace screenshot without a GUI (30 times):

Command Mean [ms] Min [ms] Max [ms] Relative
LumineCapture 150.5 ± 51.9 111.0 280.9 1.00
Spectacle 576.1 ± 11.7 556.5 605.4 3.83 ± 1.32
Flameshot (daemon running) 737.9 ± 33.4 692.5 841.0 4.90 ± 1.71

Script: scripts/bench.sh

Config

The config lives at ~/.config/LumineCapture/config.toml.

AI policy & Contributing

Most of the code was written by hand, except for OCR, it's noticeably AI-assisted and planned to be improved & rewritten in the future. Otherwise, AI is used for research, debugging and finding gaps in optimization & speed.

Contributors are expected to take an equally responsible approach, more in CONTRIBUTING.md.

Acknowledgments

A lot of the reference for this project, including the layout of this README, was taken from Spectacle and Flameshot. Thanks to both projects and everyone who works on them.

OCR runs PaddleOCR PP-OCRv5 models through ONNX Runtime, via oar-ocr, whose releases also host the models.

Roadmap (of noticeable features)

  • QR code scanning (#12)
  • Themes, and a proper GUI to choose between them
  • Screen recording
  • GNOME support (#21)
  • On-screen translation
  • Scrolling screenshots, if they can be done well (#17)

License

Licensed under either of

The bundled Inter font is under the SIL Open Font License 1.1 (LICENSE-OFL).

About

Fast, lightweight Wayland screenshot tool

Topics

Resources

Contributing

Stars

163 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages