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 | |
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 '')
-rw-r--r-- | .config/env | 3 | ||||
-rwxr-xr-x | .local/bin/dunst_espeak.sh | 7 | ||||
-rwxr-xr-x | .local/bin/linkview | 14 | ||||
-rwxr-xr-x | .local/bin/setwp | 2 |
4 files changed, 22 insertions, 4 deletions
diff --git a/.config/env b/.config/env index a419844..e433252 100644 --- a/.config/env +++ b/.config/env @@ -45,6 +45,7 @@ export CARGO_HOME="$XDG_DATA_HOME"/cargo export CCACHE_CONFIGPATH="$XDG_CONFIG_HOME"/ccache.conf export CCACHE_DIR="$XDG_CACHE_HOME"/ccache export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker +export DVDCSS_CACHE="$XDG_DATA_HOME"/dvdcss export GNUPGHOME="$XDG_DATA_HOME"/gnupg export MACHINE_STORAGE_PATH="$XDG_DATA_HOME"/docker-machine export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history @@ -54,6 +55,7 @@ export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc export STACK_ROOT="$XDG_DATA_HOME"/stack export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass +export WGETRC="$XDG_CONFIG_HOME/wgetrc" export XINITRC="$XDG_CONFIG_HOME"/x11/xinitrc export XSERVERRC="$XDG_CONFIG_HOME"/x11/xserverrc @@ -70,4 +72,3 @@ export LESSHISTFILE='-' export MANPAGER="less -R -M +Gg" export MPD_HOST="$HOME"/.local/share/mpd/socket export RUSTFLAGS="-L /usr/local/lib" -export WGETRC="$XDG_CONFIG_HOME/wgetrc" 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'; |