summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-08-20 11:36:23 +0200
committerjoe <rbo@gmx.us>2025-08-20 11:36:23 +0200
commit48cdd374b0dc9586b805c4f81579f161c601b9d9 (patch)
tree77108e00ad540252ff8d81a9254f6bb672c87d20 /.local
parentup (diff)
downloaddotfiles-bsd-48cdd374b0dc9586b805c4f81579f161c601b9d9.tar.gz
dotfiles-bsd-48cdd374b0dc9586b805c4f81579f161c601b9d9.tar.bz2
dotfiles-bsd-48cdd374b0dc9586b805c4f81579f161c601b9d9.tar.xz
dotfiles-bsd-48cdd374b0dc9586b805c4f81579f161c601b9d9.tar.zst
dotfiles-bsd-48cdd374b0dc9586b805c4f81579f161c601b9d9.zip
up
Diffstat (limited to '')
-rwxr-xr-x.local/bin/nb1
-rwxr-xr-x.local/bin/ref-newsboat24
2 files changed, 13 insertions, 12 deletions
diff --git a/.local/bin/nb b/.local/bin/nb
index 117840d..3b36835 100755
--- a/.local/bin/nb
+++ b/.local/bin/nb
@@ -1,5 +1,6 @@
#!/bin/sh
+[ $(hostname -s) = "po-rbo" ] && exec newsboat
[ -f /tmp/cache.db ] && exec newsboat -c /tmp/cache.db -u /tmp/urls
cache_file="$XDG_DATA_HOME/newsboat/cache.db.gpg"
urls_file="$XDG_CONFIG_HOME/newsboat/urls.gpg"
diff --git a/.local/bin/ref-newsboat b/.local/bin/ref-newsboat
index 090ca63..ca1aee1 100755
--- a/.local/bin/ref-newsboat
+++ b/.local/bin/ref-newsboat
@@ -5,27 +5,25 @@ use warnings;
use Capture::Tiny qw(capture);
use constant {
- NEWSBOAT_PATH => '/usr/local/bin/newsboat',
- NOTIFY_SEND_PATH => '/usr/local/bin/notify-send'
+ NEWSBOAT_PATH => 'newsboat',
+ NOTIFY_SEND_PATH => 'notify-send'
};
sub main
{
my $stdout;
+ my $nb;
+
+ $nb = NEWSBOAT_PATH;
if (system(
- NEWSBOAT_PATH,
+ $nb,
'-x',
'reload'
) != 0) {
exit 1;
}
- ($stdout, undef, undef) = capture {
- system(
- NEWSBOAT_PATH,
- '-x',
- 'print-unread'
- );
- };
+
+ $stdout = qx($nb -x print-unread);
$stdout =~ s/\s.+//;
chomp $stdout;
if ($stdout != 0) {
@@ -33,11 +31,13 @@ sub main
NOTIFY_SEND_PATH,
'-u',
'low',
+ '-t',
+ '4000',
'newsboat',
- ' ' . $stdout . ' new articles'
+ ' <b>' . $stdout . '</b> new articles'
);
}
- exit 0;
+ return;
}
main();