From cde730e0308f9c9e227b85cf3950f7fb8f5fe507 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 12 Nov 2020 18:00:08 +0100 Subject: Notifications update --- .local/bin/linkview | 18 ++++++++---------- .local/bin/ref-newsboat.pl | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to '.local') diff --git a/.local/bin/linkview b/.local/bin/linkview index c5d5053..704e42a 100755 --- a/.local/bin/linkview +++ b/.local/bin/linkview @@ -50,10 +50,8 @@ sub open_link $file_name = $url; $file_name =~ s/.+\///g; if ($file_name =~ m/^watch\?v=.+/) { - $file_name = "Your video"; - } - else { - $file_name = '' . $file_name . ''; + $file_name = `youtube-dl -e $url`; + chomp $file_name; } system( NOTIFYSEND_PATH, @@ -61,8 +59,8 @@ sub open_link 'normal', '-t', '10000', - ' download started', - $file_name . ' started downloading' + 'download started', + ' '. $file_name . ' started downloading' ); $ret = -1; if ($a == 2) { @@ -78,8 +76,8 @@ sub open_link 'normal', '-t', '10000', - ' download complete', - $file_name . ' downloaded successfully to ' + ' download complete', + ' ' . $file_name . ' downloaded successfully to ' . '' . $pwd . '' ); } @@ -90,8 +88,8 @@ sub open_link 'critical', '-t', '10000', - ' download failed', - 'failed to download ' . $file_name . '' + 'download failed', + ' failed to download ' . $file_name . '' ); } exit 0; diff --git a/.local/bin/ref-newsboat.pl b/.local/bin/ref-newsboat.pl index 38d7231..baebdeb 100755 --- a/.local/bin/ref-newsboat.pl +++ b/.local/bin/ref-newsboat.pl @@ -33,8 +33,8 @@ sub main NOTIFY_SEND_PATH, '-u', 'low', - ' newsboat', - $stdout . ' new articles' + 'newsboat', + ' ' . $stdout . ' new articles' ); } exit 0; -- cgit v1.2.3