aboutsummaryrefslogtreecommitdiff
path: root/local/bin/newsboat-reload
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-24 17:07:33 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-24 17:07:33 +0100
commit468a789dbc4b1928c035d8590895efc533520a27 (patch)
tree74cb056c37eaa50cd50491a7665608488ed4feb1 /local/bin/newsboat-reload
parentf9883d2c3b3699d91e98feeffd7eece546f7c57e (diff)
downloaddotfiles-468a789dbc4b1928c035d8590895efc533520a27.tar.gz
dotfiles-468a789dbc4b1928c035d8590895efc533520a27.tar.bz2
dotfiles-468a789dbc4b1928c035d8590895efc533520a27.zip
Updated file tree to match XDG base directory specification
Diffstat (limited to 'local/bin/newsboat-reload')
-rwxr-xr-xlocal/bin/newsboat-reload8
1 files changed, 8 insertions, 0 deletions
diff --git a/local/bin/newsboat-reload b/local/bin/newsboat-reload
new file mode 100755
index 0000000..82e26a7
--- /dev/null
+++ b/local/bin/newsboat-reload
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# adapted from: https://github.com/LukeSmithxyz/voidrice/blob/master/.local/bin/cron/newsup
+
+ping -q -c 1 cacharle.xyz > /dev/null || exit # no internet
+pgrep -f 'newsboat$' > /dev/null && exit # newsboat already running
+
+newsboat -x reload