Skip to content

matthewdias/finicky

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 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 activate browser
  • Resolving short urls before running them through handlers

Install

  1. Download the latest release, unzip and drop Finicky.app in your application folder. Or, if you have homebrew-cask set up, install with brew cask install finicky.
  2. Create a file called .finicky.js in your home directory and set up a default browser and some 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'
		}
	}
});

// Open Twitter links in client
finicky.onUrl(function(url, opts) {
	var matches = url.match(/^https?:\/\/twitter\.com\/.+\/status\/([0-9]+)/)
	if (matches && matches[1]) {
		var statusId = matches[1];
		return {
			url: 'twitter://status?id=' + statusId,
			bundleIdentifier: 'com.twitter.twitter-mac'
		}
	}
});

// 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']
	}
});

Thoughts about future features

  • Start browser in private/incognito mode
  • Start browser with specific user profile
  • Save url to pocket or some 'watch later' queue

About

Finicky - always opens the right browser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%