This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
2021-02-13 20:17:23 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
######################################################################
|
2021-02-15 00:12:27 +01:00
|
|
|
# @author : swytch (adapted from Luke Smith - lukesmith.xyz)
|
2021-02-13 20:17:23 +01:00
|
|
|
# @file : sb-mailbox
|
|
|
|
# @license : MIT
|
|
|
|
# @created : Saturday Feb 13, 2021 18:15:13 CET
|
|
|
|
#
|
|
|
|
# @description : mail block for dwmblocks
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
|
|
unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)"
|
|
|
|
|
|
|
|
pidof mbsync >/dev/null 2>&1 && icon=""
|
|
|
|
|
|
|
|
[ "$unread" = "0" ] && [ "$icon" = "" ] || echo " $unread$icon"
|
|
|
|
|
|
|
|
|