From cde730e0308f9c9e227b85cf3950f7fb8f5fe507 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 12 Nov 2020 18:00:08 +0100 Subject: Notifications update --- .config/dunst/dunstrc | 2 +- .config/mutt/defaults.muttrc | 2 +- .local/bin/linkview | 18 ++++++++---------- .local/bin/ref-newsboat.pl | 4 ++-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 06f5ebf..ff41d57 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -37,7 +37,7 @@ # %n progress value if set without any extra characters # %% Literal % # Markup is allowed - format = "%s\n%b" + format = "%b" alignment = center show_age_threshold = 60 diff --git a/.config/mutt/defaults.muttrc b/.config/mutt/defaults.muttrc index 5977c89..fadf2f7 100644 --- a/.config/mutt/defaults.muttrc +++ b/.config/mutt/defaults.muttrc @@ -6,7 +6,7 @@ set mailcap_path = /usr/local/share/mutt-wizard/mailcap set date_format="%y/%m/%d %I:%M%p" set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" -set new_mail_command = "notify-send -u normal ' NeoMutt' '%n new mail(s)' &" +set new_mail_command = "notify-send -u normal 'NeoMutt' ' %n new mail(s)' &" set sort = 'reverse-date' set smtp_authenticators = 'gssapi:login' set query_command = "abook --mutt-query '%s'" 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