From e40d3052d0d191b13af515c8770e9796068f2b6c Mon Sep 17 00:00:00 2001 From: michaeldimmitt Date: Mon, 5 Feb 2018 04:08:57 -0500 Subject: [PATCH] fix, Constant popup on iMac #32. pending verification. also, when I get a change to get on a desktop computer. --- .hide/app/install/battery_check.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.hide/app/install/battery_check.sh b/.hide/app/install/battery_check.sh index 7e57af1..3bec330 100755 --- a/.hide/app/install/battery_check.sh +++ b/.hide/app/install/battery_check.sh @@ -52,5 +52,13 @@ elif [ "$result" == "No" ] ; then fi | tail -n 1 fi else - osascript -e 'display notification " something went wrong, contact michael; did some bad programming." with title "Aerial Desktop"' + if [ "$(ioreg -n AppleSmartBattery | grep -c Max)" -ge 1 ]; + then osascript -e 'display notification " something went wrong, contact michael; did some bad programming." with title "Aerial Desktop"' + else osascript -e 'display notification " Desktop Computer not needing battery consideration." with title "Aerial Desktop activating program."'; + if curl --silent --head https://github.com/michaeldimmitt/aerial_desktop;-- + then $DIR/./3_install_launch_agent.sh# echo Internet status: OK;- + else osascript -e 'display notification "Please connect your computer to internet." with title "Aerial Desktop"'# echo Internet status: ERROR;- + fi | tail -n 1 + fi + fi