Debian Codegraph @

/

debian grim 1.5.0+ds-1debian grim shell shell-project 0.0.0 cdebianfishinimakefilemarkdownshellxmlyaml 30 files · 63 symbols
View dependency graph

Depends on

README (full)

grim

Grab images from a Wayland compositor. Works great with slurp.

Example usage

Screenshoot all outputs:

grim

Screenshoot a specific output:

grim -o DP-1

Screenshoot a region:

grim -g "10,20 300x400"

Select a region and screenshoot it:

grim -g "$(slurp)"

Use a custom filename:

grim $(xdg-user-dir PICTURES)/$(date +'%s_grim.png')

Screenshoot and copy to clipboard:

grim - | wl-copy

Grab a screenshot from the focused monitor under Sway, using swaymsg and jq:

grim -o "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')"

Grab a screenshot from the focused window under Sway, using swaymsg and jq:

grim -T "$(swaymsg -t get_tree | jq -j '.. | select(.type?) | select(.focused).foreign_toplevel_identifier')"

Pick a color, using ImageMagick:

grim -g "$(slurp -p)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:-

Building from source

Install dependencies:

  • meson
  • wayland
  • pixman
  • libpng
  • libjpeg (optional)

Then run:

meson build
ninja -C build

To run directly, use build/grim, or if you would like to do a system installation (in /usr/local by default), run ninja -C build install.

Contributing

Report bugs and send patches on GitLab.

Join the IRC channel: #emersion on Libera Chat.

License

MIT

dir contrib/
dir debian/
dir doc/
dir include/
dir protocol/
file .build.yml
file .editorconfig
file .gitignore
file .gitlab-ci.yml
file LICENSE
file README.md
file box.c
file buffer.c
file main.c
file meson.build
file meson_options.txt
file output-layout.c
file render.c
file write_png.c
file write_ppm.c