From aeec9b7ed3f919fb37fe3d016b6707b0b6373315 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 26 Apr 2017 18:53:17 -0400 Subject: [PATCH] os/+arch (lemonbar): update mail lemon --- os/+arch/.config/panel/lemons/mail | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/os/+arch/.config/panel/lemons/mail b/os/+arch/.config/panel/lemons/mail index 1eebc367..56dace99 100755 --- a/os/+arch/.config/panel/lemons/mail +++ b/os/+arch/.config/panel/lemons/mail @@ -2,12 +2,11 @@ set -e CWD=$(dirname $0) -if [[ ! -f ~/.private/config/email.conf ]]; then +if [[ ! -f ~/.private/config/email ]]; then >&2 echo "Couldn't load account settings" exit 1 fi -. $HOME/.private/config/email.conf . $CWD/../panel-config get_mail() { @@ -69,10 +68,11 @@ parse_xml() { } # -a=$(get_mail "${MAIL1_USER}" "${MAIL1_PASS}") -b=$(get_mail "${MAIL2_USER}" "${MAIL2_PASS}") -c=$(get_mail "${MAIL3_USER}" "${MAIL3_PASS}") -total=$(( $a + $b + $c )) +total=0 +while read -r line; do + IFS=, read -r _addr _pwd <<< "$line" + total=$(( total + $(get_mail "$_addr" "$_pwd") )) +done < "$HOME/.private/config/email" icon="${ICON_MAIL}" color="${COLOR_FG}"