johnste / finicky

A macOS app for customizing which browser to start

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iTerm2 integration with Finicky

clustor opened this issue · comments

Have you tried creating configuration for this application?

I added this handler but bundleId, name and path are all returning null. I would like "open" command to launch URLs in a specific browser.

match: ({ opener }) => {finicky.log("Received opener path " + opener.path + " opener name " + opener.name + " opener bundleId" + opener.bundleId); return false}, browser: "Google Chrome" },

Has anyone else tried to make this application work with Finicky before?
I didn't see any references to integrating iTerm2.

What application are you trying to set up
iTerm2
/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' /Applications/iTerm.app/Contents/Info.plist com.googlecode.iterm2

It very much depends on how the url is opened.

If you're using the native link recognition functionality of iTerm (where you can Cmd+click on a link and it opens), the opener config should work (and works for me).

If some command in the shell is what is opening the url (e.g. open http://127.0.0.1), then you are effectively opening the url via a subprocess, and all properties on opener seem to be null, except opener.pid, which represents that open process — which subsequently quickly disappears as it's async.

I suppose if we could get a hold of the parent pid and walk the process tree, you could probably find a process name (in my case tmux) that one could use fairly reliably to determine that the opener was indeed my terminal.

Just noticed this is a duplicate issue of #168 @johnste