ICloud – Different Computer Modes for MBP

applicationsbatteryicloudservices

Is there a way to set different modes on my Macbook Pro. For example, I use my MBP for work, school and home. When I am at school I do not have my macbook plugged in to a charger and have to choosy as to what apps/services I can run so my battery does not drain. However, when I am at work or home, my MBP is plugged in and the apps/processes running are inconsequential.

What I would like to be able to do, is have like a school mode, which would automatically turn off iCloud Drive sync, OneDrive, Dropbox, Bluetooth, and some other services, all with the click of a button. Then, with another click of a button, turn on, or reenable these app/services when I get to work or home.

Is there a way to achieve this, or do I just need to manually do it?

Thank you.

Best Answer

You can easily do it with Automator workflow and AppleScript: Open Automator When it asks you what to create, choose "Application" Then from the Utillities folder on the left, drag the "AppleScript" one into the workflow, and instead of the line saying "You script goes here", type:

tell application "System Preferences"
    reveal pane id "com.apple.preferences.Bluetooth"
    tell application "System Events" to tell process "System Preferences"
        click checkbox "On" of window 1
    end tell
    quit
end tell

quit app "OneDrive"
quit app "Dropbox"

The first part turns off bluetooth, and the last two lines quit applications. If you want to quit more applications, just add quit app "<application name here>" to the AppleScript.

Two re-enable bluetooth, and re-open the applications, just create another workflow with an identical AppleScript, except change the last two lines to:

tell application "OneDrive" to activate
tell application "Dropbox" to activate

and if you want to add more applications, just add tell application "<application name here>" to activate.

Hope this helps!