Skip to content
/ finicky Public
forked from johnste/finicky

A macOS app for opening different browsers

License

Notifications You must be signed in to change notification settings

JoySR/finicky

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finicky Finicky logo

Always open the right browser

Finicky is an OS X application that allows you to set up rules that decide which browser is opened for every link that would open the default browser. Open Facebook or Reddit in one browser, and Trello or LinkedIn in another. Or Spotify links in the Spotify client. Or whatever url in whatever app.

Features include:

  • Url rewriting
  • Opening links in background
  • Opening links in the currently active browser
  • Resolving short urls before running them through handlers

Install

  1. Download the latest release, unzip and drop Finicky.app in your application folder. Alternatively, if you have homebrew-cask available, install with brew cask install finicky.
  2. Create a file called .finicky.js in your home directory and set a default browser and one or more url handlers.
  3. Start finicky. Please allow it to be set as the default browser.
  4. And you're done. All http and https links clicked that would have opened a link in your default browser are now first handled by Finicky.

Building from source

Install XCode and XCode command line tools, then from a terminal:

git clone https://github.com/johnste/finicky.git
cd finicky/Finicky
xcodebuild

When complete you'll find a freshly built Finicky app in build/release.

Documentation

Javascript API Documentation

Example configuration

finicky.setDefaultBrowser('com.google.Chrome');

// Open social network links in Google Chrome
finicky.onUrl(function(url, opts) {
  if (url.match(/^https?:\/\/(youtube|facebook|twitter|linkedin)\.com/)) {
    return {
      bundleIdentifier: "com.google.Chrome"
    };
  }
});

// Open Spotify links in client
finicky.onUrl(function(url, opts) {
  if (url.match(/^https?:\/\/open\.spotify\.com/)) {
    return {
      bundleIdentifier: "com.spotify.client"
    };
  }
});

// Rewrite all Bing links to DuckDuckGo instead
finicky.onUrl(function(url, opts) {
  var url = url.replace(
    /^https?:\/\/www\.bing\.com\/search/,
    "https://duckduckgo.com"
  );
  return {
    url: url
  };
});

// Always open links from Mail in Safari
finicky.onUrl(function(url, opts) {
  var sourceApplication = opts && opts.sourceBundleIdentifier;
  if (sourceApplication === "com.apple.mail") {
    return {
      bundleIdentifier: "com.apple.safari"
    };
  }
});

// By supplying an array of bundle identifiers, finicky opens the url in the first one
// that's currently running. If none are running, the first app in the array is started.
finicky.onUrl(function(url, opts) {
  return {
    bundleIdentifier: [
      "org.mozilla.firefox",
      "com.apple.Safari",
      "com.google.Chrome"
    ]
  };
});

A note on the current status of finicky

Finicky is, as of October 2018, under active development. I plan to have a larger release out sometime later this year, with focus on making it simpler to configure. Feel free to leave bug reports and feature requests, so please go ahead and add an issue on github, or ask me on twitter

Alternatives

These are two similar applications, though they are not open source.

About

A macOS app for opening different browsers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 91.9%
  • JavaScript 8.1%