summaryrefslogtreecommitdiffstats
path: root/.local/bin/linkview
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/linkview')
-rwxr-xr-x.local/bin/linkview6
1 files changed, 4 insertions, 2 deletions
diff --git a/.local/bin/linkview b/.local/bin/linkview
index 88ffe93..50b04c5 100755
--- a/.local/bin/linkview
+++ b/.local/bin/linkview
@@ -29,7 +29,6 @@ sub open_link
my $pwd;
my $ret;
my @wc;
- my $word;
my $i;
if ($a == 1) {
@@ -54,10 +53,12 @@ sub open_link
$file_name =~ s/.+\///g;
if ($file_name =~ m/^watch\?v=.+/) {
$file_name = `youtube-dl -e $url`;
+ if (not $file_name) {
+ $file_name = "Youtube video";
+ }
chomp $file_name;
}
@wc = split / /, $file_name;
- print @wc . "\n";
if (@wc > 6) {
$file_name = "";
$i = 0;
@@ -67,6 +68,7 @@ sub open_link
}
$file_name .= "[...]";
}
+ $file_name =~ s/^[0-9]+/\[\.\.\.\]/;
system(
NOTIFYSEND_PATH,
'-u',