~kris/dots

srice

ref: 2dc7c2f7e39f562e3603676ef50c2df0a4723c19 srice/.local/bin/statusbar/sb-news -rwxr-xr-x 462 bytes
2dc7c2f7 — Kris Yotam update nvim plan9 theme, add hosts file, misc updates 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

# Displays number of unread news items with 󰑬 icon (f046c)

case $BLOCK_BUTTON in
	1) setsid "$TERMINAL" -e newsboat ;;
	2) setsid -f newsup >/dev/null && exit ;;
	3) notify-send "󰑬 News module" "\- Shows unread news items
- Left click opens newsboat
- Middle click syncs RSS feeds" ;;
	6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac

cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "󰑬" $1}')"