summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.config/mpv/mpv.conf1
-rw-r--r--.config/newsboat/config59
-rwxr-xr-x.local/bin/linkview19
-rwxr-xr-x.local/bin/nb1
-rwxr-xr-x.local/bin/newsboat-notif3
-rwxr-xr-x.local/bin/ref-newsboat24
6 files changed, 59 insertions, 48 deletions
diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf
index fbb1019..26e0d5c 100644
--- a/.config/mpv/mpv.conf
+++ b/.config/mpv/mpv.conf
@@ -2,3 +2,4 @@ video-sync=display-resample
osc=yes
demuxer-max-bytes=1GiB
script-opts=ytdl_hook-ytdl_path=yt-dlp,ytdl_hook-try_ytdl_first=yes,ytdl_hook-exclude="%.webm$|%.ts$|%.mp3$|%.m3u8$|%.m3u$|%.mkv$|%.mp4$|%.VOB$"
+term-osd-bar=yes
diff --git a/.config/newsboat/config b/.config/newsboat/config
index 9a9cd1c..ee4459e 100644
--- a/.config/newsboat/config
+++ b/.config/newsboat/config
@@ -1,5 +1,7 @@
#how-read-feeds no
-auto-reload no
+auto-reload yes
+refresh-on-startup yes
+reload-time 60
confirm-mark-all-feeds-read yes
confirm-mark-feed-read no
reload-threads 100
@@ -7,7 +9,10 @@ text-width 80
show-keymap-hint no
show-title-bar no
swap-title-and-hints no
-notify-program "/usr/bin/notify-send"
+ignore-mode display
+notify-program ~/.local/bin/newsboat-notif
+notify-always yes
+notify-format "%d"
external-url-viewer "urlview"
@@ -36,17 +41,13 @@ 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
+ignore-article "*" "title =~ \"#shorts$\""
+ignore-article "*" "link =~ \"youtube.com/shorts/\""
color background default default
-color listnormal white default
+color listnormal default default dim
color listnormal_unread red default bold
-color listfocus white black
+color listfocus default black dim
color listfocus_unread red black bold
color info yellow black bold
color article default default
@@ -60,9 +61,9 @@ macro a set browser "youtube-dl --add-metadata -xic -f bestaudio/best"; open-in-
macro v set browser "linkview"; open-in-browser ; set browser linkhandler
macro w set browser "linkview"; open-in-browser ; set browser linkhandler
-datetime-format "%D"
-articlelist-format "%D %f %t"
-feedlist-format "%?T? %n %9u %t [%T]&#%-7t----------------------------------------------------------?"
+datetime-format "%y-%m-%d %H:%M"
+articlelist-format "%D - %t"
+feedlist-format "%?T?%n%9u %t [%T]&#%-8t----------------------------------------------------------?"
highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold
highlight article "(^Link:.*|^Date:.*)" default default
@@ -75,21 +76,21 @@ highlight article ":.*\\(link\\)$" cyan default
highlight article ":.*\\(image\\)$" blue default
highlight article ":.*\\(embedded flash\\)$" magenta default
-
highlight feedlist ".*(0/0))" black
-highlight feedlist ".* \\[(news|tech|normies|gaming|space|skate|music)\\]$" white default
-highlight feedlist "^ N.* \\[news\\]$" blue default bold
-highlight feedlist "^ N.* \\[tech\\]$" cyan default bold
-highlight feedlist "^ N.* \\[normies\\]$" red default bold
-highlight feedlist "^ N.* \\[gaming\\]$" yellow default bold
-highlight feedlist "^ N.* \\[space\\]$" blue default bold
-highlight feedlist "^ N.* \\[skate\\]$" magenta default bold
-highlight feedlist "^ N.* \\[music\\]$" green default bold
-highlight feedlist "^#news .*" blue default
-highlight feedlist "^#tech .*" cyan default
-highlight feedlist "^#normies .*" red default
-highlight feedlist "^#gaming .*" yellow default
-highlight feedlist "^#space .*" blue default
-highlight feedlist "^#skate .*" magenta default
-highlight feedlist "^#music .*" green default
+highlight feedlist ".* \\[(news|tech|normies|gaming|space|skate|music)\\]$" default default dim
+highlight feedlist "^N.* \\[tech\\]$" cyan default bold
+highlight feedlist "^N.* \\[normies\\]$" red default bold
+highlight feedlist "^N.* \\[news\\]$" green default bold
+highlight feedlist "^N.* \\[gaming\\]$" yellow default bold
+highlight feedlist "^N.* \\[space\\]$" blue default bold
+highlight feedlist "^N.* \\[skate\\]$" magenta default bold
+highlight feedlist "^N.* \\[music\\]$" white default bold
+highlight feedlist "^#tech .*" cyan default bold
+highlight feedlist "^#normies .*" red default bold
+highlight feedlist "^#news .*" green default bold
+highlight feedlist "^#gaming .*" yellow default bold
+highlight feedlist "^#space .*" blue default bold
+highlight feedlist "^#skate .*" magenta default bold
+highlight feedlist "^#music .*" white default bold
+highlight feedlist "^N" default default invis
highlight feedlist "\\[(news|tech|normies|gaming|space|skate|music)\\]$" default default invis
diff --git a/.local/bin/linkview b/.local/bin/linkview
index bc53897..349d5c8 100755
--- a/.local/bin/linkview
+++ b/.local/bin/linkview
@@ -35,7 +35,7 @@ use constant PROG_LIST => "" .
"play" . "\n" .
"img" . "\n" .
"dl" . "\n" .
-"pod" . "\n" .
+"audio" . "\n" .
"pdf" . "\n" .
"w3m" . "\n" .
"browser" . "\n" .
@@ -94,9 +94,6 @@ sub open_link
}
return;
}
- elsif ($a eq "mpv-term") {
- exec(TERMINAL_PATH, '-e', MPV_PATH, '--audio-channels=stereo', $url);
- }
elsif ($a eq "dl") {
if (is_yt($url) != 0) {
$list = QUAL_LIST;
@@ -266,7 +263,7 @@ sub open_link
}
return;
}
- elsif ($a eq "pod") {
+ elsif ($a eq "audio") {
$pid = fork();
if (not $pid) {
setsid();
@@ -278,7 +275,15 @@ sub open_link
'playing media',
' playing <b>' . $article_name . '</b>'
);
- if (system(TERMINAL_PATH, "-e", MPV_PATH, $url) != 0) {
+ if (system(
+ TERMINAL_PATH,
+ "-e",
+ MPV_PATH,
+ "--vo=null",
+ "--video=no",
+ "--no-video",
+ $url
+ ) != 0) {
exec(
NOTIFYSEND_PATH,
'-u', 'critical',
@@ -460,7 +465,7 @@ sub linkview
{
my $answer;
- if (@ARGV == 0) {
+ if (@ARGV == 0 || $ARGV[0] eq "") {
print STDERR "linkview: no URL\n";
exit 1;
}
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/newsboat-notif b/.local/bin/newsboat-notif
new file mode 100755
index 0000000..cc2b385
--- /dev/null
+++ b/.local/bin/newsboat-notif
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+[ $1 -gt 0 ] && notify-send -u normal -t 6000 newsboat " <b>$@</b> new articles"
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();