dotfiles

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

commit a26c8117b8945f8fbc7f032c664ae8e37362a646
parent e94c325b59f3beabc2ff363a87a897cdd48eb18e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  3 Apr 2020 19:05:02 +0200

Show xkcd alt text as notification

Diffstat:
M.local/bin/comic | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.local/bin/comic b/.local/bin/comic @@ -15,7 +15,10 @@ case "$url" in *xkcd*) f="$(curl -s --write-out "%{filename_effective}\n" -OL \ $(curl -s -L "$url" | \ - grep 'Image URL' | sed 1q | sed 's/^.*https/https/;s/".*$//'))";; + grep 'Image URL' | sed 1q | sed 's/^.*https/https/;s/".*$//'))" + notify-send 'xkcd' \ + "$(curl -s -L "$url" | grep 2x | sed 's/.*title="//;s/".*//' | \ + w3m -dump -T text/html )";; *) (>&2 echo "unknown site") return 1;;