nix/scripts/mail-count.nix

8 lines
230 B
Nix

{ pkgs }:
pkgs.writeShellScriptBin "mail-count" ''
NEW=$(find /home/joe/.mail/fivesigma/Inbox/new -type f | wc -l)
READ=$(find /home/joe/.mail/fivesigma/Inbox/cur -type f | wc -l)
echo "{\"new\": $NEW, \"read\": $READ}"
''