#!/bin/sh
icon=$(echo -en "\uf09e")
count=$(cat $HOME/.config/newsboat/unread)
case $BLOCK_BUTTON in
1) setsid st -e newsboat &&
count=$(newsboat -x 'print-unread' | cut -d ' ' -f1) ;;
esac
if [ $count -gt 0 ];
then
echo "$icon $count"
elif [ $count = $(echo -e '\uf2f1') ]
then
count=$(echo -en "\uf2f1")
echo "$icon $count"
else
echo -e "$icon $count"
fi