Rename to
This commit is contained in:
parent
871ae644ed
commit
b3a18ffaad
|
@ -198,7 +198,7 @@ prompt_height=1
|
||||||
image="wall"
|
image="wall"
|
||||||
|
|
||||||
# Thumbnail directory
|
# Thumbnail directory
|
||||||
imgtempdir="$HOME/.cache/thumbnails/fetch"
|
thumbnail_dir="$HOME/.cache/thumbnails/fetch"
|
||||||
|
|
||||||
# Image Backend
|
# Image Backend
|
||||||
# Which program to draw images with
|
# Which program to draw images with
|
||||||
|
|
16
fetch
16
fetch
|
@ -218,7 +218,7 @@ prompt_height=1
|
||||||
image="wall"
|
image="wall"
|
||||||
|
|
||||||
# Thumbnail directory
|
# Thumbnail directory
|
||||||
imgtempdir="$HOME/.cache/thumbnails/fetch"
|
thumbnail_dir="$HOME/.cache/thumbnails/fetch"
|
||||||
|
|
||||||
# Image Backend
|
# Image Backend
|
||||||
# Which program to draw images with
|
# Which program to draw images with
|
||||||
|
@ -1606,7 +1606,7 @@ getimage () {
|
||||||
lines=$(tput lines)
|
lines=$(tput lines)
|
||||||
|
|
||||||
# Make the directory if it doesn't exist
|
# Make the directory if it doesn't exist
|
||||||
mkdir -p "$imgtempdir"
|
mkdir -p "$thumbnail_dir"
|
||||||
|
|
||||||
# Check to see if the image has a file extension
|
# Check to see if the image has a file extension
|
||||||
case "${img##*/}" in
|
case "${img##*/}" in
|
||||||
|
@ -1623,7 +1623,7 @@ getimage () {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check to see if the thumbnail exists before we do any cropping.
|
# Check to see if the thumbnail exists before we do any cropping.
|
||||||
if [ ! -f "$imgtempdir/$imgname" ]; then
|
if [ ! -f "$thumbnail_dir/$imgname" ]; then
|
||||||
# Get image size so that we can do a better crop
|
# Get image size so that we can do a better crop
|
||||||
size=$(identify -format "%w %h" "$img")
|
size=$(identify -format "%w %h" "$img")
|
||||||
width=${size%% *}
|
width=${size%% *}
|
||||||
|
@ -1650,7 +1650,7 @@ getimage () {
|
||||||
-background "$c" \
|
-background "$c" \
|
||||||
-extent "$size"x"$size" \
|
-extent "$size"x"$size" \
|
||||||
-scale "$imgsize"x"$imgsize" \
|
-scale "$imgsize"x"$imgsize" \
|
||||||
"$imgtempdir/$imgname"
|
"$thumbnail_dir/$imgname"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
fill)
|
fill)
|
||||||
|
@ -1659,7 +1659,7 @@ getimage () {
|
||||||
-trim +repage \
|
-trim +repage \
|
||||||
-scale "$imgsize"x"$imgsize"^ \
|
-scale "$imgsize"x"$imgsize"^ \
|
||||||
-extent "$imgsize"x"$imgsize" \
|
-extent "$imgsize"x"$imgsize" \
|
||||||
"$imgtempdir/$imgname"
|
"$thumbnail_dir/$imgname"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
@ -1669,13 +1669,13 @@ getimage () {
|
||||||
-crop "$size"x"$size"+0+0 \
|
-crop "$size"x"$size"+0+0 \
|
||||||
-quality 95 \
|
-quality 95 \
|
||||||
-scale "$imgsize"x"$imgsize" \
|
-scale "$imgsize"x"$imgsize" \
|
||||||
"$imgtempdir/$imgname"
|
"$thumbnail_dir/$imgname"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The final image
|
# The final image
|
||||||
img="$imgtempdir/$imgname"
|
img="$thumbnail_dir/$imgname"
|
||||||
}
|
}
|
||||||
|
|
||||||
scrot_path="$scrot_dir/$scrot_name"
|
scrot_path="$scrot_dir/$scrot_name"
|
||||||
|
@ -2068,7 +2068,7 @@ while [ "$1" ]; do
|
||||||
--xoffset) xoffset="$2" ;;
|
--xoffset) xoffset="$2" ;;
|
||||||
--yoffset) yoffset="$2" ;;
|
--yoffset) yoffset="$2" ;;
|
||||||
--gap) gap="$2" ;;
|
--gap) gap="$2" ;;
|
||||||
--clean) rm -rf "$imgtempdir" || exit ;;
|
--clean) rm -rf "$thumbnail_dir" || exit ;;
|
||||||
|
|
||||||
# Ascii
|
# Ascii
|
||||||
--ascii) image="ascii"; ascii="$2"
|
--ascii) image="ascii"; ascii="$2"
|
||||||
|
|
Reference in New Issue