display newest unread article title if one is found
This commit is contained in:
parent
222659f325
commit
ec84b00705
@ -4,7 +4,7 @@ reload-threads 100
|
||||
|
||||
external-url-viewer "newsboat_urlscan {}"
|
||||
|
||||
notify-program "/usr/bin/notify-send"
|
||||
notify-program "/home/alex/.local/bin/newsboatnotifs"
|
||||
notify-format "%d new articles (%n unread articles, %f unread feeds)"
|
||||
|
||||
bind-key j down
|
||||
|
7
.local/bin/newsboatnotifs
Executable file
7
.local/bin/newsboatnotifs
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
CACHE="${XDG_DATA_HOME:-$HOME/.local/share}/newsboat/cache.db"
|
||||
unread="$(sqlite3 "$CACHE" "SELECT unread,pubDate,title FROM rss_item;" |
|
||||
grep -vE '^0' | sort -t'|' -k2 -g | head -n1 |
|
||||
sed 's/[0-9]*|[0-9]*|//')"
|
||||
|
||||
notify-send "newsboat" "$(printf 'new article:\n %s' "$unread")"
|
Loading…
Reference in New Issue
Block a user