diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-14 16:59:44 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-11-14 16:59:44 +0100 |
commit | f3d2e39a4cd3c7c138207f9a8453950a33d92363 (patch) | |
tree | 70dee374475187c6c88615ba9dbd8ab5ffff1dce /.local/bin/dunst_espeak.sh | |
parent | Perfect vim C/C++ config (diff) | |
download | dotfiles-bsd-f3d2e39a4cd3c7c138207f9a8453950a33d92363.tar.gz dotfiles-bsd-f3d2e39a4cd3c7c138207f9a8453950a33d92363.tar.bz2 dotfiles-bsd-f3d2e39a4cd3c7c138207f9a8453950a33d92363.tar.xz dotfiles-bsd-f3d2e39a4cd3c7c138207f9a8453950a33d92363.tar.zst dotfiles-bsd-f3d2e39a4cd3c7c138207f9a8453950a33d92363.zip |
Less annoying dunst_espeak
Diffstat (limited to '.local/bin/dunst_espeak.sh')
-rwxr-xr-x | .local/bin/dunst_espeak.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/.local/bin/dunst_espeak.sh b/.local/bin/dunst_espeak.sh index 666aa22..8ad43fe 100755 --- a/.local/bin/dunst_espeak.sh +++ b/.local/bin/dunst_espeak.sh @@ -2,6 +2,9 @@ [ "$5" = "LOW" ] && exit [ "$3" ] || exit -words=$(printf "$3" | sed 's/<b>//g' | sed 's/<\/b>//g' | sed 's/[^a-zA-Z0-9?!.,% ]//g') -words=$(printf "%s\n" "$words" | awk '{for (i=1;i<11;i++)print $i }' | tr '\n' ' ') +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" |