Closed jhersh closed 9 years ago
Thanks for noticing this, I'll look into both and try to get them taken care of before 1.5.x is released into homebrew.
@jhersh Could you do me a favour and verify that 519456178a49e8a0d1740f4e4942c15ff4bc50a5 hides the battery field for you without causing any new issues? I don't have a machine without a battery so I can only make an assumption this will work. Thanks!
edit: changed to a different commit
@obihann Thanks for checking into this! Unfortunately it's still there:
[0] % git rev-parse HEAD
fa463d4c9d3b213cb9b55c231c6eb3d090c278a6
[0] % gb
* master
[0] % bin/archey -o
### User: jh
#### Hostname: jhmp
### Distro: OS X 10.11.1
####### ####### Kernel: Darwin
###################### Uptime: 8 days
##################### 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: 44%
################ Battery:
#### #####
One other minor thing I noticed:
[0] % bin/archey -co
Unknown argument: -co
For help, use: bin/archey --help
Looks like it wants archey -c -o
instead.
:-1: thats too bad. Could you run ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%", $10/$5 * 100)}'
and paste me the output? Then I should know exactly what users see when they have no battery, and I can filter it from there. Thanks.
No output ("capacity" does not appear anywhere in ioreg -l
)
I think I see it now! I should have this fixed shortly.
6050fbc99d999250f05e30ff17101f31726aaa94 should fix this, let me know if not :+1:
:+1::cool::100:
Sweet! Thanks.
thanks for resolving the battery issue, any news on the IP fetching? I have the exact problem when using the corporate wireless network. Thx
@nilstgmd I added two features that are now in master and 1.5.1 PR, one is the addition of a -o flag that disables the IP check, the other is caching of the IP. Basically we store your IP in ~/.archey-ip and next time we load if that file is less than 6 hours old we just read it instead of checking again.
@obihann Great 👍🏿 Thanks for fixing this :shipit:
Thanks for a really great utility! :+1: I wanted to report 2 issues with 1.5:
:battery::no_entry_sign: I'm on a Mac Pro, which doesn't have a battery, so it seems peculiar to include a blank battery line here.
:hourglass: 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?