#!/bin/sh
export PATH=$PATH:/usr/bin/local
python3 $HOME/Dropbox/bin/send_quitbrowsers_mail3.py
#sleep 10
#/usr/bin/osascript -e 'quit app "Safari"'
#sleep 2
#/usr/bin/osascript -e 'quit app "Vivaldi"'
#sleep 2
#/usr/bin/osascript -e 'quit app "Slack"'
#sleep 2
#/usr/bin/osascript -e 'quit app "Music"'
#sleep 2
#/usr/bin/osascript -e 'quit app "Microsoft Edge"'
prg=( "Safari" "Vivaldi" "Slack" "Music" "Microsoft Edge" "Parallels Desktop" "Paw" "Creative Cloud")
for app in "${prg[@]}"
do
  echo "Quitting $app"
  /usr/bin/osascript -e 'quit app "$app"'
  sleep 2
done
sleep 10
echo "Using killall to backup"
for app in "${prg[@]}"
do
  echo "killall $app"
  killall "$app"
  sleep 2
done
