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

Specify configuration directory through an environment variable #75

Open
awanwar opened this issue Apr 4, 2023 · 4 comments
Open

Specify configuration directory through an environment variable #75

awanwar opened this issue Apr 4, 2023 · 4 comments
Assignees

Comments

@awanwar
Copy link
Contributor

awanwar commented Apr 4, 2023

I'm trying to set up a custom scheme on macOS, and I want to place the theme file where my other config files are, in $XDG_CONFIG_HOME. The directory for custom themes and templates are placed at preference_dir() from Rust, which on macOS does not correspond to where I want the directory to be. I'd like to request the ability to change this through an environment variable such as $FLAVOURS_CONFIG_DIRECTORY or $FLAVOURS_CUSTOM_DIRECTORY.

This would involve changing lines 40-42 in main.rs to change flavours_config_dir to be set through an environment variable.

@awanwar
Copy link
Contributor Author

awanwar commented Apr 4, 2023

I also noticed the custom scheme doesn't get discovered if it's hidden behind a symlinked folder. That might need its own issue though.

@tiesebarrell
Copy link

I noticed the same issue when attempting to re-use a custom template on MacOS after I set it up in my dotfiles for Linux. The preferences directory is read from a standard MacOS location that's not configurable with an environment variable, which works great for FLAVOURS_CONFIG_FILE and FLAVOURS_DATA_DIRECTORY. It would be a great addition if there was a FLAVOURS_CONFIG_DIRECTORY that was supported.

@tiesebarrell
Copy link

I just tested symlinking from the Preferences folder to the .config directory, which does work for me. I performed ln -s ~/.config/flavours /Users/<username>/Library/Preferences/flavours

@Misterio77 Misterio77 self-assigned this May 2, 2023
@Misterio77
Copy link
Owner

I also noticed the custom scheme doesn't get discovered if it's hidden behind a symlinked folder. That might need its own issue though.

Please do open an issue! I'll fix it ASAP.

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

3 participants