Don't capture cursor in screenshot.

Adds `-u` to maim to not capture the cursor.

However, maim still captures the cursor sometimes even with -u,
so this also switches the order to prefer `import` over `maim`,
which does not do this.
This commit is contained in:
Mara Bos 2020-05-12 22:17:42 +02:00
부모 2c889e0808
커밋 dbb6a954e1
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제

파일 보기

@ -44,12 +44,12 @@ del() {
}
screenshot() {
if command -v maim >/dev/null 2>&1; then
CMD="maim -ks"
elif command -v import >/dev/null 2>&1; then
if command -v import >/dev/null 2>&1; then
CMD="import png:-"
elif command -v maim >/dev/null 2>&1; then
CMD="maim -uks"
else
echo "Neither maim nor import were found. One of these is needed to make screenshots." >&2
echo "Neither import (imagemagick) nor maim were found. One of these is needed to make screenshots." >&2
exit 1
fi
FILE=$(mktemp)