diff --git a/1.3.md b/1.3.md index 5a326d72..0748af8c 100644 --- a/1.3.md +++ b/1.3.md @@ -16,6 +16,9 @@ is now calculated by fetch automatically. ```sh # Image takes up 70% of the terminal size. fetch --size 70% + +# Size the image in pixels. +fetch --size 200px ``` ### Packages diff --git a/README.md b/README.md index f030685b..5ff8fc1a 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,7 @@ alias fetch2="fetch \ --image type Image source. Where and what image we display. Possible values: wall, shuffle, ascii, /path/to/img, off - --size 20 | --size 20% Size to make the image, takes pixels or a percentage. + --size 20px | --size 20% Size to make the image, takes pixels or a percentage. --image_backend w3m/iterm2 Which program to use to draw images. --shuffle_dir path/to/dir Which directory to shuffle for an image. --image_position left/right Where to display the image: (Left/Right) diff --git a/config/config b/config/config index 5a034d66..b78db597 100644 --- a/config/config +++ b/config/config @@ -255,7 +255,7 @@ crop_offset="center" # Image size # The image is half the terminal width by default. -# --size auto, px, 00% +# --size auto, 00px, 00% image_size="auto" # Right gap between image and text diff --git a/fetch b/fetch index 0b1c7796..5d13e234 100755 --- a/fetch +++ b/fetch @@ -275,7 +275,7 @@ crop_offset="center" # Image size # The image is half the terminal width by default. -# --size auto, px, 00% +# --size auto, 00px, 00% image_size="auto" # Right gap between image and text @@ -1739,6 +1739,7 @@ getimage () { image_size=$((percent * term_height / 100)) ;; esac + image_size=${image_size/px} # Where to draw the image case "$image_position" in @@ -2266,7 +2267,7 @@ usage () { cat << EOF --image type Image source. Where and what image we display. Possible values: wall, shuffle, ascii, /path/to/img, off - --size 20 | --size 20% Size to make the image, takes pixels or a percentage. + --size 20px | --size 20% Size to make the image, takes pixels or a percentage. --image_backend w3m/iterm2 Which program to use to draw images. --shuffle_dir path/to/dir Which directory to shuffle for an image. --image_position left/right Where to display the image: (Left/Right)