Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capy

Screenshot to clipboard, on any Linux desktop.

Press a hotkey, drag a rectangle, paste it anywhere. Capy runs on X11 and Wayland, on GNOME, KDE, XFCE, sway and the rest, because it doesn't ship its own screen-grabbing code — it detects and drives whichever screenshot helper your distro already has.

  • No runtime dependencies. Pure Python standard library. Pillow and ImageMagick are used if present, but nothing breaks without them.
  • Own region selector. A frozen fullscreen overlay with a dimmed backdrop and a live pixel readout, so the selection is identical everywhere instead of whatever your desktop's picker happens to look like.
  • Straight to the clipboard. Saving a file is opt-in.

Install

pip install --user .

Then check what your system can do:

capy doctor

Capy needs one capture helper and one clipboard helper. Install whichever the doctor reports as missing:

Distro X11 Wayland
Debian/Ubuntu sudo apt install maim xclip python3-tk sudo apt install grim wl-clipboard python3-tk
Fedora sudo dnf install maim xclip python3-tkinter sudo dnf install grim wl-clipboard python3-tkinter
Arch sudo pacman -S maim xclip tk sudo pacman -S grim wl-clipboard tk
openSUSE sudo zypper install maim xclip python3-tk sudo zypper install grim wl-clipboard python3-tk

If you already have spectacle, gnome-screenshot, flameshot, xfce4-screenshooter or ImageMagick, the capture side is already covered.

Use

capy region          # drag a rectangle -> clipboard
capy shot            # whole screen -> clipboard
capy region --save-dir ~/Pictures/Screenshots
capy shot --no-clipboard --save /tmp/out.png

In the selector: drag to choose a rectangle, Enter for the whole screen, Esc or right-click to cancel.

Hotkey

capy install-shortcut                              # Ctrl+Shift+Print -> capy region
capy install-shortcut --binding '<Super>s'

This binds the key through the desktop's own settings (gsettings on GNOME/Cinnamon, xfconf on XFCE) because under Wayland an application cannot grab keys itself — the compositor owns them. On KDE, sway, Hyprland and others the command prints the exact recipe to paste into your config.

Development

python3 -m venv .venv && .venv/bin/pip install -e '.[dev]'
.venv/bin/python -m pytest

License

MIT

About

Screenshot to clipboard, on any Linux desktop

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages