MacOS – Dynamically change the default browser

google-chromemacossafari

Chrome absolutely kills battery life on my MBA.

So I would like to switch my default browser to Safari when I am unplugged. When plugged in, I would like Chrome to be the default browser.

Any ideas how to do this?

I've seen tools like Hammerspoon but couldn't find a use case for what I need.

Best Answer

ControlPlane would be a good option for you. It has the ability to define contexts based on specific criteria (if plugged in to power or not), and perform many different actions based on those criteria (including switching your default browser).

Here's a screenshot of ControlPlane's Evidence Sources window and DefaulBrowser Action settings:

ControlPlane's Evidence Sources window and DefaulBrowser Action settings

I use ControlPlane for a lot of things, like switching my Network Location based on the wifi network I'm connected to, and switching my default browser based on my Network Location. It's a really powerful little utility.

Related Question