1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 03:21:10 +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"; block = "custom";
interval = 30; interval = 30;
command = pkgs.writers.writeDash "mail-new" '' command = pkgs.writers.writeDash "mail-new" ''
printf "%s " "📧"
for dir in /home/kfm/mail/*/Inbox/new for dir in /home/kfm/mail/*/Inbox/new
do do
find "$dir" -type f | wc --lines new_mail="$(find "$dir" -type f | wc --lines)"
done | paste --serial --delimiters='/' - [ "$new_mail" = 0 ] && printf "📭" || printf "📬"
echo "$new_mail"
done | paste --serial --delimiters=" " -
''; '';
on_click = setsid (pkgs.writers.writeDash "mail-update" '' on_click = setsid (pkgs.writers.writeDash "mail-update" ''
${pkgs.libnotify}/bin/notify-send newsboat "Updating mail. " \ ${pkgs.libnotify}/bin/notify-send newsboat "Updating mail. " \