aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/i3status/.local
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-05-16 13:13:52 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-05-16 13:13:52 -0500
commit05a5cd8d61d304d5bafec3f947ca8718cf013851 (patch)
treebd1fc9651cd7db75c05bc920a4414afc8653c64d /i3status/.local
parenta1c7b14aa2d7d5d012e216dd2824f872dad31c6b (diff)
fix(i3status): use notmuch for mail status
Diffstat (limited to 'i3status/.local')
-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)
+}'