Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to associate file extension with app? #1387

Open
onnimonni opened this issue Mar 17, 2025 · 1 comment
Open

Is there a way to associate file extension with app? #1387

onnimonni opened this issue Mar 17, 2025 · 1 comment

Comments

@onnimonni
Copy link

Hey,

I would want to always open Markdown files .md with Visual Studio code instead of the default which is Xcode.

Is there a setting to change this behaviour using nix-darwin?

Image

Thanks in advance 🙇

@dustypomerleau
Copy link

I'm pretty sure that this would require a new module. It's a challenging space: The bulk of these settings are stored in ~/Library/Preferences/com.apple.LaunchServices. It is possible to write to com.apple.LaunchServices/com.apple.launchservices.secure.plist using defaults write, but I believe the OS actually uses com.apple.LaunchServices.SettingsStore.sql as its source of truth, and it may be difficult to get the plist to update the DB without a reboot.

Does anyone have any insight into exactly how this works when the action is performed via the Finder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants