summaryrefslogtreecommitdiffstats
path: root/.local/bin/ref-newsboat
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/ref-newsboat')
-rwxr-xr-x.local/bin/ref-newsboat48
1 files changed, 0 insertions, 48 deletions
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__