1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat(i3): improve mail status

This commit is contained in:
Kierán Meinhardt
2020-05-19 14:58:50 +02:00
parent 796f73ef5f
commit ba03c19a74

View File

@@ -110,11 +110,12 @@ in
block = "custom";
interval = 30;
command = pkgs.writers.writeDash "mail-new" ''
printf "%s " "📧"
for dir in /home/kfm/mail/*/Inbox/new
do
find "$dir" -type f | wc --lines
done | paste --serial --delimiters='/' -
new_mail="$(find "$dir" -type f | wc --lines)"
[ "$new_mail" = 0 ] && printf "📭" || printf "📬"
echo "$new_mail"
done | paste --serial --delimiters=" " -
'';
on_click = setsid (pkgs.writers.writeDash "mail-update" ''
${pkgs.libnotify}/bin/notify-send newsboat "Updating mail. " \