aboutsummaryrefslogtreecommitdiff
path: root/xmonad/scripts
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-10 23:04:56 -0300
committerEuAndreh <eu@euandre.org>2021-06-10 23:04:56 -0300
commitf516b618a180ae4cefce50d5ef27f2af9bde927e (patch)
treec8af85366ae3bb50576004d87d8f8c7b2f2dbea3 /xmonad/scripts
parentconfiguration.nix: Use queued version of msmtp as sendmail (diff)
downloaddotfiles-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-xxmonad/scripts/xmobar-mail.sh11
-rwxr-xr-xxmonad/scripts/xmobar-notmuch.sh11
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