nixos-config/home-manager/wayland/scripts/screenshot-slurp

10 lines
270 B
Bash
Executable file

#!/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 -t 3000
else
notify-send "Screenshot cancelled" \
-a grim -c screenshot -u low -t 3000
fi