Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 644 Bytes

README.md

File metadata and controls

40 lines (26 loc) · 644 Bytes

defaultbrowser

Command line tool for setting the default browser (HTTP handler) in macOS X.

Install

Build it:

gcc -o defaultbrowser -O2 -framework Foundation -framework ApplicationServices src/main.m

Move it into your executable path:

cp defaultbrowser /usr/local/bin/

Usage

Set the default browser with:

defaultbrowser -set chrome

Running defaultbrowser without arguments shows the current setting.

How does it work?

The code uses the macOS Launch Services API.

License

MIT