From a27382d21dd503bacee605e0ccd8766e17e4c4ae Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 21 May 2018 08:29:50 +1000 Subject: [PATCH] image: Make the resolution of catimg configurable. --- neofetch | 12 +++++++++++- neofetch.1 | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 5bd1203e..30a98816 100755 --- a/neofetch +++ b/neofetch @@ -747,6 +747,14 @@ crop_offset="center" # --size image_size="auto" +# Catimg block size. +# Control the resolution of catimg. +# +# Default: '2' +# Values: '1', '2' +# Flags: --catimg_size +catimg_size="2" + # Gap between image and text # # Default: '3' @@ -3842,7 +3850,7 @@ display_image() { ;; "catimg") - catimg -w "$((width * 2 / font_width))" "$image" ||\ + catimg -w "$((width * 2 / font_width))" -r "$catimg_size" "$image" ||\ to_off "Image: catimg failed to display the image." ;; @@ -4778,6 +4786,7 @@ IMAGE: in some terminals emulators when using image mode. --size 00px | --size 00% How to size the image. Possible values: auto, 00px, 00%, none + --catimg_size 1/2 Change the resolution of catimg. --crop_mode mode Which crop mode to use Takes the values: normal, fit, fill --crop_offset value Change the crop offset for normal mode. @@ -4940,6 +4949,7 @@ get_args() { # Image options "--loop") image_loop="on" ;; "--image_size" | "--size") image_size="$2" ;; + "--catimg_size") catimg_size="$2" ;; "--crop_mode") crop_mode="$2" ;; "--crop_offset") crop_offset="$2" ;; "--xoffset") xoffset="$2" ;; diff --git a/neofetch.1 b/neofetch.1 index d9b4e2c7..e65e9fa2 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -276,6 +276,9 @@ in some terminals emulators when using image mode. How to size the image. Possible values: auto, 00px, 00%, none .TP +\fB\-\-catimg_size\fR 1/2 +Change the resolution of catimg. +.TP \fB\-\-crop_mode\fR mode Which crop mode to use Takes the values: normal, fit, fill