Repository navigation
Config file support: load settings from a version-controllable file on disk #991
Closed
florinungur
started this conversation in
Ideas
Replies: 1 comment
|
Duplicate of #331, which is open and already accepted. Closing this. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Let FluidVoice read its settings from a config file on disk, so a user can version-control a machine's configuration and reproduce it.
Problem
Settings live in
UserDefaults.standard, which on macOS is acfprefsd-managed plist. Nobody can track that file in a dotfiles repo: it's binary, the app rewrites it on its own, and a symlink breaks the first timecfprefsdreplaces the file.So a new machine, or a reinstall, means re-entering every preference, shortcut, prompt profile, and app-specific rule by hand.
Proposed solution
On launch, read an optional config file and apply it over the defaults:
${XDG_CONFIG_HOME:-~/.config}/fluidvoice/config.json%APPDATA%\FluidVoice\config.jsonKeys absent from the file keep their current behaviour, so a partial file works. Secrets stay in the Keychain or credential store and never appear in it.
Two open questions:
Alternatives considered
BackupServicealready serialises settings to JSON, but import runs through a file picker in Settings, so no script can apply it at startup.On macOS,
defaults write com.FluidApp.app <key> <value>works from a shell script. It's one-way, it depends on undocumented key names, it needskillall cfprefsdplus a restart, and Windows has no equivalent.Related: #340 asked for this and was closed as a duplicate.
All reactions