Skip to content

Commit

Permalink
don't make identical screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBaars committed Oct 11, 2024
1 parent 6820242 commit f56d7c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Binary file modified install.zip
Binary file not shown.
10 changes: 9 additions & 1 deletion service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ while true; do
mkdir -p $DIR

# Take the screenshot
screencap -p "$DIR/$TIME.png"
FILENAME="$DIR/$TIME.png"
screencap -p "$FILENAME"

# Check if the new file is identical to the previous one
if [ -f "$PREVIOUS_FILE" ] && cmp -s "$FILENAME" "$PREVIOUS_FILE"; then
rm "$FILENAME"
else
PREVIOUS_FILE="$FILENAME"
fi

sleep 10
done

0 comments on commit f56d7c1

Please sign in to comment.