Merge branch 'master' of https://github.com/dylanaraps/neofetch
This commit is contained in:
commit
b699989de3
14
neofetch
14
neofetch
|
@ -407,7 +407,7 @@ get_packages() {
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
[[ -d "/usr/local/bin" ]] && \
|
[[ -d "/usr/local/bin" ]] && \
|
||||||
packages="$(($(ls -l /usr/local/bin/ | grep -v "\(../Cellar/\|brew\)" | wc -l) - 1))"
|
packages="$(($(ls -l /usr/local/bin/ | grep -cv "\(../Cellar/\|brew\)") - 1))"
|
||||||
|
|
||||||
type -p port >/dev/null && \
|
type -p port >/dev/null && \
|
||||||
packages="$((packages + $(port installed | wc -l) - 1))"
|
packages="$((packages + $(port installed | wc -l) - 1))"
|
||||||
|
@ -1688,7 +1688,7 @@ get_public_ip() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
|
if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
|
||||||
public_ip="$(wget -T 10 -qO- "$public_ip_host"; printf "%s")"
|
public_ip="$(wget -T 10 -qO- "$public_ip_host")"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1900,7 +1900,7 @@ get_ascii() {
|
||||||
|
|
||||||
# Calculate size of ascii file in line length / line count.
|
# Calculate size of ascii file in line length / line count.
|
||||||
line="${line//\$\{??\}}"
|
line="${line//\$\{??\}}"
|
||||||
line="${line//'\\'/'\'}"
|
line="${line//\\\\/\\}"
|
||||||
(("${#line}" > "${ascii_length:-0}")) && ascii_length="${#line}"
|
(("${#line}" > "${ascii_length:-0}")) && ascii_length="${#line}"
|
||||||
lines="$((lines+=1))"
|
lines="$((lines+=1))"
|
||||||
done < "$ascii"
|
done < "$ascii"
|
||||||
|
@ -2758,9 +2758,9 @@ dynamic_prompt() {
|
||||||
|
|
||||||
# Set the prompt location
|
# Set the prompt location
|
||||||
if (("$lines" < 0)); then
|
if (("$lines" < 0)); then
|
||||||
printf "\033[${lines/-}A"
|
printf "%b" "\033[${lines/-}A"
|
||||||
else
|
else
|
||||||
printf "\033[${lines}B"
|
printf "%b" "\033[${lines}B"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add some padding
|
# Add some padding
|
||||||
|
@ -2797,7 +2797,7 @@ cache_uname() {
|
||||||
usage() { printf "%s" "
|
usage() { printf "%s" "
|
||||||
NEOFETCH
|
NEOFETCH
|
||||||
|
|
||||||
USAGE: neofetch --option "value" --option "value"
|
USAGE: neofetch --option \"value\" --option \"value\"
|
||||||
|
|
||||||
NOTE: There's also a config option for each flag below.
|
NOTE: There's also a config option for each flag below.
|
||||||
|
|
||||||
|
@ -3121,7 +3121,7 @@ main() {
|
||||||
display_image
|
display_image
|
||||||
|
|
||||||
# Set cursor position next to ascii art
|
# Set cursor position next to ascii art
|
||||||
printf "\033[$((${lines:-0} - ${prompt_loc:-0}))A"
|
printf "%b" "\033[$((${lines:-0} - ${prompt_loc:-0}))A"
|
||||||
|
|
||||||
# Reset horizontal cursor position
|
# Reset horizontal cursor position
|
||||||
printf "\033[9999999D"
|
printf "\033[9999999D"
|
||||||
|
|
Reference in New Issue