#!/usr/bin/env bash
if region="$(slurp)"; then
    grim -g "$region" - | wl-copy
    notify-send "Screenshot saved to clipboard" \
        -a grim -c screenshot -u low -e
else
    notify-send "Screenshot cancelled" \
        -a grim -c screenshot -u low -t 2000 -e
fi
