Skip to content

kb777only/voltshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voltshot

A fast, lightweight, modern and feature rich Linux screenshot tool.

Press PrintScreen, capture, annotate (blur, text, shapes, arrows…), and the image is on your clipboard instantly — then save it wherever you like.

VoltShot is Wayland-only (no X11). It captures through the XDG Desktop Portal, which is the correct path on KWin/KDE (the wlr-screencopy approach used by grim does not work there) and is also portable to GNOME and wlroots compositors.

Features

  • Capture the full screen or an interactive region (KDE's native selector).
  • Auto-copy the capture to the clipboard the moment the editor opens.
  • Annotate with kImageAnnotator: region blur/pixelate, reshapable colored text, rectangles, ellipses, arrows, lines, freehand pen, numbering, crop, scale, and full undo/redo.
  • Fit to window — the screenshot is always scaled to fit the editor frame, no matter the capture resolution (e.g. multi-monitor 3840×1080).
  • Save anywhere as PNG/JPEG/WebP via a standard file dialog (defaults to ~/Pictures/Screenshots/).
  • Set as default screenshot tool: bind PrintScreen / Shift+PrintScreen with a single --install.

Build

Dependencies (Arch/CachyOS package names): qt6-base, qt6-svg, kimageannotator, kcolorpicker, plus cmake, ninja and a C++17 compiler.

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build

The binary is build/voltshot.

Install

Put the binary on your PATH, then register the global shortcuts:

cmake --install build            # installs to /usr/local/bin (may need sudo)
# or just copy it:  install -Dm755 build/voltshot ~/.local/bin/voltshot

voltshot --install               # bind PrintScreen keys on KDE

--install writes ~/.local/share/applications/voltshot.desktop (pointing at the binary you ran it from), then in kglobalshortcutsrc:

Key Action
PrintScreen voltshot --full
Shift+PrintScreen voltshot --region

It also steps Spectacle's PrintScreen (launch) and Shift+PrintScreen (full-screen) bindings aside, and reloads plasma-kglobalaccel so the change takes effect immediately. Spectacle's Meta+Print family is left untouched.

The first capture shows a one-time KDE permission prompt ("Allow VoltShot to take a screenshot?"). Accept it and it won't ask again.

To undo everything and restore Spectacle:

voltshot --uninstall

Usage

voltshot            # full screen (default)
voltshot --full     # full screen
voltshot --region   # select a region
voltshot --install  # set as KDE default screenshot tool
voltshot --uninstall
voltshot --help

In the editor: Ctrl+S save · Ctrl+Shift+C copy annotated image · Ctrl+Z / Ctrl+Shift+Z undo/redo · Esc close.

How it works

Concern Mechanism
Capture org.freedesktop.portal.Screenshot over QtDBus (interactive toggles region vs. full)
Editor kImageAnnotator QWidget embedded in a QMainWindow
Clipboard QClipboard::setImage (Qt handles the Wayland clipboard; KDE's Klipper retains it after exit)
Default tool .desktop actions bound via kglobalshortcutsrc [services] groups, applied with kwriteconfig6

Built with C++17, Qt 6 and CMake.

About

A fast, lightweight, modern and feature rich Linux screenshot tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors