--- a/neofetch	2024-03-30 15:44:25.255862987 +0100
+++ b/neofetch	2024-03-30 15:35:22.367640077 +0100
@@ -81,8 +81,10 @@
     # info "Font" font
     # info "Song" song
     # [[ "$player" ]] && prin "Music Player" "$player"
-    # info "Local IP" local_ip
-    # info "Public IP" public_ip
+    # info "Local IP4" local_ip
+    # info "Local IP6" local_ip6
+    # info "Public IP4" public_ip
+    # info "Public IP6" public_ip6
     # info "Users" users
     # info "Locale" locale  # This only works on glibc systems.
 
@@ -400,6 +402,7 @@
 # Values:  'url'
 # Flag:    --ip_host
 public_ip_host="http://ident.me"
+public_ip6_host="http://ident.me"
 
 # Public IP timeout.
 #
@@ -407,6 +410,7 @@
 # Values:  'int'
 # Flag:    --ip_timeout
 public_ip_timeout=2
+public_ip6_timeout=2
 
 
 # Desktop Environment
@@ -3695,8 +3699,7 @@
 get_local_ip() {
     case $os in
         "Linux" | "BSD" | "Solaris" | "AIX" | "IRIX")
-            local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')"
-            local_ip="${local_ip/uid*}"
+			local_ip=$(ip -4 addr show scope global | grep -m1 "inet " |awk '{print $2}' | cut -d'/' -f1)
             [[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')"
         ;;
 
@@ -3721,23 +3724,52 @@
     esac
 }
 
+get_local_ip6() {
+    case $os in
+        "Linux" | "BSD" | "Solaris" | "AIX" | "IRIX")
+			local_ip6=$(ip -6 addr show scope global | grep -m1 "inet6 " |awk '{print $2}' | cut -d'/' -f1)
+            [[ -z "$local_ip6" ]] && local_ip6="$(ifconfig -a | awk '/global/ {print $2; exit}')"
+        ;;
+    esac
+}
+
 get_public_ip() {
     if type -p dig >/dev/null; then
-        public_ip="$(dig +time=1 +tries=1 +short myip.opendns.com @resolver1.opendns.com)"
+        public_ip="$(dig +time=1 +tries=1 +short A myip.opendns.com @resolver1.opendns.com)"
        [[ "$public_ip" =~ ^\; ]] && unset public_ip
     fi
 
     if [[ -z "$public_ip" ]] && type -p drill >/dev/null; then
-        public_ip="$(drill myip.opendns.com @resolver1.opendns.com | \
+        public_ip="$(drill A myip.opendns.com @resolver1.opendns.com | \
                      awk '/^myip\./ && $3 == "IN" {print $5}')"
     fi
 
     if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then
-        public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
+        public_ip="$(curl -4 --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
     fi
 
     if [[ -z "$public_ip" ]] && type -p wget >/dev/null; then
-        public_ip="$(wget -T "$public_ip_timeout" -qO- "$public_ip_host")"
+        public_ip="$(wget -4 -T "$public_ip_timeout" -qO- "$public_ip_host")"
+    fi
+}
+
+get_public_ip6() {
+    if type -p dig >/dev/null; then
+        public_ip6="$(dig +time=1 +tries=1 +short AAAA myip.opendns.com @resolver1.opendns.com)"
+       [[ "$public_ip6" =~ ^\; ]] && unset public_ip6
+    fi
+
+    if [[ -z "$public_ip6" ]] && type -p drill >/dev/null; then
+        public_ip6="$(drill AAAA myip.opendns.com @resolver1.opendns.com | \
+                     awk '/^myip\./ && $3 == "IN" {print $5}')"
+    fi
+
+    if [[ -z "$public_ip6" ]] && type -p curl >/dev/null; then
+        public_ip6="$(curl -6 --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")"
+    fi
+
+    if [[ -z "$public_ip6" ]] && type -p wget >/dev/null; then
+        public_ip6="$(wget -6 -T "$public_ip_timeout" -qO- "$public_ip_host")"
     fi
 }
 
