From d076f1c59464844fc755e6941933c84613cd25d8 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Tue, 18 Dec 2018 14:36:52 -0500 Subject: [PATCH] Screenshot macos --- bin/SC | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/SC diff --git a/bin/SC b/bin/SC new file mode 100755 index 0000000..df62411 --- /dev/null +++ b/bin/SC @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +FILENAME="/Users/tyrel/tmp/screenshot.png" +screencapture -i $FILENAME +osascript -e "display notification \"Saved $FILENAME\" with title \"Tyrel Upload\"" + +sleep 1 + +MD5=($(md5 -q "$FILENAME")) +osascript -e "display notification \"Saved $MD5\" with title \"Tyrel Upload\"" +fname=$MD5.png +scp -rp "$FILENAME" vps:/www/tyrelsouza.com/screenshots/$fname; +osascript -e "display notification \"Uploaded $FILENAME to https://tyrelsouza.com/screenshots/$fname\" with title \"Tyrel Upload\"" +echo https://tyrelsouza.com/screenshots/$fname | pbcopy +rm "$FILENAME"