1 #!/bin/sh 2 3 # Takes a screenshot of the screen and sends a notification with a preview 4 5 FOLDER=~/pictures/screenshots 6 FILENAME=$FOLDER/$(date "+%H-%M-%S_%d-%m-%Y_scrot.png") 7 8 [ -d $FOLDER ] && scrot -q 100 $FILENAME \ 9 || $(mkdir -p $FOLDER \ 10 && echo "Folder $FOLDER created" \ 11 && scrot -q 100 $FILENAE) 12 13 convert -brightness-contrast 10x10 $FILENAME \ 14 -resize 512x512 /tmp/takescreenshot_icon.png 15 16 # ACTION=$(dunstify -r 1 -t 5000 -h "string:bgcolor:#111111" "Saving screenshot to $FOLDER" -h "string:bgcolor:#111111" "Right click to open" --action=3,Open -i /tmp/takescreenshot_icon.png) 17 18 # [ $ACTION -eq 3 ] && xdg-open $FILENAME;
