waybar: rename scripts, increase mail interval
This commit is contained in:
parent
b4b0adf131
commit
950c7602d9
4 changed files with 4 additions and 4 deletions
18
bin/mail
18
bin/mail
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
MAILDIR=$HOME/.mail
|
||||
ACCOUNTS=(posteo gmail xkonni)
|
||||
|
||||
text=""
|
||||
total=0
|
||||
for acc in ${ACCOUNTS[@]}; do
|
||||
count=$(notmuch count folder:$acc/Inbox AND tag:unread AND NOT tag:killed)
|
||||
total=$((total+count))
|
||||
text+="$count"
|
||||
[ ! $acc = ${ACCOUNTS[-1]} ] && text+=", "
|
||||
done
|
||||
|
||||
alt=$( [ $total -gt 0 ] && echo "unread" || echo "read" )
|
||||
text="$total ($text)"
|
||||
json="{\"text\": \"$text\", \"class\": \"mail\", \"alt\": \"$alt\"}"
|
||||
echo $json
|
Loading…
Add table
Add a link
Reference in a new issue