summaryrefslogtreecommitdiffstats
path: root/.local/bin/ref-newsboat
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-10-01 22:33:48 +0200
committerjoe <rbo@gmx.us>2025-10-01 22:33:48 +0200
commit8854fa0f8a831264ed815b3615038dec89c6f632 (patch)
treecb0eda5ade37b16adb72ee084e20fe284b2c90a1 /.local/bin/ref-newsboat
parentup (diff)
downloaddotfiles-bsd-8854fa0f8a831264ed815b3615038dec89c6f632.tar.gz
dotfiles-bsd-8854fa0f8a831264ed815b3615038dec89c6f632.tar.bz2
dotfiles-bsd-8854fa0f8a831264ed815b3615038dec89c6f632.tar.xz
dotfiles-bsd-8854fa0f8a831264ed815b3615038dec89c6f632.tar.zst
dotfiles-bsd-8854fa0f8a831264ed815b3615038dec89c6f632.zip
up
Diffstat (limited to '.local/bin/ref-newsboat')
-rwxr-xr-x.local/bin/ref-newsboat20
1 files changed, 14 insertions, 6 deletions
diff --git a/.local/bin/ref-newsboat b/.local/bin/ref-newsboat
index 08ee614..e5d9848 100755
--- a/.local/bin/ref-newsboat
+++ b/.local/bin/ref-newsboat
@@ -5,8 +5,19 @@ use warnings;
use Capture::Tiny qw(capture);
use constant {
- NEWSBOAT_PATH => 'newsboat',
- NOTIFY_SEND_PATH => 'herbe'
+ NEWSBOAT_PATH => 'newsboat',
+ NOTIFYSEND_PATH => 'herbe'
+};
+
+sub notify
+{
+ my ($str) = @_;
+
+ my $pid = fork();
+ if (not $pid) {
+ exec(NOTIFYSEND_PATH, $str);
+ }
+ return;
};
sub main
@@ -27,10 +38,7 @@ sub main
$stdout =~ s/\s.+//;
chomp $stdout;
if ($stdout != 0) {
- system(
- NOTIFY_SEND_PATH,
- ' ' . $stdout . ' new articles'
- );
+ notify(' ' . $stdout . ' new articles');
}
return;
}