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

11 lines
336 B
Bash
Executable file

#!/usr/bin/env bash
if test $(wl-paste -l) = "image/png"; then
name=$(date '+%Y-%m-%d_%H-%M-%S').png
wl-paste -t "image/png" > ~/Pictures/"$name"
notify-send "Image stored at $name" \
-a grim -c screenshot -u low -t 3000
else
notify-send "No image in clipboard" \
-a grim -c screenshot -u low -t 3000
fi