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 5130a7f1e63b7d5e99f55ad454add80633899c0c
parent 4791a1fd67ae420bd48b83d44edd78f8bdcea71a
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 17 Feb 2021 11:33:45 +0100

plumb: add unwebp integration

Diffstat:
D.local/bin/memeselect | 40----------------------------------------
M.local/bin/plumb | 2++
2 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/.local/bin/memeselect b/.local/bin/memeselect @@ -1,40 +0,0 @@ -#!/bin/sh -# select bitreich tv dimensions and memecache memes. - -annna="$HOME/.cache/annna" -hashtags="${annna}/modules/hashtags/hashtags.txt" -updatestr="update local memecache" - -# fetch bitreich tv dimensions -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 - -# fetch annna's memecache listing -if ! test -d "$(dirname "$annna")"; then - mkdir -p "$(dirname "$annna")" -fi -if ! test -d "$annna"; then - cd "$(dirname "$annna")" - git clone git://bitreich.org/annna -fi - -# present meme choices in dmenu -meme="$((printf '%s\n' "$updatestr"; printf '%s\n' "$dimensions"; \ - cat "$hashtags") | dmenu -l 10)" - -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 - printf '%s' "${meme#* }" | xclip -i -selection clipboard - xdg-open "${meme#* }" - fi -else - exit 1 -fi diff --git a/.local/bin/plumb b/.local/bin/plumb @@ -219,6 +219,8 @@ handle_url() { $prefix mplayer "$(fetch "$t")" elif regeximatch "$t" '\.(png|jpg|jpeg|tif|bmp|gif)$'; then $prefix sxiv -a -s f "$(fetch "$t")" + elif regeximatch "$t" '\.webp$'; then + $prefix sxiv -a -s f "$(unwebp -e "$(fetch "$t")")" elif regeximatch "$t" '\.(pdf|ps|epub|djvu)$'; then $prefix zathura "$(fetch "$t")" elif regeximatch "$t" '(smbc-comics\.com|xkcd\.com|jspowerhour\.com|explosm\.net)'; then