You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to specify the location of my config file, rather than being forced to use the platform default.
Proposed solution
When looking up the config file, first check the path specified by an environment variable such as $SLUMBER_CONFIG_PATH. If that path does not exist, then fallback to the default location. This is a common pattern for CLI apps, and I think it would be a good fit for slumber.
Current workaround
Using symlinks to store the canonical version of the config file where I would like, but providing a linked version where slumber looks for it. This approach does work, but it means swapping between config files or having one location across platforms is harder to configure.
Additional context
Other apps that use environment variables to specify non-default config locations:
@LucasPickering if you agree to this suggested feature, I would be willing to try and implement it myself. I haven't written rust before, so it might not happen quickly
@SVendittelli I'm curious, could you elaborate on the use case for this? The intention of the config file is to be modified infrequently, and to be common across all sessions of Slumber. I can see the use case of putting it in a dot files repo, but I'm confused by the part about "swapping between config files". Is this something you would want to do?
Sure, no worries. The primary use case I had in mind was a dotfiles repo and that was my motivation for requesting the feature.
The other use case I had in mind was using something like direnv to set different slumber config files per project. Although I don't currently need to, I can imagine wanting separate ignore_certificate_hosts for personal and work projects.
I completely acknowledge that one could just list all the hosts to ignore in the default config file and have no issues, so this is admittedly a niche use case. What I really want is the dotfiles repo support.
Activity
SVendittelli commentedon Sep 8, 2024
@LucasPickering if you agree to this suggested feature, I would be willing to try and implement it myself. I haven't written rust before, so it might not happen quickly
LucasPickering commentedon Sep 8, 2024
@SVendittelli I'm curious, could you elaborate on the use case for this? The intention of the config file is to be modified infrequently, and to be common across all sessions of Slumber. I can see the use case of putting it in a dot files repo, but I'm confused by the part about "swapping between config files". Is this something you would want to do?
SVendittelli commentedon Sep 8, 2024
Sure, no worries. The primary use case I had in mind was a dotfiles repo and that was my motivation for requesting the feature.
The other use case I had in mind was using something like direnv to set different slumber config files per project. Although I don't currently need to, I can imagine wanting separate
ignore_certificate_hostsfor personal and work projects.I completely acknowledge that one could just list all the hosts to ignore in the default config file and have no issues, so this is admittedly a niche use case. What I really want is the dotfiles repo support.
Customize config path with SLUMBER_CONFIG_PATH
Customize config path with SLUMBER_CONFIG_PATH
Customize config path with SLUMBER_CONFIG_PATH
Customize config path with SLUMBER_CONFIG_PATH
net/slumber: update to 2.1.0
net/slumber: update to 2.1.0
net/slumber: update to 2.1.0
net/slumber: update to 2.1.0