Skip to content

Instantly share code, notes, and snippets.

@daisyUniverse
Created April 21, 2025 18:17
Show Gist options
  • Save daisyUniverse/99192bc5d4dca9cb0c122faabca55b6f to your computer and use it in GitHub Desktop.
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
#!/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