Added dwmblocks-mu4e

This commit is contained in:
Alexander Rosenberg 2023-09-29 03:39:29 -07:00
parent cf2d0ed30e
commit cef428daea
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
3 changed files with 6 additions and 1 deletions

View File

@ -32,6 +32,7 @@ uninstall:
${DESTDIR}${PREFIX}/bin/dwmblocks-battery \ ${DESTDIR}${PREFIX}/bin/dwmblocks-battery \
${DESTDIR}${PREFIX}/bin/dwmblocks-network \ ${DESTDIR}${PREFIX}/bin/dwmblocks-network \
${DESTDIR}${PREFIX}/bin/dwmblocks-volume \ ${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 .PHONY: all options clean install uninstall

View File

@ -4,6 +4,7 @@
static const Block blocks[] = { static const Block blocks[] = {
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
// {"", "dwmblocks-battery", SECONDS(10), 0}, // {"", "dwmblocks-battery", SECONDS(10), 0},
{"", "dwmblocks-mu4e", SECONDS(15), 0},
{"", "dwmblocks-volume", 0, 1}, {"", "dwmblocks-volume", 0, 1},
{"", "date +'%a %b %d'", SECONDS(30), 0}, {"", "date +'%a %b %d'", SECONDS(30), 0},
{"", "date +'%R'", SECONDS(2), 0}, {"", "date +'%R'", SECONDS(2), 0},

3
scripts/dwmblocks-mu4e Executable file
View File

@ -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}"