scripts

scripts to make my pc work
Index Commits Files Refs
takescreenshot (529B)
   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 scrot -q 100 $FILENAME
   9 
  10 convert -brightness-contrast 10x10 $FILENAME -resize 512x512 \
  11     /tmp/takescreenshot_icon.png
  12 
  13 ACTION=$(dunstify -r 1 -t 5000 -h "string:bgcolor:#111111" \
  14     "Saving screenshot to $FOLDER" -h "string:bgcolor:#111111" \
  15     "Right click to open" --action=3,Open -i /tmp/takescreenshot_icon.png)
  16 
  17 [ $ACTION -eq 3 ] && mimeopen $FILENAME;