Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eriedaberrie/grim-hyprland
A fork of grim that takes advantage of Hyprland's custom protocols to grab specific windows.
https://github.com/eriedaberrie/grim-hyprland
hyprland screenshot-utility wayland
Last synced: about 1 month ago
JSON representation
A fork of grim that takes advantage of Hyprland's custom protocols to grab specific windows.
- Host: GitHub
- URL: https://github.com/eriedaberrie/grim-hyprland
- Owner: eriedaberrie
- License: mit
- Created: 2023-02-07T03:15:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-10T04:26:06.000Z (7 months ago)
- Last Synced: 2024-08-02T07:23:20.604Z (4 months ago)
- Topics: hyprland, screenshot-utility, wayland
- Language: C
- Homepage:
- Size: 180 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hyprland - grim-hyprland - in replacement Grim fork with support for Hyprland's window capture protocol) (Tools / Screenshotting)
README
# grim-hyprland
A fork of [grim] that takes advantage of [Hyprland]'s custom protocols to grab
specific windows.## Example usage
Grab a screenshot from the focused window under Hyprland, using `hyprctl` and
`jq`:```sh
grim -w "$(hyprctl activewindow -j | jq -r '.address')"
```All original usages of Grim still work:
Screenshoot all outputs:
```sh
grim
```Screenshoot a specific output:
```sh
grim -o DP-1
```Screenshoot a region:
```sh
grim -g "10,20 300x400"
```Select a region and screenshoot it:
```sh
grim -g "$(slurp)"
```Use a custom filename:
```sh
grim $(xdg-user-dir PICTURES)/$(date +'%s_grim.png')
```Screenshoot and copy to clipboard:
```sh
grim - | wl-copy
```Grab a screenshot from the focused monitor under Hyprland, using `hyprctl` and
`jq`:```sh
grim -o "$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name')"
```Pick a color, using ImageMagick:
```sh
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:
```sh
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
This fork is on GitHub, you know what to do.
### Upstream contributions
Report bugs on the [issue tracker], send patches on the [mailing list].
Join the IRC channel: [#emersion on Libera Chat].
## License
MIT
[grim]: https://git.sr.ht/~emersion/grim
[Hyprland]: https://github.com/hyprwm/Hyprland
[slurp]: https://github.com/emersion/slurp
[issue tracker]: https://todo.sr.ht/~emersion/grim
[mailing list]: https://lists.sr.ht/~emersion/grim-dev
[#emersion on Libera Chat]: ircs://irc.libera.chat/#emersion