commit 521a932cb3eba697cc4afd17d0d4a8764a394e32 parent 932977e1944dfc12166bce5bc98f4d57a5e0f868 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Tue, 23 Feb 2021 12:15:24 +0100 comic: clean up and use xmessage Diffstat:
M | .local/bin/comic | | | 11 | +++++------ |
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/.local/bin/comic b/.local/bin/comic @@ -61,7 +61,7 @@ process_url() { xdg-open "$img" [ -n "$alttext" ] && \ - notify "${0##*/}" "$(printf '%s' "$alttext" | w3m -dump -T text/html)" + xmessage "$(printf '%s' "$alttext" | w3m -dump -T text/html)" } if [ $# -lt 1 ]; then @@ -72,12 +72,11 @@ fi for u in "$@"; do case "$u" in smbc) - process_url "https://www.smbc-comics.com";; + u="https://www.smbc-comics.com";; jsph) - process_url "https://www.jspowerhour.com";; + u="https://www.jspowerhour.com";; xkcd) - process_url "https://xkcd.com";; - *) - process_url "$u";; + u="https://xkcd.com";; esac + process_url "$u" done