diff options
Diffstat (limited to 'dot-config/yambar/scripts/newsboat')
| -rwxr-xr-x | dot-config/yambar/scripts/newsboat | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dot-config/yambar/scripts/newsboat b/dot-config/yambar/scripts/newsboat index fa50b80..0dd97ec 100755 --- a/dot-config/yambar/scripts/newsboat +++ b/dot-config/yambar/scripts/newsboat @@ -1,8 +1,10 @@ #!/bin/sh # Get unread count -pgrep -x newsboat || newsboat -x print-unread >~/.cache/unread +pgrep -x newsboat >/dev/null \ + || newsboat -x print-unread >~/.cache/unread + unread=$(cut -f1 -d' ' ~/.cache/unread) -# Display unread count -printf "unread|int|%s\n\n" "$unread" +# # Display unread count + printf "%s\n\n" "unread|int|$unread" |
