aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rwxr-xr-xrofi-pass5
2 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index a27cd30..607424e 100644
--- a/README.md
+++ b/README.md
@@ -78,8 +78,13 @@ in a convenient way using [rofi](https://github.com/DaveDavenport/rofi).
## Configuration
rofi-pass may read its configuration values from `/etc/rofi-pass.conf` and/or `$HOME/.config/rofi-pass/config`.
+You can also set a configuration by using the environment variable ROFI_PASS_CONFIG (see example below).
For an example configuration please take a look at the included `config.example` file.
+```
+ROFI_PASS_CONFIG="$HOME/path/to/config" rofi-pass
+```
+
## Extras
### addpass
diff --git a/rofi-pass b/rofi-pass
index 752ee2c..180dca5 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -724,6 +724,11 @@ main () {
source "$HOME/.config/rofi-pass/config"
fi
+ # check if path to config in environment variable exists and load it
+ if [[ -f "$ROFI_PASS_CONFIG" ]]; then
+ source "$ROFI_PASS_CONFIG"
+ fi
+
# create tmp dir
if [[ ! -d "$HOME/.cache/rofi-pass" ]]; then
mkdir "$HOME/.cache/rofi-pass"