Last active
November 19, 2019 10:06
-
-
Save japangly/7ad656458a5868762af40a403ae8b657 to your computer and use it in GitHub Desktop.
Shell Startup File
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
#!/usr/bin/env bash | |
# | |
# Upgrade outdated, and removes old versions of installed formulae. | |
brew update && brew outdated | |
brew upgrade && brew cleanup | |
# | |
# Upgrade version of Flutter | |
flutter upgrade | |
# | |
# Startup applications | |
open -a Finder | |
open -a Mail | |
open -a Calendar | |
open -a Telegram | |
# | |
# Print count-down terminated messages | |
echo "--------------------------------------------------------------" | |
printf "These processes will terminate in ... " | |
for ((i = 0; i < 10; i++)); do | |
if [ $i -lt 10 ]; then | |
printf "$i " | |
else | |
echo "$i" | |
fi | |
done | |
echo "\n--------------------------------------------------------------" | |
# | |
# Quit applications | |
osascript -e 'set openApplicationList to {"Finder"} | |
repeat with openApplication in openApplicationList | |
tell application openApplication to close every window | |
end repeat' | |
osascript -e 'activate application "Telegram" | |
tell application "System Events" | |
keystroke "w" using {command down} | |
end tell' | |
# | |
# Done | |
echo "DONE" | |
# | |
# Quit terminals | |
osascript -e 'tell application "Terminal" to quit' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment