[HN Gopher] Show HN: Infat - Declaritive application assocation ...
___________________________________________________________________
Show HN: Infat - Declaritive application assocation manager for
macOS
Bello! Made this to help navigate the tumultuous process of
navigating to a new machine on Mac when you have a number of custom
utilities setup for editing particular files. This is designed to
make that as easy as possible, and add some magic on top of that,
like setting mailto handlers or anything else of that breed. Use
XDG_CONFIG_HOME to keep it organized. Credit to
https://github.com/moretension/duti for the original inspiration
for the project. Happy to answer and help with whatever.
Author : philocalyst
Score : 47 points
Date : 2025-04-24 17:37 UTC (5 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| deeThrow94 wrote:
| Oh this is very exciting! I do have a request, though--I want to
| list all file extensions an application can open, _specifically_
| so I can use this to ensure xcode isn 't the default for anything
| but xcode-specific files.
| philocalyst wrote:
| Have an idea of how I would do this already, give me until the
| end of the week. To be clear, an interface like this?
|
| Infat list [--identifier] [--application] Where identifier and
| application are mutually exclusive, and application lists the
| openers it is capable of opening by default? Merging the
| application flag for simplicities sake, so either returns a
| list with both their possibilities *and* the assigned apps.
|
| Thoughts?
| deeThrow94 wrote:
| Love it! Seems like it'd be easy to filter out extensions I
| wanna keep and switch them all to emacs or whatever.
| mlenz wrote:
| Great to see this, thanks for sharing! Do you have plans to make
| it available in nixpkgs and potentially as a home-manager or nix-
| darwin module? Then I could add it to my config and have
| everything set up automatically.
| philocalyst wrote:
| I don't use nixpkgs personally but would love to give it a
| shot, check the repo in a day or two to give me some time to
| learn to ropes! I'll shoot you an email if I need any help :)
| gitroom wrote:
| Pretty slick honestly, swapping machines on Mac is usually a pain
| for me so this feels like a lifesaver.
| stinger wrote:
| Running into this error - "Error: Failed to set default
| application: The file couldn't be opened." This seems to be
| happening for extensions that I haven't opened yet (md, json,
| mailto, etc.) For a new laptop, this might not be available yet.
| Once I `touch` a file with those extensions, the config works!.
| FYI, I am using a config.toml file btw.
| philocalyst wrote:
| Okay, confusing -- just tried to replicate on my machine and
| couldn't get that error. When you say touch, you mean creating
| a file with that extension, or any interaction period?
|
| Could you please try to replicate with verbosity enabled (-v)
| and email me the output or file an issue at the repo with the
| results and full summary? It's helpful for tracking. Sorry this
| isn't a quick fix :(
| dmwood wrote:
| 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
| alkh wrote:
| 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
| philocalyst wrote:
| 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
| alkh wrote:
| 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
| philocalyst wrote:
| Yep! Just added a clarification in the README.
|
| After running `infat set IINA mov`:
| https://jezq5q9mfh.ufs.sh/f/Ii8qBn67qEOu1ZUKDXSn3BIE8fDuiWay...
| timenova wrote:
| 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?
| philocalyst wrote:
| 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 ;)
| timenova wrote:
| That would be amazing honestly!
___________________________________________________________________
(page generated 2025-04-24 23:00 UTC)