diff options
| author | EuAndreh <eu@euandre.org> | 2021-06-10 23:04:56 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2021-06-10 23:04:56 -0300 |
| commit | f516b618a180ae4cefce50d5ef27f2af9bde927e (patch) | |
| tree | c8af85366ae3bb50576004d87d8f8c7b2f2dbea3 /xmonad/scripts | |
| parent | configuration.nix: Use queued version of msmtp as sendmail (diff) | |
| download | dotfiles-f516b618a180ae4cefce50d5ef27f2af9bde927e.tar.gz dotfiles-f516b618a180ae4cefce50d5ef27f2af9bde927e.tar.xz | |
xmobar: Rename xmobar-{notmuch => mail}.sh and show queued emails on it
Diffstat (limited to 'xmonad/scripts')
| -rwxr-xr-x | xmonad/scripts/xmobar-mail.sh | 11 | ||||
| -rwxr-xr-x | xmonad/scripts/xmobar-notmuch.sh | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/xmonad/scripts/xmobar-mail.sh b/xmonad/scripts/xmobar-mail.sh new file mode 100755 index 00000000..05ab8a56 --- /dev/null +++ b/xmonad/scripts/xmobar-mail.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +while true; do + printf "mail: %s/%s - %s\n" "$(notmuch count tag:unread AND NOT tag:lists AND NOT tag:killed)" "$(notmuch count tag:inbox AND NOT tag:lists tag:killed)" "$(msmtp-queue -d | grep -c '^From')" + if acpi -a | grep -q off-line; then + sleep $((60 * 15)) + else + sleep $((60 * 1)) + fi +done diff --git a/xmonad/scripts/xmobar-notmuch.sh b/xmonad/scripts/xmobar-notmuch.sh deleted file mode 100755 index 3d41a3c0..00000000 --- a/xmonad/scripts/xmobar-notmuch.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -eu - -while true; do - printf "mail: %s/%s\n" "$(notmuch count tag:unread AND NOT tag:lists AND NOT tag:killed)" "$(notmuch count tag:inbox AND NOT tag:lists tag:killed)" - if acpi -a | grep -q off-line; then - sleep $((60 * 15)) - else - sleep $((60 * 1)) - fi -done |
