Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
include/ | H | 17-Apr-2021 | - | 147 | 107 | |
protocol/ | H | 17-Apr-2021 | - | 335 | 279 | |
.build.yml | H A D | 17-Apr-2021 | 247 | 17 | 16 | |
.editorconfig | H A D | 17-Apr-2021 | 129 | 9 | 7 | |
.gitignore | H A D | 17-Apr-2021 | 438 | 55 | 45 | |
LICENSE | H A D | 17-Apr-2021 | 1 KiB | 22 | 17 | |
README.md | H A D | 17-Apr-2021 | 985 | 63 | 41 | |
main.c | H A D | 17-Apr-2021 | 28.5 KiB | 1,008 | 865 | |
meson.build | H A D | 17-Apr-2021 | 1.3 KiB | 70 | 57 | |
pool-buffer.c | H A D | 17-Apr-2021 | 3.1 KiB | 146 | 122 | |
render.c | H A D | 17-Apr-2021 | 2.6 KiB | 91 | 73 | |
slurp.1.scd | H A D | 17-Apr-2021 | 2.3 KiB | 94 | 60 |
README.md
1# slurp 2 3Select a region in a Wayland compositor and print it to the standard output. 4Works well with [grim](https://github.com/emersion/grim). 5 6It currently works on Sway 1.0. 7 8Join the IRC channel: ##emersion on Freenode. 9 10## Building 11 12Install dependencies: 13* meson 14* wayland 15* cairo 16* libxkbcommon 17* scdoc (optional: man pages) 18 19Then run: 20 21```sh 22meson build 23ninja -C build 24build/slurp 25``` 26 27## Example usage 28 29Select a region and print it to stdout: 30 31```sh 32slurp 33``` 34 35Select a single point instead of a region: 36 37```sh 38slurp -p 39``` 40 41Select an output and print its name: 42 43```sh 44slurp -o -f "%o" 45``` 46 47Select a window under Sway, using `swaymsg` and `jq`: 48 49```sh 50swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp 51``` 52 53## Contributing 54 55Either [send GitHub pull requests][1] or [send patches on the mailing list][2]. 56 57## License 58 59MIT 60 61[1]: https://github.com/emersion/slurp 62[2]: https://lists.sr.ht/%7Eemersion/public-inbox 63