Giter Club home page Giter Club logo

archey-osx's Introduction

Archey for OS X

An archey script for OS X.

                 ###                  User: jhann
               ####                   Hostname: obihann
               ###                    Distro: OS X 10.10.5
       #######    #######             Kernel: Darwin
     ######################           Uptime:  6:11
    #####################             Shell: /bin/zsh
    ####################              Terminal: xterm-256color iTerm.app
    ####################              Packages: 114
    #####################             CPU: Intel Core i5-3210M CPU @ 2.50GHz
     ######################           Memory: 8 GB
      ####################            Disk: 95%
        ################              Battery: 100.00%
         ####     #####               IP Address: 24.222.18.26

Table Of Contents

Download

The latest stable release is 1.6.0 (md5 82a064d8ce8069f1fa6e9bdf570ebca7).

Installation

To get started you will need homebrew to manage packages such as Python, figlet, and cowsay. To install please run the following command:

brew install archey

Options

  • -b, --nocolor : Use black & white logo
  • -c, --color : Force using a color Logo
  • -p --packager Use auto detected package system (default packager: homebrew)
  • -m, --macports : Use MacPorts instead of Homebrew to display package count
  • -o --offline : Disable the IP address check
  • -l --localip : Show the local IP address associated with the default adapter
  • -h, --help : Show help

Credits

  • djmelik - Archey
  • joshfinnie - A great OSX Python port of Archey
  • Gary00 - A fork of joshfinnie's Archey port, and the base of this script.
  • rdlugosz - Fixing a math error with memory caculations.
  • docwhat - Shell expertise and cleanups.
  • slice27 - Shell wizardy allowing dynamic fields
  • vladshub - Custom logo support

License

This tool is protected by the GNU General Public License v2.

Copyright Jeffrey Hann 2016

archey-osx's People

Contributors

alenbasic avatar andrewsb avatar childnode avatar clawfire avatar docwhat avatar ellimist avatar hkmix avatar jrtc27 avatar kevinmarty avatar lindskogen avatar lucsky avatar meowgorithm avatar onlythefinestwilldo avatar ramlev avatar rdlugosz avatar rodrigozhou avatar sashkab avatar slauber avatar slice27 avatar vishvish avatar zx8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

archey-osx's Issues

1.5 IP timeout & Battery

Thanks for a really great utility! πŸ‘ I wanted to report 2 issues with 1.5:

% archey -c

                 ###                  User: jh
               ####                   Hostname: jhmp
               ###                    Distro: OS X 10.11.1
       #######    #######             Kernel: Darwin
     ######################           Uptime: 16:44  up 8 days,  3:36, 4 users, load averages: 1.64 1.53 1.58
    #####################             Shell: /usr/local/bin/zsh
    ####################              Terminal: xterm-256color iTerm.app
    ####################              Packages: 7
    #####################             CPU: Intel Xeon CPU E5-1680 v2 @ 3.00GHz
     ######################           Memory: 32 GB
      ####################            Disk: 36%
        ################              Battery:
         ####     #####               IP Address: ;; connection timed out; no servers could be reached

πŸ”‹πŸš« I'm on a Mac Pro, which doesn't have a battery, so it seems peculiar to include a blank battery line here.

βŒ› archey now takes about 10 seconds to execute because the IP fetch times out. I've verified that the underlying command archey is using (dig +short myip.opendns.com @resolver1.opendns.com) is the cause of this delay, and that command still times out and prints the above message when used alone. It may be that my current network is blocking or filtering opendns, but even if not, this network request is still likely to be the slowest part about running archey. Perhaps it's worth adding an optional switch to disable the IP address fetch?

archey help misalignment

There's a minor misalignment in archey help (Disable in the last line should be another 2 spaces to the right).

Archey OS X 1.5.2

Usage: /usr/local/bin/archey [options]

  -p --packager  Use auto detected package system (default packager: homebrew).
  -m --macports  Force use MacPorts as package system.
  -b --nocolor   Turn color off.
  -c --color     Force the color on (overrides --nocolor).
  -o --offline Disable the IP address check.

IP address weird message

I am using archey and this is what is being displayed currently for the ip address tag not sure why

<meta* http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>302 Moved</TITLE>< 1>302 Moved The document has moved here.*

Calculating disk usage - hangs for ~10 seconds

Hi,

I was experiencing some issues with archey hanging for approx 10 seconds. I added set -x to the start of the script to see where the problem was, and this line was the cause.

Actually the df command was the problem - I have a SSHFS mount point that had 'gone away': this causes df to timeout after 10 seconds.

Clearly I could unmount it and the problem goes away, but maybe adding a / argument to the df command would make it a bit more robust, and then there's no need for the head -2 either.

e.g.

-disk=$(df | head -2 | tail -1 | awk '{print $5}')
+disk=$(df / | tail -1 | awk '{print $5}')

Happy to provide a PR if that suits?

New Version

Hi,

I think I just got a new version of this via brew and Its actually annoying that you are hitting dig each time. This makes opening a new shell takes very much longer than if one has a call to archey in their respective .zshrc/.bashrc Can you cache this somehow, I like the feature just not the new call each time.

archer doesn't show IP

Hello,
Since my update to High Sierra 10.13.1, archey script doesn't show the IP anymore.
How to fix it ?

Thanks
Miles
capture d ecran 2017-11-08 a 07 46 58

Stuck, cannot get IP address

$ archey gets stuck

while $ archey -o works properly

what could be wrong with my config?
tried to remove .archey-ip, still experiencing this issue

"random" logofile

So, I have a few different logo files I've come up with, random symbols for things that i like, was wondering if there was a way to have a few logofiles and have the script randomly choose one each time its launched, or maybe even dependant on an environment?

Heres an example of the Anjunabeats logo i made, i did another one of a band that i thik would be cool to rotate between!
screen shot 2018-09-01 at 3 46 54 pm

eth0.me is unreachable

curl: (7) Failed to connect to eth0.me port 80: Network is unreachable

It might be time to use a different external IP finder.

πŸ”‹%%

Archey 1.6.0's battery output contains a duplicate %, e.g. Battery: 99.98%%

prep for 1.5.2

  • Update readme
  • update changelog
  • add new version to help output

machdep: class is not implemented

Getting error when running archey on Mac OS X 10.4.11. CPU and RAM are blank. Sample output below.

machdep: class is not implemented

             ###
           ####                   User: admin
           ###                    Hostname: G3
   #######    #######             Distro: OS X 10.4.11
 ######################           Kernel: Darwin
#####################             Uptime: 1 day
####################              Shell: /bin/bash
####################              Terminal: xterm-color
#####################             Packages: 2
 ######################           CPU: 
  ####################            Memory: 0 GB
    ################              Disk: 84%
     ####     ##### 

add local machine ip address?

the ip address is just a routable IP address。 lots of time is no useful.

if you add local machine ip address, it's will be more useful for web programmer .

it's no need type 'ifconfig' to find the local ip .

It seems that archey expects system awk but system sed

I have both brewed gawk & gnu-sed installed.

ioreg -c AppleSmartBattery -r | awk '$1~/Capacity/{c[$1]=$3} END{OFMT="%.2f%"; max=c["\"MaxCapacity\""]; if (max>0) { print 100*c["\"CurrentCapacity\""]/max;} }'

prints 95.67%, which results in Battery: 95.67%%.

I try to fix this problem with

env PATH='/sbin:/usr/sbin/:/bin:/usr/bin' /usr/local/bin/archey

But it breaks uptime

env PATH='/bin:/usr/bin' bash -c "uptime 2> /dev/null | sed -e 's/.*up\s*//' -e 's/,\s*[0-9]* user.*//'"

prints 12:29, 6 users, load averages: 1.46 1.48 1.47, which results in Uptime: 12:36, 6 users, load averages: 1.33 1.43 1.46

Ugly formatting of linebreaks

I just updated Archey via homebrew.

$ brew info archey
archey: stable 1.5, HEAD
Archey script for OS X
https://obihann.github.io/archey-osx/
/usr/local/Cellar/archey/1.4 (3 files, 12K)
  Built from source
/usr/local/Cellar/archey/1.5 (4 files, 16K) *
  Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/archey.rb

My default terminal is 80 chars wide and after the update it looks bad:

Last login: Thu Oct 15 19:01:59 on ttys000

                 ###                  User: <<removed>>
               ####                   Hostname: <<removed>>
               ###                    Distro: OS X 10.11
       #######    #######             Kernel: Darwin
     ######################           Uptime: 19:06  up 9 days, 23:10, 2 users, 
load averages: 0.74 0.82 0.91
    #####################             Shell: /bin/bash
    ####################              Terminal: xterm-256color Apple Terminal
    ####################              Packages: 20
    #####################             CPU: <<removed>>
     ######################           Memory: <<removed>>
      ####################            Disk: <<removed>>
        ################              Battery: <<removed>>
         ####     #####               IP Address: <<removed>>


$ 

I don't remember how the previous version looked but I'm 100% sure that the Uptime didn't break the logo.

There isn't a --localip option, but the README says there is

The README, under "Options", mentions "-l --localip : Show the local IP address associated with the default adapter".

But there is no such option in archey. It's not listed in archey --help and if I try to pass the option I get an "Unknown argument" error.

This option should be taken out of the README.

binary operator expected Error when run "archey"

It gives the following error:
/usr/local/bin/archey: line 67: test: Ryan: binary operator expected
And 'Ryan' is the middle part of my username
I believe this problem is caused because my username contains whitespaces. (But I am not sure)

Archey Hangs

GNU bash, version 4.4.23(1)-release (x86_64-apple-darwin17.5.0) on High Sierra.

Archey hangs with no output indefinitely, nothing seems to pop up in logs.

can not get IP and buttery info use `archey -c` or `archey -c -o`

just like this:

             ###
           ####                   User: w4lle
           ###                    Hostname: w4lleMacBook-Pro
   #######    #######             Distro: OS X 10.9.4
 ######################           Kernel: Darwin
#####################             Uptime:  2:15
####################              Shell: /bin/zsh
####################              Terminal: xterm-256color
#####################             Packages: 20
 ######################           CPU: Intel Core i5-4278U CPU @ 2.60GHz
  ####################            Memory: 8 GB
    ################              Disk: 85%
     ####     #####

OSX version 10.9.4

πŸ”‹β“

archey 1.5.2 on my Mac Pro, which sadly lacks a battery, displays Battery: ? as part of its output.

I think I preferred archey 1.5.1's take, which omitted the battery line entirely on devices that don't have a battery. I am curious if there's any particular reason for this change? :)

Previous site to get IP info has moved

Apparently the URL used to get ip info https://4.ifcfg.me/ has moved and my console outputs html. Would it be possible to check if a call to an external service/url fails then display a default or something more meaningful rather than a bunch of random html?

screen shot 2018-09-07 at 9 10 56 am

Turn off the Apple

An option to turn off the Apple would be great πŸ˜„

It would allow it to be small-width friendly (eg. using it on a side-terminal along with code)

Why my uptime string length is so long?


                 ###                  User: imac
               ####                   Hostname: iMacs-iMac
               ###                    Distro: OS X 10.11
       #######    #######             Kernel: Darwin
     ######################           Uptime:  08:37am  up 9 days 22:13,  2 users,  load average: 1.43, 1.46, 1.48
    #####################             Shell: /usr/local/bin/fish
    ####################              Terminal: xterm-256color iTerm.app
    ####################              Packages: 102
    #####################             CPU: Intel Core i5-4570R CPU @ 2.70GHz
     ######################           Memory: 8 GB
      ####################            Disk: 19%
        ################              Battery: 
         ####     #####               IP Address: 183.54.162.150



[1.5.2] binary operator expected

When I login, I get this:

$ /usr/local/bin/archey
/usr/local/bin/archey: line 132: [: q: binary operator expected

                 ###                  User: xxx
...
$ /usr/local/bin/archey --help
Archey OS X 1.5.2
...

Most likely related to the #29.

New release?

Would love to see the local IP version in stable, thanks πŸ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.