2022-03-03 10:17:04 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
# -*- mode: scheme; -*-
|
|
|
|
IFS=" "
|
|
|
|
exec scsh -s "$0" "$@"
|
2021-11-06 09:15:25 +01:00
|
|
|
!#
|
|
|
|
|
|
|
|
(define mail-root (string-append (getenv "HOME") "/documents/mail"))
|
|
|
|
|
|
|
|
(define unread-emails
|
|
|
|
(run/sexp (pipe (find ,mail-root -type f -name "*:2,*" -and -not -name "*:2,*S*")
|
|
|
|
(wc -l))))
|
|
|
|
|
|
|
|
(define new-emails
|
|
|
|
(run/sexp (pipe (find ,mail-root -type f -wholename "*/new/*")
|
|
|
|
(wc -l))))
|
|
|
|
|
|
|
|
(display (+ unread-emails new-emails))
|