1
0
em.0x45.cz/content/posts/taking-screenshots-on-wayland-with-grim-and-slurp/index.md.bak

26 lines
930 B
Markdown
Raw Permalink Normal View History

2024-05-06 12:30:55 +02:00
+++
title = "Taking screenshots on Wayland with Grim and Slurp"
date = 2023-01-18
draft = false
[taxonomies]
categories = ["Linux"]
[extra]
author = "Emil Miler"
+++
I have done some experimenting with dwl on Wayland, which requires a change of my x11 setup. This article quickly expalins how to replace the old [Shotgun and Slop](@/posts/taking-screenshots-with-shotgun-and-slop/index.md) for a simple Wayland alternative.
<!-- more -->
This replacement is very similar to the original combo. What you need is `grim` for screenshots, `slurp` for area selection and `wl-clipboard` for clipboard features.
```sh
grim -g "$(slurp -d)" - | tee /home/$USER/scrot/$(date +'%F_%T').png | wl-copy
```
The `-d` option in `slurp` just shows us the selection dimensions, which is a neat feature.
More interesting examples, such as a simple color picker, can me found at [Grim examples](https://sr.ht/~emersion/grim/#example-usage).