diff options
author | Rasmus Steinke <rasi@xssn.at> | 2015-12-27 08:21:28 +0100 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2015-12-27 08:21:28 +0100 |
commit | 9c43549dc285a84d349e4b505c98d3a56e2e8ae2 (patch) | |
tree | 5134ef6f11861b69b0bdba49b6a838890d4da202 | |
parent | 4b8a942fb985811cd65f666c139c4cab0f4f5e64 (diff) | |
download | rofi-pass-9c43549dc285a84d349e4b505c98d3a56e2e8ae2.tar.gz |
autodetect help_color, if none is set
-rw-r--r-- | config.example | 4 | ||||
-rwxr-xr-x | rofi-pass | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/config.example b/config.example index f455aef..712c16a 100644 --- a/config.example +++ b/config.example @@ -33,6 +33,10 @@ passlength='20' # after autotyping an entry. Set to "off" to disable count=2 +# color of the help messages +# leave empty for autodetection +help_color="" + # Clipboard settings # Possible options: primary, clipboard, both clip=primary @@ -4,6 +4,7 @@ # (c) 2015 Rasmus Steinke <rasi@xssn.at> basecommand=$(echo "$0" | awk '{ print $1 }') + # get all password files and create an array list_passwords() { cd "${root}" @@ -491,6 +492,12 @@ if [[ -f $HOME/.config/rofi-pass/config ]]; then source $HOME/.config/rofi-pass/config fi +# set help color +if [[ $help_color == "" ]]; then + help_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | awk -F ', ' '{ print $2 }') + help_separator_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | awk -F ', ' '{ print $2 }') +fi + # check for BROWSER variable, use xdg-open as fallback if [[ -z $BROWSER ]]; then export BROWSER=xdg-open |