dwmb-news (317B) - raw


      1 #!/bin/sh
      2 
      3 nb=$(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) ")
      4 echo " $nb"
      5 case $BLOCK_BUTTON in
      6 	1) "$TERMINAL" -e newsboat ;;
      7 	3) newsup  ;;
      8 	6) "$TERMINAL" -e "$EDITOR" "$0" ;;
      9 esac