You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
295 B

#!/bin/sh
DIR="$HOME/Pictures/screenshots/"
DATE=$(date +%Y-%m-%d-%H-%M-%S)
FILENAME="$DIR$DATE.png"
maim -s "$FILENAME"
[[ $? = 1 ]] && notify-send "Screenshot cancelled" && exit 1
xclip -selection clipboard -t image/png "$FILENAME"
notify-send -i $FILENAME "Saved screenshot" "$DATE.png"