diff --git a/Makefile b/Makefile index 891bf09..ac8cca4 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ uninstall: ${DESTDIR}${PREFIX}/bin/dwmblocks-battery \ ${DESTDIR}${PREFIX}/bin/dwmblocks-network \ ${DESTDIR}${PREFIX}/bin/dwmblocks-volume \ - ${DESTDIR}${PREFIX}/bin/dwmblocks-fcitx5 + ${DESTDIR}${PREFIX}/bin/dwmblocks-fcitx5 \ + ${DESTDIR}${PREFIX}/bin/dwmblocks-mu4e .PHONY: all options clean install uninstall diff --git a/blocks.def.h b/blocks.def.h index fe9a617..7824b69 100644 --- a/blocks.def.h +++ b/blocks.def.h @@ -4,6 +4,7 @@ static const Block blocks[] = { /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ // {"", "dwmblocks-battery", SECONDS(10), 0}, + {"", "dwmblocks-mu4e", SECONDS(15), 0}, {"", "dwmblocks-volume", 0, 1}, {" ", "date +'%a %b %d'", SECONDS(30), 0}, {" ", "date +'%R'", SECONDS(2), 0}, diff --git a/scripts/dwmblocks-mu4e b/scripts/dwmblocks-mu4e new file mode 100755 index 0000000..7a711cc --- /dev/null +++ b/scripts/dwmblocks-mu4e @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh +let message_count="$(mu find flag:unread AND maildir:/protonmail/Inbox | wc -l)" +(( "${message_count}" > 0 )) && printf ' %s' "${message_count}"