31 lines
406 B
Bash
Executable file
31 lines
406 B
Bash
Executable file
#!/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"
|