summaryrefslogtreecommitdiffstats
path: root/.local/bin/ref-newsboat.pl
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2021-10-27 19:27:12 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2021-10-27 19:27:12 +0200
commitfc43a6cb38a99c39bc601faa49408ad1bf370955 (patch)
tree8d8227855a6bc6a1eb746d760de51ae942921bc3 /.local/bin/ref-newsboat.pl
parentupdate (diff)
downloaddotfiles-bsd-fc43a6cb38a99c39bc601faa49408ad1bf370955.tar.gz
dotfiles-bsd-fc43a6cb38a99c39bc601faa49408ad1bf370955.tar.bz2
dotfiles-bsd-fc43a6cb38a99c39bc601faa49408ad1bf370955.tar.xz
dotfiles-bsd-fc43a6cb38a99c39bc601faa49408ad1bf370955.tar.zst
dotfiles-bsd-fc43a6cb38a99c39bc601faa49408ad1bf370955.zip
new name
Diffstat (limited to '.local/bin/ref-newsboat.pl')
-rwxr-xr-x.local/bin/ref-newsboat.pl45
1 files changed, 0 insertions, 45 deletions
diff --git a/.local/bin/ref-newsboat.pl b/.local/bin/ref-newsboat.pl
deleted file mode 100755
index baebdeb..0000000
--- a/.local/bin/ref-newsboat.pl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/local/bin/perl
-
-use strict;
-use warnings;
-use Capture::Tiny qw(capture);
-
-use constant {
- NEWSBOAT_PATH => '/usr/local/bin/newsboat',
- NOTIFY_SEND_PATH => '/usr/local/bin/notify-send'
-};
-
-sub main
-{
- my $stdout;
- if (system(
- NEWSBOAT_PATH,
- '-x',
- 'reload'
- ) != 0) {
- exit 1;
- }
- ($stdout, undef, undef) = capture {
- system(
- NEWSBOAT_PATH,
- '-x',
- 'print-unread'
- );
- };
- $stdout =~ s/\s.+//;
- chomp $stdout;
- if ($stdout != 0) {
- system(
- NOTIFY_SEND_PATH,
- '-u',
- 'low',
- 'newsboat',
- ' ' . $stdout . ' new articles'
- );
- }
- exit 0;
-}
-
-main();
-
-__END__