26 lines
930 B
Markdown
26 lines
930 B
Markdown
+++
|
|
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).
|