{"id":13418205,"url":"https://github.com/emersion/grim","last_synced_at":"2025-03-15T03:30:44.242Z","repository":{"id":34233128,"uuid":"132140628","full_name":"emersion/grim","owner":"emersion","description":"Grab images from a Wayland compositor","archived":true,"fork":false,"pushed_at":"2022-03-30T08:20:08.000Z","size":210,"stargazers_count":935,"open_issues_count":10,"forks_count":37,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-15T01:43:25.587Z","etag":null,"topics":["cli","screenshot","scrot","wayland"],"latest_commit_sha":null,"homepage":"https://wayland.emersion.fr/grim","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emersion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-04T12:59:52.000Z","updated_at":"2025-03-07T14:47:45.000Z","dependencies_parsed_at":"2022-08-08T00:02:14.398Z","dependency_job_id":null,"html_url":"https://github.com/emersion/grim","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgrim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgrim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgrim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgrim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emersion","download_url":"https://codeload.github.com/emersion/grim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681024,"owners_count":20330152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","screenshot","scrot","wayland"],"created_at":"2024-07-30T22:00:59.699Z","updated_at":"2025-03-15T03:30:44.236Z","avatar_url":"https://github.com/emersion.png","language":"C","readme":"# grim\n\n\u003e ⚠️ **Heads up!** This project has [moved to SourceHut](https://sr.ht/~emersion/grim/).\n\nGrab images from a Wayland compositor. Works great with [slurp] and with [sway].\n\n## Example usage\n\nScreenshoot all outputs:\n\n```sh\ngrim\n```\n\nScreenshoot a specific output:\n\n```sh\ngrim -o DP-1\n```\n\nScreenshoot a region:\n\n```sh\ngrim -g \"10,20 300x400\"\n```\n\nSelect a region and screenshoot it:\n\n```sh\ngrim -g \"$(slurp)\"\n```\n\nUse a custom filename:\n\n```sh\ngrim $(xdg-user-dir PICTURES)/$(date +'%s_grim.png')\n```\n\nScreenshoot and copy to clipboard:\n\n```sh\ngrim - | wl-copy\n```\n\nGrab a screenshot from the focused monitor under Sway, using `swaymsg` and\n`jq`:\n\n```sh\ngrim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')\n```\n\nGrab a screenshot from the focused window under Sway, using `swaymsg` and\n`jq`:\n\n```sh\ngrim -g \"$(swaymsg -t get_tree | jq -j '.. | select(.type?) | select(.focused).rect | \"\\(.x),\\(.y) \\(.width)x\\(.height)\"')\"\n```\n\nPick a color, using ImageMagick:\n\n```sh\ngrim -g \"$(slurp -p)\" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:-\n```\n\n## Building from source\n\nInstall dependencies:\n\n* meson\n* wayland\n* pixman\n* libpng\n* libjpeg (optional)\n\nThen run:\n\n```sh\nmeson build\nninja -C build\n```\n\nTo run directly, use `build/grim`, or if you would like to do a system\ninstallation (in `/usr/local` by default), run `ninja -C build install`.\n\n## Contributing\n\nEither [send GitHub pull requests][github] or [send patches on the mailing\nlist][ml].\n\nJoin the IRC channel: #emersion on Libera Chat.\n\n## License\n\nMIT\n\n[slurp]: https://github.com/emersion/slurp\n[sway]: https://github.com/swaywm/sway\n[github]: https://github.com/emersion/grim\n[ml]: https://lists.sr.ht/%7Eemersion/public-inbox\n","funding_links":[],"categories":["C","Screenshots"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fgrim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femersion%2Fgrim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fgrim/lists"}