Last active
August 22, 2020 18:01
-
-
Save jkereako/2cfbeb39158d82e5ce764073f0120142 to your computer and use it in GitHub Desktop.
Toying with a start-up script for my MacBook Pro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open Safari | |
tell application "Safari" | |
# Default to HackerNews | |
open location "https://news.ycombinator.com" | |
activate | |
end tell | |
# Open Outlook if you have it. | |
try | |
tell application "Microsoft Outlook" | |
activate | |
end tell | |
on error | |
# do nothing | |
end try | |
# Open Slack if you have it | |
try | |
tell application "Slack" | |
activate | |
end tell | |
on error | |
# do nothing | |
end try | |
# Open Terminal and update Homebrew packages. | |
# This can take a while. | |
tell application "Terminal" | |
activate | |
do shell script "/usr/local/bin/brew update; /usr/local/bin/brew upgrade; /usr/local/bin/brew cask upgrade; /usr/local/bin/brew cleanup" | |
end tell | |
# Notify the user | |
display notification "The startup script completed successfully." with title "You're ready to roll!" sound name "Glass" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Every day I open the same applications and type in the same commands, you probably do as well.
What it does: