From 5ade44b9b356faf21bfe27e1ef9351b9d6d85739 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 14 Jan 2017 15:30:37 +1100 Subject: [PATCH] Images add 'catimg' backend --- neofetch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0ff17521..de748d33 100755 --- a/neofetch +++ b/neofetch @@ -2357,6 +2357,7 @@ make_thumbnail() { } display_image() { + image_program="catimg" case "$image_program" in "w3m") # Add a tiny delay to fix issues with images not @@ -2373,6 +2374,12 @@ display_image() { "tycat") tycat "$image" || to_off "Images: tycat failed to display the image." ;; + + "catimg") + catimg -w "$columns" "$image" || to_off "Images: catimg failed to display the image." + text_padding="$((columns / 2 + gap))" + zws= + ;; esac } @@ -2548,7 +2555,7 @@ get_underline() { get_line_break() { # Print it directly. - printf "%s\n" "${zws} " + printf "%s\n" "${zws}" # Calculate info height. ((++info_height))