From d396c14f2a1015b56adc38d0c60020d3d81660dc Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 19 Dec 2016 11:58:49 +1100 Subject: [PATCH] Local IP: Fix IP address on Minix --- neofetch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index c4959c61..df8e007c 100755 --- a/neofetch +++ b/neofetch @@ -1652,11 +1652,15 @@ get_battery() { get_local_ip() { case "$os" in - "Linux" | "BSD" | "Solaris" | "MINIX") + "Linux" | "BSD" | "Solaris") local_ip="$(ip route get 1 | awk '{print $NF;exit}')" [[ -z "$local_ip" ]] && local_ip="$(ifconfig | awk '/broadcast/ {print $2}')" ;; + "MINIX") + local_ip="$(ifconfig | awk '{printf $3; exit}')" + ;; + "Mac OS X" | "iPhone OS") local_ip="$(ipconfig getifaddr en0)" [[ -z "$local_ip" ]] && local_ip="$(ipconfig getifaddr en1)"