#!/usr/bin/env sh if [ "$XDG_SESSION_TYPE" != "wayland" ]; then echo "this script only supports wayland" exit 1 fi if ps -e | grep "slurp"; then echo "slurp is already running" exit 1 fi DIMS="$(slurp)" grim -g "$DIMS" - | pbc