diff options
author | Rasmus Steinke <rasi@xssn.at> | 2018-03-10 11:54:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-10 11:54:48 +0100 |
commit | b6514f9186740f633871fe546625bb916d6d9d68 (patch) | |
tree | d3955f482640e61cb6de5d51318ed794780ee20a | |
parent | 29307e3048acca8f725bc1c0ce799ef2c78dddf9 (diff) | |
parent | 04162d6ae9b72d05df0efb72bb35a7b152fa605b (diff) | |
download | rofi-pass-b6514f9186740f633871fe546625bb916d6d9d68.tar.gz |
Merge pull request #118 from lsbloxx/feature-own-config-path
add ROFI_PASS_CONFIG environment variable
-rw-r--r-- | README.md | 5 | ||||
-rwxr-xr-x | rofi-pass | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -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 @@ -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" |