mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
general: Cleanup
This commit is contained in:
3
neofetch
3
neofetch
@@ -2922,12 +2922,11 @@ get_term_size() {
|
|||||||
get_image_size() {
|
get_image_size() {
|
||||||
# This functions determines the size to make the thumbnail image.
|
# This functions determines the size to make the thumbnail image.
|
||||||
read -r lines columns <<< "$(stty size)"
|
read -r lines columns <<< "$(stty size)"
|
||||||
|
read -r width height <<< "$(identify -format "%w %h" "$image")"
|
||||||
|
|
||||||
font_width="$((term_width / columns))"
|
font_width="$((term_width / columns))"
|
||||||
font_height="$((term_height / lines))"
|
font_height="$((term_height / lines))"
|
||||||
|
|
||||||
read -r width height <<< "$(identify -format "%w %h" "$image")"
|
|
||||||
|
|
||||||
# Calculate image size based on terminal size.
|
# Calculate image size based on terminal size.
|
||||||
# We multiply the sizes by 10 to do some more precise division.
|
# We multiply the sizes by 10 to do some more precise division.
|
||||||
while ((width >= (term_width * 10 / 25) ||
|
while ((width >= (term_width * 10 / 25) ||
|
||||||
|
Reference in New Issue
Block a user