aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/i3status-rs/.local
diff options
context:
space:
mode:
Diffstat (limited to 'i3status-rs/.local')
-rwxr-xr-xi3status-rs/.local/lib/i3status-rust/i3status-miniflux9
-rwxr-xr-xi3status-rs/.local/lib/i3status-rust/i3status-notmuch7
2 files changed, 16 insertions, 0 deletions
diff --git a/i3status-rs/.local/lib/i3status-rust/i3status-miniflux b/i3status-rs/.local/lib/i3status-rust/i3status-miniflux
new file mode 100755
index 0000000..c9412fb
--- /dev/null
+++ b/i3status-rs/.local/lib/i3status-rust/i3status-miniflux
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+curl -s https://miniflux.tobyvin.dev/v1/feeds/counters \
+ -H "X-Auth-Token: ${MINIFLUX_TOKEN:-$(pass miniflux.tobyvin.dev/i3status)}" |
+ jq -r '[.unreads[]] | add // 0 | {
+ icon: "rss",
+ state: (if . > 50 then "Critical" elif . > 0 then "Warning" else "Idle" end),
+ text: (. | tostring)
+ }'
diff --git a/i3status-rs/.local/lib/i3status-rust/i3status-notmuch b/i3status-rs/.local/lib/i3status-rust/i3status-notmuch
new file mode 100755
index 0000000..1c51be8
--- /dev/null
+++ b/i3status-rs/.local/lib/i3status-rust/i3status-notmuch
@@ -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)
+}'