Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nasyxx
Created July 26, 2020 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nasyxx/a213b63849b2ad8ca42cc207ba2e1cc2 to your computer and use it in GitHub Desktop.
Save nasyxx/a213b63849b2ad8ca42cc207ba2e1cc2 to your computer and use it in GitHub Desktop.
macOS Screen Shot with you name on it.
#!/bin/bash
/usr/sbin/screencapture -i /tmp/ss.png
SSF=$(date +"Screen Shot %Y-%m-%d at %r.png")
W="$(/Users/Nasy/.macports/bin/identify -format "%w" /tmp/ss.png)"
H="$(/Users/Nasy/.macports/bin/identify -format "%h" /tmp/ss.png)"
C="#A7FF83"
/Users/Nasy/.macports/bin/convert \
/tmp/ss.png \
\( -background none -fill $C -font "AppleChancery" -pointsize $((W/30)) -gravity center label:"Nasy" -trim +repage \) \
\( -clone 1 -background black -shadow 80x25+0+0 \) \
\( -clone 1 -clone 2 +swap -background none -layers merge +repage \) \
-delete 1,2 \
-gravity southeast -compose over -composite \
\( -clone 0 -background $C -shadow 80x50+0+0 \) \
-reverse -background none -layers merge +repage \
"/Users/Nasy/Documents/Screenshots/$SSF"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment