1
Fork 0

Add the miniflux-unread-entries script and an i3status-rust block for it.

This commit is contained in:
Bauke 2024-02-28 12:15:04 +01:00
parent 333518fabf
commit f9cb821173
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/usr/bin/env zsh
miniflux_api_token=$(cat $BAUKE_DIR/data/miniflux-api-tokens.json | jq -r '."unread-entries"')
json=$(curl -sSL --insecure -H "X-Auth-Token: $miniflux_api_token" "https://rss.azedia.lan/v1/feeds/counters")
count=$(echo $json | jq -j '.unreads | length')
if [[ ! $count -eq "0" ]]; then
echo $count
fi

View File

@ -1,3 +1,13 @@
[icons]
icons = "emoji"
[[block]]
block = "custom"
command = "miniflux-unread-entries"
format = "^icon_bell <span color='#D2B83A'>$text.pango-str()</span>"
interval = 600
hide_when_empty = true
[[block]]
block = "time"
format = "$timestamp.datetime(f:'%H:%M')"