dotfiles/.i3blocks/claws-mail

32 lines
406 B
Text
Raw Normal View History

2021-08-12 20:26:12 +02:00
#!/bin/bash
stats=($(claws-mail --status))
status="$?"
new=${stats[0]}
unread=${stats[1]}
if [[ "$unread" == "Claws" ]]
then
swaymsg -q -- exec claws-mail --online
fi
if [[ "$button" -eq 1 ]]
then
swaymsg -q -- workspace 🖂
fi
if [[ "$unread" -eq 0 ]]
then
color="#747369"
icon="📪"
elif [[ "$new" -eq 0 ]]
then
color="#FFCC66"
icon="📫"
else
color="#F2777A"
icon="📬"
fi
echo "$icon"