Jump to content

Set Default Browser

Recommended Posts

Default Browser

An Alfred workflow to set the default web browser. 


▸ Visit on Github ◂ | ▸ Alfred Gallery ◂


Usage Note

  • Set the default web browser using the keyword (default: sdb).
  • The macOS browser change confirmation dialog is automatically accepted.

Utility: Use the workflow’s File Action (name: Bundle Identifier Information) to retrieve an application’s bundle identifier.





Edited by zeitlings
Link to comment
  • 2 months later...

@zeitlingsThanks for this workflow. 


Quick question. When triggered, I think the workflow takes 3-4 seconds to show the brlow popup and then click the "Use <Browser>" button. Is that how it is expected to work. Because the other day I triggered it and start typing something (thinking this browser has been changed in the background) and the popup showed up at the same time I pressed the Tab key, that changed the focus. 






Link to comment

@andy4222 That is probably the Apple Script taking some time to wake up. MacOS will always ask you if you are sure you want to change the browser. The script focuses that modal window and "clicks" the button to accept the change. If you're switching to an another window before that has happened, the script will fail. So yeah, there might be a delay (also for the swift script to execute if it is called the first time after a while; after that it seems to be cached somewhere and executes faster.)

Link to comment
  • 3 weeks later...


On 1/19/2023 at 5:23 PM, zeitlings said:

Add the browsers you’re missing to the list filter and provide the bundle identifiers for them, or remove the ones that you don’t need.


You can add a checkbox list in User Configuration so we can uncheck the browsers we don't want listed.

Link to comment
  • 3 weeks later...
  • 2 weeks later...
42 minutes ago, zeitlings said:

If it can handle http URLs, it should be possible. With v1.2.0 you can just throw it into the List Filter and check if it works. 

There is the "Bundle Identifier Information" Universal Action to find the bundle identifier if you need it.


Do you need me to check anything to add native support?

Link to comment
  • 6 months later...

Thanks for your wonderful workflow. I use it to switch between Safari, Arc, Firefox and Ghost browser. I was able to add Ghost browser using you bundle identifier and manually modify the appropiate files (info.plist, list.sh) and add an icon.

Link to comment
  • 1 month later...
On 1/20/2023 at 8:08 AM, vitor said:

Will be live in the Gallery soon at http://alfred.app/workflows/zeitlings/set-default-browser/.


Thank you for the workflow!

Cos of you - i upgraded to Alfred 5 so I can make use of your nifty feature :)


TLDR; In case someone is reading and like to know why should you regularly change web browser ?
It's part of compartmentalization principle of keeping things together...

In this case, 1 web browser is for work (so all web browsing history and suggestions are from my work related internal webpages) and another web browser for something else..

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...