Skip to content

Instantly share code, notes, and snippets.

@j796160836
Created February 2, 2026 09:24
Show Gist options
  • Select an option

  • Save j796160836/4e2fb3bca3a459e7efad065e3b6f93a4 to your computer and use it in GitHub Desktop.

Select an option

Save j796160836/4e2fb3bca3a459e7efad065e3b6f93a4 to your computer and use it in GitHub Desktop.
#!/bin/zsh
for i in {3..1}; do
echo "Screenshot within $i sec..."
sleep 1
done
FILENAME="screencapture_`(date +'%Y-%m-%d_%H-%M-%S')`.png"
screencapture $FILENAME
echo
echo "Screenshot saved to \"$FILENAME\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment