Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #12 from Ndushi/master
Browse files Browse the repository at this point in the history
Performance :)
  • Loading branch information
Jeffrey Hann committed May 7, 2015
2 parents 89b0b42 + 5ff27a7 commit 3f6b794
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions bin/archey
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#!/bin/bash

# Gets the *default* ip address only.
function default_ip
{
/usr/bin/ruby -e '
require "socket"
Socket.do_not_reverse_lookup = true
UDPSocket.open { |s| s.connect("64.233.187.99", 1); puts s.addr.last }
'
}

# Detect the packager.
if [ -x /usr/local/bin/brew ]; then
packager=homebrew
Expand Down Expand Up @@ -56,12 +44,12 @@ done
# System Variables
user=$(whoami)
hostname=$(hostname | sed 's/.local//g')
ip=$(default_ip)
ip=$(dig +short myip.opendns.com @resolver1.opendns.com)
distro="OS X $(sw_vers -productVersion)"
kernel=$(uname)
uptime=$(uptime | sed 's/.*up \([^,]*\), .*/\1/')
shell=$(dscl . -read /Users/$user UserShell | awk '{print $2}')
terminal="$TERM"
shell="$SHELL"
terminal="$TERM ${TERM_PROGRAM//_/ }"
cpu=$(sysctl -n machdep.cpu.brand_string)

# removes (R) and (TM) from the CPU name so it fits in a standard 80 window
Expand Down

0 comments on commit 3f6b794

Please sign in to comment.