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

Where does finicky store the path to the config file? #315

Open
usizu opened this issue Jul 29, 2023 · 5 comments
Open

Where does finicky store the path to the config file? #315

usizu opened this issue Jul 29, 2023 · 5 comments

Comments

@usizu
Copy link

usizu commented Jul 29, 2023

Any ideas, suggestions or other feedback

Question: is there a config file in which finicky remembers the path to the specified .finicky.js file?

Reason: In the finicky menu it's possible to select a config file at an arbitrary path. I'm using a dotfile manager to manage my .finicky.js file at a non-default path (.config/..., to keep my ~/ folder tidy) which means manually telling finicky where the new file is located when installing finicky and the config on a fresh machine.

I want to have the whole thing automated (finicky with Brew bundle and the config with chez-moi). It's almost there except I need to manually tell finicky where the new config is located.
Is there some file in which finicky is storing the path to .finicky.js, so that I could put into my dotfile manager also? Then when I deploy finicky and its settings to a new machine, I won't have to manually point it to the custom config path.

Hope I'm making sense, thanks for any info

@jbleuzen
Copy link

jbleuzen commented Oct 4, 2023

It's a constant in the code => /Finicky/Finicky/Config.swift
I think you can't do what you want...

@kyounger
Copy link

Interestingly, there is a way to "Use another file..." from the menu bar drop down. If you add a different config file location through that UI, and then run the command:

/usr/libexec/PlistBuddy -c print ~/Library/Preferences/net.kassett.finicky.plist

It clearly shows that file being stored in some encoded way. Beyond my MacFu to understand how to get that set programmatically.

@kyounger
Copy link

The other issue is that it seems it can't use a symlink as the config file setting, making using nix home-manager difficult.

@kyounger
Copy link

If it helps anyone else coming here for the same thing, I ended up just hacking a little around it.

  home.file.".config/finicky" = {
    source = ./finicky;
    onChange = "cat ~/.config/finicky/fincky.js > ~/.finicky.js";
  };

@gshpychka
Copy link

If it helps anyone else coming here for the same thing, I ended up just hacking a little around it.

  home.file.".config/finicky" = {
    source = ./finicky;
    onChange = "cat ~/.config/finicky/fincky.js > ~/.finicky.js";
  };

Thanks for this! This might be even better:

{config, ...}: let
  filePath = "finicky/config.js";
in {
  xdg.configFile.${filePath} = {
    source = ./config.js;
    onChange = "cat ${config.xdg.configHome}/${filePath} > ${config.home.homeDirectory}/.finicky.js";
  };
}

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

4 participants