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

Add XDG configuration #85

Open
bkuhlmann opened this issue Jul 17, 2021 · 0 comments
Open

Add XDG configuration #85

bkuhlmann opened this issue Jul 17, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@bkuhlmann
Copy link

bkuhlmann commented Jul 17, 2021

Overview

Would it be possible to add XDG support so our $HOME directories don't get polluted with Frum application data?

Steps to Recreate

By default all Ruby versions are installed in $HOME/.frum which pollutes the $HOME directory. Additionally, when using Frum, I have to use the following Bash aliases to ensure Frum uses proper XDG paths:

alias fmi="frum --frum-dir '$HOME/.cache/frum' install"
alias fms="frum --frum-dir '$HOME/.cache/frum' local"
alias fmu="frum --frum-dir '$HOME/.cache/frum' uninstall"
alias fmv="frum --frum-dir '$HOME/.cache/frum' versions"

Desired Behavior

I would like Frum to use XDG defaults by default. Example:

  • Config: $HOME/.config/frum/configuration.yml (can be TOML, INI, etc instead of YAML. Format doesn't matter much as long as a XDG configuration path is used).
  • Cache: $HOME/.cache/frum (this is what --frum-dir would default too).

Along the above lines, it might be nice to add the following command line arguments:

frum --config-dir # <= `$HOME/.config/frum`
frum --cache-dir # <= `$HOME/.cache/frum`

↑ The above would allow anyone to override the config or cache from the command line but these could also be put in $HOME/.config/frum/configuration.yml as a global configuration too so no one would have to use those CLI flags all of the time. Example:

config: "$HOME/.config/frum/configuration.yml"
cache: "$HOME/.cache/frum"

(these would be the defaults but anyone could customize those settings to non-XDG specifications if they desire).

This will allow all of us to enjoy Frum based on the XDG specification and keep our $HOME directory tidy. 🎉

Environment

  • Operating System: macOS 11.4 (20F71)
  • Frum: 0.1.0
@TaKO8Ki TaKO8Ki added the enhancement New feature or request label Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants