summaryrefslogtreecommitdiffstats
path: root/script/screenshot
blob: b5b3e0a45516c8de19f3bacdd7d77be3caa702c4 (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh
timeout 30 slurp > /tmp/selection.txt 2>/dev/null
if [ $? -eq 0 ] && [ -s /tmp/selection.txt ]; then
    grim -g "$(cat /tmp/selection.txt)" - | wl-copy
else
    grim - | wl-copy
fi
rm -f /tmp/selection.txt