dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 221213488d84989675442cb273d15a0fd013b51f
parent 285103aff302ac309b372919b8dfd38479cab360
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 15 Feb 2021 13:41:36 +0100

memeselect: use nc(1) for brtv dimensions

Diffstat:
M.local/bin/memeselect | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.local/bin/memeselect b/.local/bin/memeselect @@ -6,8 +6,8 @@ hashtags="${annna}/modules/hashtags/hashtags.txt" updatestr="update local memecache" # fetch bitreich tv dimensions -if command -v sacc >/dev/null 2>&1; then - dimensions="$(sacc bitreich.org/0/tv | grep .m3u | \ +if command -v nc >/dev/null 2>&1; then + dimensions="$(printf '/tv\n' | nc bitreich.org 70 | grep -E '^9.*\.m3u' |\ awk -F' ' '{printf("gopher://%s:%d/%c%s\n", $3, $4, $1, $2)}')" fi @@ -28,6 +28,7 @@ if test "$meme" = "$updatestr"; then cd "$annna" && git pull >/dev/null elif test "$meme"; then if printf '%s\n' "$meme" | grep -qE '\.m3u$'; then + printf '%s' "${meme}" | xclip -i mpv "$meme" else printf '%s' "${meme% *}" | xclip -i