os/+arch (lemonbar): update mail lemon
This commit is contained in:
parent
a74aebbc98
commit
aeec9b7ed3
|
@ -2,12 +2,11 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
CWD=$(dirname $0)
|
CWD=$(dirname $0)
|
||||||
if [[ ! -f ~/.private/config/email.conf ]]; then
|
if [[ ! -f ~/.private/config/email ]]; then
|
||||||
>&2 echo "Couldn't load account settings"
|
>&2 echo "Couldn't load account settings"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. $HOME/.private/config/email.conf
|
|
||||||
. $CWD/../panel-config
|
. $CWD/../panel-config
|
||||||
|
|
||||||
get_mail() {
|
get_mail() {
|
||||||
|
@ -69,10 +68,11 @@ parse_xml() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
a=$(get_mail "${MAIL1_USER}" "${MAIL1_PASS}")
|
total=0
|
||||||
b=$(get_mail "${MAIL2_USER}" "${MAIL2_PASS}")
|
while read -r line; do
|
||||||
c=$(get_mail "${MAIL3_USER}" "${MAIL3_PASS}")
|
IFS=, read -r _addr _pwd <<< "$line"
|
||||||
total=$(( $a + $b + $c ))
|
total=$(( total + $(get_mail "$_addr" "$_pwd") ))
|
||||||
|
done < "$HOME/.private/config/email"
|
||||||
|
|
||||||
icon="${ICON_MAIL}"
|
icon="${ICON_MAIL}"
|
||||||
color="${COLOR_FG}"
|
color="${COLOR_FG}"
|
||||||
|
|
Loading…
Reference in a new issue