Kadr

A screenshot tool for GNOME on Wayland in C++23 and Qt 6. Modeled on FastStone Capture 7.3, without video recording.

attributes

role
author
repo
https://github.com/tzx1z/kadr

Problem

In GNOME on Wayland an application cannot read the screen or register global shortcuts by itself: screenshots, window capture, input for scrolling and background mode go through xdg-desktop-portal, and each portal has its own permissions and sessions. Kadr implements the feature set of FastStone Capture 7.3 on top of these portals.

Solution

Each screenshot passes through a chain of steps set by a profile: the editor, the clipboard, a file, external commands, uploads, OCR or email. Capture goes through the Screenshot or ScreenCast portal, scrolling capture through RemoteDesktop, shortcuts through GlobalShortcuts, autostart through Background.

  • Modes: full screen, monitor, region, fixed size, freehand, window and last region; an overlay on every monitor with a magnifier and keyboard control
  • Scrolling capture: the selected region is scrolled with the wheel through the RemoteDesktop portal, and the frames are stitched into one image
  • Editor: arrows, shapes, text, callouts, numbered steps, blur and pixelation, crop, resize, border, shadow and watermark, undo for every action
  • Output: the clipboard, PNG, JPEG and WebP files by a name template, external commands in the sandbox or on the host, uploads to SFTP, WebDAV and rclone remotes with the link copied to the clipboard
  • Tools: OCR through tesseract, a color picker, a ruler, screenshot history, sending by email
  • Background mode with global shortcuts and autostart, English and Russian interface

Stack

C++23, Qt 6 (Widgets, DBus, Network), CMake, PipeWire for ScreenCast frames, libssh for SFTP, libsecret for passwords. Distributed as a Flatpak on the KDE 6.11 runtime and as an RPM package in Fedora COPR. GPL-3.0-or-later.

Outcome

Version 1.0.0 is built in COPR for Fedora 43, 44, 45 and Rawhide on x86_64 and aarch64. Each module is a static library with its own QtTest suites, 25 in total. They run on the offscreen platform, including a build with AddressSanitizer and UBSan, and the release build uses -Werror. The same tests make the window screenshots for the AppStream metainfo.

Installation

From Fedora COPR, for Fedora 43 and newer on x86_64 and aarch64. Kadr runs only in GNOME on Wayland.

  1. sudo dnf copr enable inkov/kadr && sudo dnf install kadr

Updates come with sudo dnf upgrade. Building and installing the Flatpak is described in the repository README.

All projects