summaryrefslogtreecommitdiff
path: root/home/.selfconfigs/newsboat/open-nb-unread
diff options
context:
space:
mode:
Diffstat (limited to 'home/.selfconfigs/newsboat/open-nb-unread')
-rwxr-xr-xhome/.selfconfigs/newsboat/open-nb-unread7
1 files changed, 7 insertions, 0 deletions
diff --git a/home/.selfconfigs/newsboat/open-nb-unread b/home/.selfconfigs/newsboat/open-nb-unread
new file mode 100755
index 0000000..ff4809d
--- /dev/null
+++ b/home/.selfconfigs/newsboat/open-nb-unread
@@ -0,0 +1,7 @@
+#!/bin/bash -eu
+
+newsboat -x reload
+unread=$(newsboat -x print-unread)
+if ! [[ "$unread" == 0* ]]; then
+ newsboat
+fi