summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/newsboat/config60
-rwxr-xr-x.local/bin/linkview38
2 files changed, 82 insertions, 16 deletions
diff --git a/.config/newsboat/config b/.config/newsboat/config
index c1036c9..a76c125 100644
--- a/.config/newsboat/config
+++ b/.config/newsboat/config
@@ -2,7 +2,12 @@
auto-reload no
confirm-mark-all-feeds-read yes
confirm-mark-feed-read no
-reload-threads 4
+reload-threads 100
+text-width 80
+show-keymap-hint no
+show-title-bar no
+swap-title-and-hints no
+notify-program "/usr/bin/notify-send"
external-url-viewer "urlview"
@@ -31,22 +36,34 @@ bind-key v show-urls
bind-key x pb-delete
bind-key ^t next-unread
-color listnormal white default
-color listfocus black white standout
-color listnormal_unread red default bold
-color listfocus_unread red black bold
-color info yellow black bold
-color article default default
+# color listnormal white default
+# color listfocus black white standout
+# color listnormal_unread red default bold
+# color listfocus_unread red black bold
+# color info yellow black bold
+# color article default default
-browser "linkview %u"
+color background default default
+color listnormal white default
+color listnormal_unread red default bold
+color listfocus white black
+color listfocus_unread red black bold
+color info yellow black bold
+color article default default
+
+search-highlight-colors yellow black bold
+
+browser "linkview %u %T"
macro , open-in-browser
macro t set browser "youtube-dl --add-metadata -ic"; open-in-browser ; set browser linkhandler
macro a set browser "youtube-dl --add-metadata -xic -f bestaudio/best"; open-in-browser ; set browser linkhandler
macro v set browser "linkview"; open-in-browser ; set browser linkhandler
macro w set browser "linkview"; open-in-browser ; set browser linkhandler
-highlight all "---.*---" yellow
-highlight feedlist ".*(0/0))" black
+datetime-format "%D"
+articlelist-format "%D %f %t"
+feedlist-format "%?T? %n %9u %t [%T]&#%-7t----------------------------------------------------------?"
+
highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold
highlight article "(^Link:.*|^Date:.*)" default default
highlight article "https?://[^ ]+" green default
@@ -57,3 +74,26 @@ highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold
highlight article ":.*\\(link\\)$" cyan default
highlight article ":.*\\(image\\)$" blue default
highlight article ":.*\\(embedded flash\\)$" magenta default
+
+
+highlight feedlist ".*(0/0))" black
+highlight feedlist ".* \\[tech\\]$" white default
+highlight feedlist ".* \\[yt\\]$" white default
+highlight feedlist ".* \\[space\\]$" white default
+highlight feedlist ".* \\[reddit\\]$" white default
+highlight feedlist ".* \\[pods\\]$" white default
+highlight feedlist "^ N.* \\[tech\\]$" cyan default bold
+highlight feedlist "^ N.* \\[yt\\]$" red default bold
+highlight feedlist "^ N.* \\[space\\]$" blue default bold
+highlight feedlist "^ N.* \\[reddit\\]$" yellow default bold
+highlight feedlist "^ N.* \\[pods\\]$" magenta default bold
+highlight feedlist "^#tech .*" cyan default
+highlight feedlist "^#yt .*" red default
+highlight feedlist "^#space .*" blue default
+highlight feedlist "^#reddit .*" yellow default
+highlight feedlist "^#pods .*" magenta default
+highlight feedlist "\\[tech\\]$" default default invis
+highlight feedlist "\\[yt\\]$" default default invis
+highlight feedlist "\\[space\\]$" default default invis
+highlight feedlist "\\[reddit\\]$" default default invis
+highlight feedlist "\\[pods\\]$" default default invis
diff --git a/.local/bin/linkview b/.local/bin/linkview
index 1141c9d..bc53897 100755
--- a/.local/bin/linkview
+++ b/.local/bin/linkview
@@ -35,6 +35,7 @@ use constant PROG_LIST => "" .
"play" . "\n" .
"img" . "\n" .
"dl" . "\n" .
+"pod" . "\n" .
"pdf" . "\n" .
"w3m" . "\n" .
"browser" . "\n" .
@@ -51,7 +52,7 @@ use constant QUAL_LIST => "" .
sub open_link
{
- my ($a, $url) = @_;
+ my ($a, $url, $article_name) = @_;
my $count;
my $file_name;
my $i;
@@ -78,7 +79,7 @@ sub open_link
'-u', 'low',
'-t', '2000',
'playing media',
- ' playing <b>' . $url . '</b>'
+ ' playing <b>' . $article_name . '</b>'
);
if (system(MPV_PATH, $url) != 0) {
exec(
@@ -265,6 +266,31 @@ sub open_link
}
return;
}
+ elsif ($a eq "pod") {
+ $pid = fork();
+ if (not $pid) {
+ setsid();
+ close_io();
+ system(
+ NOTIFYSEND_PATH,
+ '-u', 'low',
+ '-t', '2000',
+ 'playing media',
+ ' playing <b>' . $article_name . '</b>'
+ );
+ if (system(TERMINAL_PATH, "-e", MPV_PATH, $url) != 0) {
+ exec(
+ NOTIFYSEND_PATH,
+ '-u', 'critical',
+ '-t', '10000',
+ 'playback failed',
+ ' failed to open <b>' . $url . '</b>'
+ );
+ }
+ return;
+ }
+ return;
+ }
elsif ($a eq "img" || $a eq "pdf") {
$pid = fork();
if (not $pid) {
@@ -278,8 +304,8 @@ sub open_link
NOTIFYSEND_PATH,
'-u', 'low',
'-t', '5000',
- 'download started',
- ' fetching thumbnail'
+ 'fetching thumbnail',
+ ' fetching thumbnail for <b>' . $article_name . '</b>'
);
($tmp, undef, $ret) = capture {
system(YTDL_PATH, '--get-thumbnail', $url);
@@ -290,7 +316,7 @@ sub open_link
NOTIFYSEND_PATH,
'-u', 'critical',
'failed to get thumbnail',
- ' failed to get thumbail'
+ ' failed to get thumbail for <b>' . $article_name . '</b>'
);
return;
}
@@ -439,7 +465,7 @@ sub linkview
exit 1;
}
$answer = fzf_prompt($ARGV[0]);
- open_link($answer, $ARGV[0]);
+ open_link($answer, $ARGV[0], $ARGV[1]);
return;
}