From 197e9691db69bce004125d1bf4e70b18bb6a5788 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 5 Oct 2025 16:31:12 +0200 Subject: up --- .local/bin/ref-newsboat | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100755 .local/bin/ref-newsboat (limited to '.local/bin/ref-newsboat') diff --git a/.local/bin/ref-newsboat b/.local/bin/ref-newsboat deleted file mode 100755 index e5d9848..0000000 --- a/.local/bin/ref-newsboat +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use Capture::Tiny qw(capture); - -use constant { - NEWSBOAT_PATH => 'newsboat', - NOTIFYSEND_PATH => 'herbe' -}; - -sub notify -{ - my ($str) = @_; - - my $pid = fork(); - if (not $pid) { - exec(NOTIFYSEND_PATH, $str); - } - return; -}; - -sub main -{ - my $stdout; - my $nb; - - $nb = NEWSBOAT_PATH; - if (system( - $nb, - '-x', - 'reload' - ) != 0) { - exit 1; - } - - $stdout = qx($nb -x print-unread); - $stdout =~ s/\s.+//; - chomp $stdout; - if ($stdout != 0) { - notify(' ' . $stdout . ' new articles'); - } - return; -} - -main(); - -__END__ -- cgit v1.2.3