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.
dotfiles/.local/bin/statusbar/sb-mailbox
David JULIEN 10321a0d21 feat: use dwmblocks as statusbar
remove .local/bin/dwmbar
add .local/bin/statusbar scripts directory
update .profile ($PATH)
update .xprofile (dwmblocks at startup)
2021-02-16 00:29:24 +01:00

20 lines
583 B
Bash
Executable File

#!/usr/bin/env sh
######################################################################
# @author : swytch (swytch@$HOSTNAME)
# @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"