clean up scripts
This commit is contained in:
12
.config/polybar/scripts/inbox-imap-shellnetrc.sh
Normal file
12
.config/polybar/scripts/inbox-imap-shellnetrc.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user