scripts

scripts to make my pc work
Index Commits Files Refs
statusbar/sb-news (713B)
   1 #!/bin/sh
   2 
   3 # Displays number of unread news items and an loading icon if updating.
   4 # When clicked, brings up `newsboat`.
   5 
   6 case $BLOCK_BUTTON in
   7         1) setsid "$TERMINAL" -e newsboat ;;
   8     2) setsid -f newsup >/dev/null exit ;;
   9         3) notify-send "📰 News module" "\- Shows unread news items
  10 - Shows 🔃 if updating with \`newsup\`
  11 - Left click opens newsboat
  12 - Middle click syncs RSS feeds
  13 <b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;;
  14     6) "$TERMINAL" -e "$EDITOR" "$0" ;;
  15 esac
  16 
  17  cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "📰" $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)"