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 ROFI_PASS_CONFIG environment variable #118

Merged
merged 1 commit into from
Mar 10, 2018

Conversation

lsbloxx
Copy link
Contributor

@lsbloxx lsbloxx commented Mar 10, 2018

No description provided.

@carnager carnager merged commit b6514f9 into carnager:master Mar 10, 2018
@carnager
Copy link
Owner

thanks

@moviuro
Copy link
Contributor

moviuro commented Mar 11, 2018

To avoid conflicts, I would use here https://github.com/carnager/rofi-pass/pull/118/files#diff-9c2e6bc22af7bed199ed145d116eaaf0R721:

: "${ROFI_PASS_CONFIG:="$HOME/.config/rofi-pass/config"}"

Which: if unset, sets ROFI_PASS_CONFIG; if set, does nothing.

This prevents https://github.com/carnager/rofi-pass/pull/118/files#diff-9c2e6bc22af7bed199ed145d116eaaf0R729 from sourcing a second file.

I think we must have a cleaner workflow to use in the following order of preference:

  1. User supplied config file (ROFI_PASS_CONFIG)
  2. Default location for user config ($HOME/.config/rofi-pass/config)
  3. Default system-wide config (/etc/rofi-pass.conf)

@lsbloxx
Copy link
Contributor Author

lsbloxx commented Mar 12, 2018

Is there any problem sourcing multiple files? Would it not just overwrite previously loaded settings? Sourcing multiple config files could also be a feature. Don't get me wrong. I totally see your point @moviuro. It is probably cleaner your way. I just want to know. :)

@moviuro
Copy link
Contributor

moviuro commented Mar 12, 2018

Sourcing multiple files could indeed rewrite settings, but also set things that you don't want set.

If a global file (owned by root in /etc) sets $FOOBAR but your local (personal) file doesn't, I expect the global file to be ignored and $FOOBAR to be unset for my user.

For example, ssh_config(5) says it uses the first set value. makepkg.conf(5) OTOH says it overrides system config with the local config. Just food for thought.

@carnager
Copy link
Owner

Well I am open for clearer solutions. what rofi-pass does right now is:

  1. set internal default values.
  2. source global config
  3. source user config
  4. source custom config, if present.

I agree that this seems a bit messy. I am open for better solutions.

lsbloxx added a commit to lsbloxx/rofi-pass that referenced this pull request Mar 14, 2018
carnager added a commit that referenced this pull request Mar 14, 2018
fixed loading multiple config files to one, see #118
Nobutarou pushed a commit to Nobutarou/rofi-pass that referenced this pull request Dec 7, 2020
add ROFI_PASS_CONFIG environment variable

Former-commit-id: b6514f9
Nobutarou pushed a commit to Nobutarou/rofi-pass that referenced this pull request Dec 7, 2020
Nobutarou pushed a commit to Nobutarou/rofi-pass that referenced this pull request Dec 7, 2020
fixed loading multiple config files to one, see carnager#118

Former-commit-id: 8a5a12e
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

Successfully merging this pull request may close these issues.

3 participants