#!/bin/sh dir="$HOME/Pictures/Screenshots" file="$(date '+%F_%H-%M-%S').png" grim -g "$(slurp)" "$dir"/"$file" copyq write image/png - < "$dir/$file" copyq select 0