Live data from Hacker News

Show HN: Infat – Declaritive application assocation manager for macOS

github.com

11–20 of 43 posts

Re: Show HN: Infat – Declaritive application assocation manager for macOS

#12
post #11

Shell dependencies for install? Got: bash-3.2# just package && mv dist/infat* /usr/local/bin/infat # Wildcard because output name includes platform bash: just: command not found

just is a great command runner[1], not a shell script. Looks like it is needed if you build from source or install from Github releases. Alternatively, use `brew install philocalyst/tap/infat`(haven't done it myself but I bet it has just as a dependency anyway) [1] https://github.com/casey/just

Re: Show HN: Infat – Declaritive application assocation manager for macOS

#13
That's great, I've struggled with this problem a lot. To double-check, this essentially allows you to specify a default app that is being opened when you click on a file via Finder or via terminal's `open` program, correct? I haven't seen this exact clarification in README

Re: Show HN: Infat – Declaritive application assocation manager for macOS

#14
post #11

Shell dependencies for install? Got: bash-3.2# just package && mv dist/infat* /usr/local/bin/infat # Wildcard because output name includes platform bash: just: command not found

No dependencies for install, just is the command runner I use to keep things organized, it's a replacement for make(1). If it hurts to download just, you can build using SPM:

swift build -c release

mv .build/PLATFORM/release/infat /usr/local/bin

Re: Show HN: Infat – Declaritive application assocation manager for macOS

#15
post #13

That's great, I've struggled with this problem a lot. To double-check, this essentially allows you to specify a default app that is being opened when you click on a file via Finder or via terminal's `open` program, correct? I haven't seen this exact clarification in README

Yep! Just added a clarification in the README.

After running `infat set IINA mov`: https://jezq5q9mfh.ufs.sh/f/Ii8qBn67qEOu1ZUKDXSn3BIE8fDuiWay...

Re: Show HN: Infat – Declaritive application assocation manager for macOS

#17

This is amazing! I set a few extensions manually. However, does anyone know a way to set all text-like documents to open with a single editor (for example Zed) on Mac? Even text files without any extensions?

It wouldn't be possible with the current interface, but I have a feeling it's possible. I'm thinking it's part of a new configuration option "type" that allows you to define openers for categories of files (text,video,etc.)

I can get it out in a week ;)

Re: Show HN: Infat – Declaritive application assocation manager for macOS

#18

This is amazing! I set a few extensions manually. However, does anyone know a way to set all text-like documents to open with a single editor (for example Zed) on Mac? Even text files without any extensions?

It wouldn't be possible with the current interface, but I have a feeling it's possible. I'm thinking it's part of a new configuration option "type" that allows you to define openers for categories of files (text,video,etc.) I can get it out in a week ;)

That would be amazing honestly!

Re: Show HN: Infat – Declaritive application assocation manager for macOS

#20
post #19

Is there a way to pass arguments or some other options? For example, TextEdit can be opened in plain text or rich text mode.

There is not, infat is subject to the limitations of Apple's API for setting handlers, which do not support passing in any data that an application could work with. If you wanted to, and have the time, I would recommend setting up a wrapper with https://github.com/sveinbjornt/Platypus with applescript. Then you could make an alternate for whichever mode you please and set it as an opener using infat. Clunky but functional.
Post reply on HN