aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/i3status/.local/bin/notmuch-status
diff options
context:
space:
mode:
Diffstat (limited to 'i3status/.local/bin/notmuch-status')
-rwxr-xr-xi3status/.local/bin/notmuch-status7
1 files changed, 7 insertions, 0 deletions
diff --git a/i3status/.local/bin/notmuch-status b/i3status/.local/bin/notmuch-status
new file mode 100755
index 0000000..1c51be8
--- /dev/null
+++ b/i3status/.local/bin/notmuch-status
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+notmuch search --format=json tag:unread | jq -c 'length | {
+ icon: "mail",
+ state: (if . == 0 then "Idle" elif . < 10 then "Warning" else "Critical" end),
+ text: (. | tostring)
+}'