pic 575 B

123456789101112131415161718192021
  1. #!/usr/bin/env bash
  2. # ▓▓▓▓▓▓▓▓▓▓
  3. # ░▓ Author ▓ Abdullah <https://abdullah.today/>
  4. # ░▓▓▓▓▓▓▓▓▓▓
  5. # ░░░░░░░░░░
  6. # A simple script to take screenshots and copy it to clipboard
  7. x=1920
  8. y=1080
  9. idx=1
  10. width=$(( $x ))
  11. height=$(( $y ))
  12. start_x=$(( $idx * $x ))
  13. start_y=$(( 0 ))
  14. sleep 1
  15. import -window root -quality 100 /tmp/scrot.png
  16. convert /tmp/scrot.png -crop ${width}x${height}+${start_x}+${start_y} /tmp/scrot-modified.png 2>/dev/null
  17. cat /tmp/scrot-modified.png | xclip -selection clipboard -t image/png