Coder Social home page Coder Social logo

ppascher / grim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emersion/grim

0.0 1.0 0.0 107 KB

Grab images from a Wayland compositor

Home Page: https://wayland.emersion.fr/grim

License: MIT License

C 88.07% Meson 7.88% SuperCollider 4.05%

grim's Introduction

grim

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

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')

Pick a color, using ImageMagick:

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

Package manager installation

  • Arch Linux: pacman -S grim

Building from source

Install dependencies:

  • meson
  • wayland
  • cairo
  • 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

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

Join the IRC channel: ##emersion on Freenode.

License

MIT

grim's People

Contributors

emersion avatar atx avatar ovibos avatar xyproto avatar happysmash27 avatar ddevault avatar thepigrepper avatar jbeich avatar jnpkrn avatar ammgws avatar plusminus0 avatar ryandwyer avatar foxcpp avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.