Skip to content

Commit

Permalink
Merge pull request #118 from lsbloxx/feature-own-config-path
Browse files Browse the repository at this point in the history
add ROFI_PASS_CONFIG environment variable
  • Loading branch information
carnager committed Mar 10, 2018
2 parents 29307e3 + 04162d6 commit b6514f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions rofi-pass
Expand Up @@ -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"
Expand Down

0 comments on commit b6514f9

Please sign in to comment.