#!/bin/sh case $1 in window) SLURP="`slurp`" || exit ;; *) unset SLURP esac NAME=${GRIM_DEFAULT_DIR-${XDG_PICTURES_DIR-$HOME}}/screenshot-`date +%G-%m-%d-%H:%M:%S`.png if [ "$SLURP" ]; then grim -g "$SLURP" $NAME else grim $NAME fi notify-send 'Screenshot saved!' -i $NAME -t $NOTIFICATION_DELAY -p > $HYPRLAND_RUN/last-id cp $NAME $HYPRLAND_RUN/buffer echo img > $HYPRLAND_RUN/type