screenshot 741 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. timestamp="$(date +%Y%m%d%H%M%S)"
  3. targetbase="$HOME/screenshots"
  4. mkdir -p $targetbase
  5. [ -d $targetbase ] || exit 1
  6. case $1 in
  7. full)
  8. type="$targetbase/full_screnshot_$timestamp.png"
  9. /usr/bin/maim $type
  10. notify-send "Archivo guardado en $type"
  11. ;;
  12. selected_window)
  13. type="$targetbase/selected_window_$timestamp.png"
  14. /usr/bin/maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage $type
  15. notify-send "Archivo guardado en $type"
  16. ;;
  17. selected_area)
  18. type="$targetbase/selected_area_$timestamp.png"
  19. /usr/bin/maim -s $type | xclip -selection clipboard -t image/png
  20. notify-send "Archivo guardado en $type"
  21. ;;
  22. esac
  23. exit 0