Merge branch 'master' into android2
This commit is contained in:
commit
fd957835b7
1 changed files with 7 additions and 5 deletions
12
neofetch
12
neofetch
|
@ -2950,18 +2950,20 @@ dynamicprompt() {
|
||||||
# If the info is higher than the ascii/image place the prompt
|
# If the info is higher than the ascii/image place the prompt
|
||||||
# based on the info height instead of the ascii/image height.
|
# based on the info height instead of the ascii/image height.
|
||||||
if [ "${lines:-0}" -lt "${info_height:-0}" ]; then
|
if [ "${lines:-0}" -lt "${info_height:-0}" ]; then
|
||||||
lines="0"
|
lines="-2"
|
||||||
else
|
else
|
||||||
lines="$((lines - info_height + cursor_yoffset))"
|
lines="$((lines - info_height + cursor_yoffset))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the prompt location
|
# Set the prompt location
|
||||||
printf "\033[${lines/-*/0}B"
|
if [ "$lines" -lt 0 ]; then
|
||||||
|
printf "\033[${lines}A"
|
||||||
|
else
|
||||||
|
printf "\033[${lines}B"
|
||||||
|
fi
|
||||||
|
|
||||||
# Add some padding
|
# Add some padding
|
||||||
[ "$image" == "ascii" ] && \
|
[ "$image" == "ascii" ] && printf "\n\n"
|
||||||
[ "$lines" -gt 0 ] && \
|
|
||||||
printf "\n\n"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Reference in a new issue