X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=gopher.sh;h=81c5b0947b3c3f6d69975fd7b8da6ee1e0933e7f;hb=14f6746555cdb113c059e1b3a6d1fbc2f76e06dc;hp=6b16f264bed62a596d1feefe2f826639f0e0cab7;hpb=da184edf3222e7d0684ce1467b520bfbff52f127;p=gofetch.git diff --git a/gopher.sh b/gopher.sh index 6b16f26..81c5b09 100755 --- a/gopher.sh +++ b/gopher.sh @@ -47,7 +47,7 @@ if [ "$LINK_COLOR" != "-" ]; then EL="`tput init`"; fi -PREFIX="[0-9h]" +PREFIX="[0-9hIg]" # $0 [FILE] # Display a gopher menu for the given resource @@ -143,14 +143,16 @@ download) ;; g|I) if convert -h >/dev/null 2>&1; then - if jp2a -h >/dev/null 2>&1; then + if ImageUtils.sh --help >/dev/null 2>&1; then + ImageUtils.sh --mode=DITHERING \ + --width=74 "$tmp" | less + elif jp2a -h >/dev/null 2>&1; then convert "$tmp" "$tmp.jpg" - # not supported: --chars=" ░▒▓█" - jp2a --border --colors --chars=" .-+=o8#"\ + jp2a --border --chars=" .-+=o8#"\ --width=74 "$tmp.jpg" | less else - echo "required program not found to view images: jp2a" \ - | less + echo "required program not found to view images:" \ + jp2a or ImageUtils.sh | less fi else echo "required program not found to view images: convert" \