blob: a41b7309860aae2a055843a32a7de08bda007c04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh
set -efuo pipefail
screenshot=/tmp/screenshot.jpg
background=/tmp/screenshot-thumb.jpg
opts=""
trap cleanup EXIT
cleanup() {
rm -f "${background}" "${screenshot}"
}
if command -v grim >/dev/null 2>&1 && \
command -v convert >/dev/null 2>&1; then
grim -t jpeg "${screenshot}"
convert "${screenshot}" -blur 0x8 "${background}"
rm -f "${screenshot}"
opts="${opts} -i ${background}"
fi
swaylock ${opts}
|