display newest unread article title if one is found
This commit is contained in:
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")"
|
Reference in New Issue
Block a user