dotfiles/.local/bin/aws
2025-05-26 01:04:13 -06:00

14 lines
378 B
Bash
Executable file

#!/bin/sh
# amolinae's wayland screenshotter
notify(){
notify-send "aws" "screenshot copied to clipboard"
}
img="$HOME/Pictures/$(date +"%d_%m_%y-%H_%M_%S").png"
case "$1" in
-f) grim "$img" && wl-copy -t image/png < "$img" && notify ;;
-r) grim -g "$(slurp)" "$img" && wl-copy -t image/png < "$img" && notify ;;
-h|*) echo "usage: aws [-f] [-r]" >&2; exit 1; ;;
esac