diff options
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/dunst_espeak.sh | 7 | ||||
-rwxr-xr-x | .local/bin/linkview | 14 | ||||
-rwxr-xr-x | .local/bin/setwp | 2 |
3 files changed, 20 insertions, 3 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" 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', diff --git a/.local/bin/setwp b/.local/bin/setwp index 54d6375..084b738 100755 --- a/.local/bin/setwp +++ b/.local/bin/setwp @@ -6,7 +6,7 @@ use File::Copy; use constant { WP_FILE => '/usr/home/jozan/pics/wallpaper.jpg', - WP_POOL => '/usr/home/jozan/pics/wallpapers/' + WP_POOL => '/usr/home/jozan/pics/wp/' }; use constant FEH_PATH => '/usr/local/bin/feh'; |