0
Fork 0
mirror of https://github.com/emersion/grim.git synced 2026-10-22 19:11:38 +00:00
Grab images from a Wayland compositor https://wayland.emersion.fr/grim
  • C 88.4%
  • Meson 8.6%
  • Shell 3%
Find a file
History 2018-11-22 08:44:58 +01:00
include Fix i686 build -Werror=incompatible-pointer-types complaint 2018-11-06 01:35:06 +01:00
protocol Add support for wlr-screencopy-unstable-v1 2018-07-13 19:25:56 +01:00
.build.yml fix: build.sr.ht archlinux image libjpeg-turbo package 2018-07-27 13:26:23 +02:00
.editorconfig Add .editorconfig 2018-05-13 21:38:37 +01:00
.gitignore First commit 2018-05-11 22:26:31 +01:00
box.c Only screenshot outputs we're interested in 2018-05-18 08:54:33 +01:00
buffer.c Use shm_open instead of XDG_RUNTIME_DIR 2018-11-14 18:38:33 +01:00
cairo_jpg.c Fix i686 build -Werror=incompatible-pointer-types complaint 2018-11-06 01:35:06 +01:00
grim.1.scd Add -c option to include cursor 2018-09-18 12:08:14 +02:00
LICENSE Initial commit 2018-05-04 13:59:53 +01:00
main.c Add -c option to include cursor 2018-09-18 12:08:14 +02:00
meson.build Bump to v1.0 2018-11-22 08:44:58 +01:00
output-layout.c Split rendering and output layout functions in separate files 2018-05-18 09:16:59 +01:00
README.md Update documentation 2018-11-14 15:01:22 +01:00
render.c Add support for WL_SHM_FORMAT_XRGB8888 2018-10-14 18:28:59 +02:00

grim

Grab images from a Wayland compositor. Works great with slurp and sway >= 1.0.

Building

Install dependencies:

  • meson
  • wayland
  • cairo

Then run:

meson build
ninja -C build
build/grim

Usage

grim screenshot.png # Screenshoot all outputs
grim -o DP-1 screenshot.png # Screenshoot a specific output
grim -g "10,20 300x400" screenshot.png # Screenshoot a region
slurp | grim -g - screenshot.png # Select a region and screenshoot it
grim $(xdg-user-dir PICTURES)/$(date +'%Y-%m-%d-%H%M%S_grim.png') # Use a timestamped filename

Installation

Arch Linux

pacman -S grim

Contributing

Either send GitHub pull requests or send patches on the mailing list.

License

MIT