Remove image_position

This commit is contained in:
Dylan Araps 2016-06-13 19:08:03 +10:00
parent 43d4e1e865
commit ec8e4f5d5b
3 changed files with 2 additions and 23 deletions

View File

@ -424,7 +424,6 @@ alias fetch2="fetch \
/path/to/img, /path/to/dir/, off /path/to/img, /path/to/dir/, off
--size 00px | --size 00% How to size the image. --size 00px | --size 00% How to size the image.
Possible values: auto, 00px, 00%, none Possible values: auto, 00px, 00%, none
--image_position left/right Where to display the image: (Left/Right)
--crop_mode mode Which crop mode to use --crop_mode mode Which crop mode to use
Takes the values: normal, fit, fill Takes the values: normal, fit, fill
--crop_offset value Change the crop offset for normal mode. --crop_offset value Change the crop offset for normal mode.

View File

@ -330,11 +330,6 @@ thumbnail_dir="$HOME/.cache/thumbnails/neofetch"
# builtin detection doesn't work. # builtin detection doesn't work.
w3m_img_path="/usr/lib/w3m/w3mimgdisplay" w3m_img_path="/usr/lib/w3m/w3mimgdisplay"
# Image position
# Only works with the w3m backend
# --image_position left/right
image_position="left"
# Crop mode # Crop mode
# --crop_mode normal/fit/fill # --crop_mode normal/fit/fill
crop_mode="normal" crop_mode="normal"
@ -2335,18 +2330,8 @@ getimage () {
width="${width:-$image_size}" width="${width:-$image_size}"
height="${height:-$image_size}" height="${height:-$image_size}"
# Where to draw the image # Padding is half the terminal width + gap
case "$image_position" in padding="\033[$((width / font_width + gap + xoffset/font_width))C"
"left")
# Padding is half the terminal width + gap
padding="\033[$((width / font_width + gap + xoffset/font_width))C"
;;
"right")
padding="\033[0C"
xoffset="$((columns * font_width / 2 - gap))"
;;
esac
# Make the directory if it doesn't exist # Make the directory if it doesn't exist
mkdir -p "$thumbnail_dir" mkdir -p "$thumbnail_dir"
@ -3018,7 +3003,6 @@ usage () { cat << EOF
/path/to/img, /path/to/dir/, off /path/to/img, /path/to/dir/, off
--size 00px | --size 00% How to size the image. --size 00px | --size 00% How to size the image.
Possible values: auto, 00px, 00%, none Possible values: auto, 00px, 00%, none
--image_position left/right Where to display the image: (Left/Right)
--crop_mode mode Which crop mode to use --crop_mode mode Which crop mode to use
Takes the values: normal, fit, fill Takes the values: normal, fit, fill
--crop_offset value Change the crop offset for normal mode. --crop_offset value Change the crop offset for normal mode.
@ -3164,7 +3148,6 @@ while [ "$1" ]; do
;; ;;
--size) image_size="$2" ;; --size) image_size="$2" ;;
--image_position) image_position="$2" ;;
--crop_mode) crop_mode="$2" ;; --crop_mode) crop_mode="$2" ;;
--crop_offset) crop_offset="$2" ;; --crop_offset) crop_offset="$2" ;;
--xoffset) xoffset="$2" ;; --xoffset) xoffset="$2" ;;

View File

@ -179,9 +179,6 @@ How to size the image.
.br .br
Possible values: auto, 00px, 00%, none Possible values: auto, 00px, 00%, none
.TP .TP
.B \--image_position 'left/right'
Where to display the image: (Left/Right)
.TP
.B \--crop_mode 'mode' .B \--crop_mode 'mode'
Which crop mode to use Which crop mode to use
.br .br