diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-12 18:00:08 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-12 18:00:08 +0100 |
commit | cde730e0308f9c9e227b85cf3950f7fb8f5fe507 (patch) | |
tree | 59067b51235d65b9a86f4752c4c5e0cdeaef26c3 /.local/bin/linkview | |
parent | Update (diff) | |
download | dotfiles-bsd-cde730e0308f9c9e227b85cf3950f7fb8f5fe507.tar.gz dotfiles-bsd-cde730e0308f9c9e227b85cf3950f7fb8f5fe507.tar.bz2 dotfiles-bsd-cde730e0308f9c9e227b85cf3950f7fb8f5fe507.tar.xz dotfiles-bsd-cde730e0308f9c9e227b85cf3950f7fb8f5fe507.tar.zst dotfiles-bsd-cde730e0308f9c9e227b85cf3950f7fb8f5fe507.zip |
Notifications update
Diffstat (limited to '.local/bin/linkview')
-rwxr-xr-x | .local/bin/linkview | 18 |
1 files changed, 8 insertions, 10 deletions
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 = '<b>' . $file_name . '</b>'; + $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', + ' <b>'. $file_name . '</b> 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', + ' <b>' . $file_name . '</b> downloaded successfully to ' . '<b>' . $pwd . '</b>' ); } @@ -90,8 +88,8 @@ sub open_link 'critical', '-t', '10000', - ' download failed', - 'failed to download <b>' . $file_name . '</b>' + 'download failed', + ' failed to download <b>' . $file_name . '</b>' ); } exit 0; |