From 99e8109bf053d4fafa53ca8f3deb1f60a35f5876 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Tue, 29 Dec 2020 16:44:12 +0100 Subject: [PATCH] display nothing with zero unread articles --- .local/bin/statusbar/news | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/statusbar/news b/.local/bin/statusbar/news index 56a0939..9d11208 100755 --- a/.local/bin/statusbar/news +++ b/.local/bin/statusbar/news @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/sh num="$(newsboat -x print-unread | cut -f1 -d ' ' )" if ! pgrep newsboat > /dev/null ; then - [ "$num" = "" ] || printf "📰%s" "$num" + [ "$num" = "0" ] || printf "📰%s" "$num" printf '\n' fi