very useless code cleanup
This commit is contained in:
parent
ccd5d9f526
commit
e4fecc6733
1 changed files with 3 additions and 3 deletions
6
neofetch
6
neofetch
|
@ -2710,7 +2710,7 @@ get_memory() {
|
|||
pages_wired="$(vm_stat | awk '/ wired/ { print $4 }')"
|
||||
pages_compressed="$(vm_stat | awk '/ occupied/ { printf $5 }')"
|
||||
pages_compressed="${pages_compressed:-0}"
|
||||
mem_used="$(((${pages_app} + ${pages_wired//.} + ${pages_compressed//.}) * hw_pagesize / 1024 / 1024))"
|
||||
mem_used="$(((pages_app + ${pages_wired//.} + ${pages_compressed//.}) * hw_pagesize / 1024 / 1024))"
|
||||
;;
|
||||
|
||||
"BSD" | "MINIX")
|
||||
|
@ -3904,12 +3904,12 @@ get_local_ip() {
|
|||
}
|
||||
|
||||
get_public_ip() {
|
||||
if [[ ! -n "$public_ip_host" ]] && type -p dig >/dev/null; then
|
||||
if [[ -z "$public_ip_host" ]] && type -p dig >/dev/null; then
|
||||
public_ip="$(dig +time=1 +tries=1 +short myip.opendns.com @resolver1.opendns.com)"
|
||||
[[ "$public_ip" =~ ^\; ]] && unset public_ip
|
||||
fi
|
||||
|
||||
if [[ ! -n "$public_ip_host" ]] && [[ -z "$public_ip" ]] && type -p drill >/dev/null; then
|
||||
if [[ -z "$public_ip_host" ]] && [[ -z "$public_ip" ]] && type -p drill >/dev/null; then
|
||||
public_ip="$(drill myip.opendns.com @resolver1.opendns.com | \
|
||||
awk '/^myip\./ && $3 == "IN" {print $5}')"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue