Created
April 21, 2025 18:17
-
-
Save daisyUniverse/99192bc5d4dca9cb0c122faabca55b6f to your computer and use it in GitHub Desktop.
simple screenshot script that saves to a folder and copies image to your clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
normalScrot(){ | |
sleep 0.2 | |
scrot /tmp/clip.png --overwrite -s --freeze -e 'xclip -selection clipboard -target image/png -i $f' && cp /tmp/clip.png $HOME/Pictures/Screenshots/`date +"%m-%d-%Y(%H:%M:%S)"`.png | |
} | |
windowScrot(){ | |
sleep 0.2 | |
scrot -u /tmp/Fclip.png -o && discho -u /tmp/Fclip.png -c general && cp /tmp/Fclip.png $HOME/Pictures/Screenshots/`date +"%m-%d-%Y(%H:%M:%S)"`.png & | |
} | |
case $1 in | |
"-s" | "--normalscrot" ) normalScrot ;; | |
"-w" | "--windowscrot" ) windowScrot ;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment