diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-14 17:10:24 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-14 17:10:24 +0100 |
commit | b5908358bf8647d4c28445e0ff70bdeef8bf319b (patch) | |
tree | dbc8b63217399e29ee62666445d84ab879ff3775 | |
parent | Less annoying dunst_espeak (diff) | |
download | dotfiles-bsd-b5908358bf8647d4c28445e0ff70bdeef8bf319b.tar.gz dotfiles-bsd-b5908358bf8647d4c28445e0ff70bdeef8bf319b.tar.bz2 dotfiles-bsd-b5908358bf8647d4c28445e0ff70bdeef8bf319b.tar.xz dotfiles-bsd-b5908358bf8647d4c28445e0ff70bdeef8bf319b.tar.zst dotfiles-bsd-b5908358bf8647d4c28445e0ff70bdeef8bf319b.zip |
Bug fixes
-rwxr-xr-x | .local/bin/dunst_espeak.sh | 1 | ||||
-rwxr-xr-x | .local/bin/linkview | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/.local/bin/dunst_espeak.sh b/.local/bin/dunst_espeak.sh index 8ad43fe..4ec79c9 100755 --- a/.local/bin/dunst_espeak.sh +++ b/.local/bin/dunst_espeak.sh @@ -6,5 +6,4 @@ words=$(printf "%s" "$3" | sed 's/<b>//g' | sed 's/<\/b>//g' | sed 's/[^a-zA-Z0-9?!.,% ]//g') -words=$(printf "%s" "$words" | gsed 's/^[0-9]\+//g') espeak "$words" 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', |