Skip to content

Add ROFI_PASS_DEFAULT_USER environment variable#112

Merged
carnager merged 1 commit intocarnager:masterfrom
colonelpanic8:custom_default_user
Jan 19, 2018
Merged

Add ROFI_PASS_DEFAULT_USER environment variable#112
carnager merged 1 commit intocarnager:masterfrom
colonelpanic8:custom_default_user

Conversation

@colonelpanic8
Copy link
Contributor

This leaves the current behavior intact and is very portable across shells sh/bash/zsh, though this should not matter since the shell is explicitly specified.

@colonelpanic8
Copy link
Contributor Author

colonelpanic8 commented Jan 19, 2018

Hmmm. it seems that #108 makes changes to default_user as well.

@carnager @blueyed
Is the idea of the default_user variable that it should be edited by the user?

This seems like bad practice to me for a few reasons:

  • these settings will get clobbered every time the user updates
  • If rofi-pass is installed somewhere like /usr/bin, sudo access might be required to edit the script
  • This requires editing on every machine separately

These issues can be mitigated to varying degrees by running from source using your own fork, but that seems like an obviously inferior solution.

This raises the more general question of how exactly rofi-pass should handle configuration:

I think that the best approach would be to look for a file in XDG_DATA_HOME which would be sourced ahead of running rofi-pass so that things like default-user and keybindings can be configured.

Thoughts?

@carnager
Copy link
Owner

carnager commented Jan 19, 2018

rofi-pass first reads its internal config, then overrides settings from global config in /etc/rofi-pass.conf and then overrides settings from XDG_CONFIG_HOME/rofi-pass/config

So yes, you can easily edit every setting in your own config file.

Anyway, I like the idea to be able to override this with a variable.

@carnager carnager merged commit f03ed24 into carnager:master Jan 19, 2018
Nobutarou pushed a commit to Nobutarou/rofi-pass that referenced this pull request Dec 7, 2020
Add ROFI_PASS_DEFAULT_USER environment variable

Former-commit-id: f03ed24
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.

2 participants