mirror of
https://github.com/Horhik/dotfiles.git
synced 2024-11-27 02:21:32 +00:00
13 lines
236 B
Bash
13 lines
236 B
Bash
#!/bin/sh
|
|
|
|
SERVER=""
|
|
NETRC=".netrc"
|
|
|
|
inbox=$(curl -sf --netrc-file "$NETRC" -X "STATUS INBOX (UNSEEN)" imaps://"$SERVER"/INBOX | tr -d -c "[:digit:]")
|
|
|
|
if [ "$inbox" ] && [ "$inbox" -gt 0 ]; then
|
|
echo "# $inbox"
|
|
else
|
|
echo ""
|
|
fi
|