From 2742a65819187bc4f0fc70355c174f391c93f9bf Mon Sep 17 00:00:00 2001 From: odrling Date: Thu, 16 May 2019 11:39:42 +0200 Subject: [PATCH] keep showing the newscount when newsboat is open --- .config/i3blocks/news/news | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/i3blocks/news/news b/.config/i3blocks/news/news index f2b35f1..f20484c 100755 --- a/.config/i3blocks/news/news +++ b/.config/i3blocks/news/news @@ -1,3 +1,5 @@ #!/bin/sh -newsboat -x print-unread | cut -d' ' -f1 +lastfile=/tmp/lastnewscount.$USER +last=$(cat $lastfile) +(newsboat -x print-unread || echo $last) | cut -d' ' -f1 | tee $lastfile