diff options
Diffstat (limited to '.local/bin/linkview')
-rwxr-xr-x | .local/bin/linkview | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/linkview b/.local/bin/linkview index c14dbc9..88ffe93 100755 --- a/.local/bin/linkview +++ b/.local/bin/linkview @@ -28,6 +28,9 @@ sub open_link my $file_name; my $pwd; my $ret; + my @wc; + my $word; + my $i; if ($a == 1) { exec( @@ -53,6 +56,17 @@ sub open_link $file_name = `youtube-dl -e $url`; chomp $file_name; } + @wc = split / /, $file_name; + print @wc . "\n"; + if (@wc > 6) { + $file_name = ""; + $i = 0; + while ($i < 6) { + $file_name .= "$wc[$i] "; + $i++; + } + $file_name .= "[...]"; + } system( NOTIFYSEND_PATH, '-u', |