Comments (19)
OS X users, what do these commands output?
pmset -g batt | grep -o '[0-9]*%' | tr -d %
ioreg -n AppleSmartBattery -r | grep -o '"[^"]*" = [^ ]*' | sed -e 's/= //g' -e 's/"//g' | sort
Windows users, what do these commands output?
WMIC Path Win32_Battery
WMIC PATH Win32_Battery Get EstimatedChargeRemaining
FreeBSD users, what do these commands output?
acpiconf -i 0 | awk '/Remaining capacity:/ {printf $2}'
acpiconf -i * | awk '/Remaining capacity:/ {printf $2}'
I'm still trying to find the commands for OpenBSD and NetBSD.
from neofetch.
You can tag me next time for OS X test, I will respond to you much faster.
First one is 100
.
Second one is :
-
- AdapterInfo 0
-
- Amperage 0
-
- AvgTimeToEmpty 65535
-
- AvgTimeToFull 65535
-
- BatteryInstalled Yes
-
- BatteryInvalidWakeSeconds 30
-
- BatterySerialNumber XXX (don't want to share)
-
- BootPathUpdated 1454405207
-
- CellVoltage (4090,4112,4085,0)
-
- CurrentCapacity 6014
-
- CycleCount 340
-
- DesignCapacity 6330
-
- DesignCycleCount9C 1000
-
- DeviceName bq20z451
-
- ExternalChargeCapable Yes
-
- ExternalConnected Yes
-
- FirmwareSerialNumber 1
-
- FullPathUpdated 1454421662
-
- FullyCharged Yes
-
- IOGeneralInterest IOCommand
-
- InstantAmperage 0
-
- InstantTimeToEmpty 174
-
- IsCharging No
-
- LegacyBatteryInfo {Amperage=0,Flags=5,Capacity=6059,Current=6014,Voltage=12287,Cycle
-
- Location 0
-
- ManufactureDate 17545
-
- ManufacturerData <000000000702000a038900000XXXXXXXXXXXX (don't want to share)>
-
- MaxCapacity 6059
-
- MaxErr 1
-
- OperationStatus 58435
-
- PackReserve 200
-
- PermanentFailureStatus 0
-
- PostChargeWaitSeconds 120
-
- PostDischargeWaitSeconds 120
-
- Temperature 2943
-
- TimeRemaining 0
-
- UserVisiblePathUpdated 1454421842
-
- Voltage 12287
What are you planing to display? I think it would be nice to display current battery status and then options for cycle count, current capacity & design capacity and also fully charged & is charging.
from neofetch.
Win 10 git bash:
$ WMIC Path Win32_Battery
Availability BatteryRechargeTime BatteryStatus Caption Chemistry ConfigManagerErrorCode ConfigManagerUserConfig CreationClassNam e Description DesignCapacity DesignVoltage DeviceID ErrorCleared ErrorDescription EstimatedChargeRemaining EstimatedRunTime Exp ectedBatteryLife ExpectedLife FullChargeCapacity InstallDate LastErrorCode MaxRechargeTime Name PNPDeviceID PowerManagementCapabiliti es PowerManagementSupported SmartBatteryVersion Status StatusInfo SystemCreationClassName SystemName TimeOnBattery TimeToFullCharge
2 2 Internal Battery 2 Win32_Battery Internal Battery 12112 ASUSXXXXX 98 12312121 XXXXX {1} FALSE OK Win32_ComputerSystem DESKTOP-XXXXXX
$ WMIC PATH Win32_Battery Get EstimatedChargeRemaining
EstimatedChargeRemaining
9
from neofetch.
Thanks for the reply and for testing the commands for me!
Currently the battery function prints in this format:
# Single battery
Battery: XX%
# Multiple
Battery0: XX%
Battery1: XX%
# Shorthand Multiple
Battery: XX%, XX%
For now we'll leave battery support at just usage %, I'm getting a laptop for uni in a few weeks so I'll be able dedicate time to implement is charging
, current capacity
etc properly.
I'll add support for OS X
in the morning, it's 2 am here so I'll be heading off to bed. For the Windows
output is the 2nd command's output the percentage? It's weird that it's just 9
as the first command shows it as 98
.
from neofetch.
One more thing, what does this output on OS X
?
cat /sys/class/power_supply/BAT*/capacity
from neofetch.
Yeah sry, its 98, just copy/paste things.
Ok great, if I had time I would love to help you, but I have exams those days. Meybe after them if you like.
Nothing, because I can't even cd into /sys like it doesn't exist? The only thing starting on s is sbin.
Sleep well.
from neofetch.
Is it possible for an OS X system to have multiple batteries in use at the same time?
from neofetch.
Hmm I am 99% sure that this is not possible but I was just thinking about the new Macbook 12 which has multiple layers or batteries, maybe some info will be different?
But I don't think there will this "multibattery problem" on OS X so don't waste your time implementing this imo.
from neofetch.
I've added support for Mac OS X
and Windows
, please test it out when you can @mclado!
The config options are related to multi-battery and won't work on OS X and Windows for now.
To add support for multi-battery output on Windows I'll need to know the command output so I can,
parse it correctly which means that we'll have to wait for someone with a multi-battery laptop to open
an issue.
from neofetch.
OS X works like it should, check!
from neofetch.
Awesome!
How about Windows?
from neofetch.
Nope, something is not ok.
Disk: 137G / 154G (90%)
Battery: %
from neofetch.
I just pushed a fix to master, it should work now.
from neofetch.
Still not working for me. Using git bash instead of cygwin should't be the problem, right?
from neofetch.
It shouldn't be an issue as wmic
comes with windows, do these commands work on their own?
wmic Path Win32_Battery get EstimatedChargeRemaining /value
wmic Path Win32_Battery get EstimatedChargeRemaining
from neofetch.
Oh wait a sec, it is! Just found out because I tried manually. I am getting "Invalid GET Expression" (in git bash). But the command in cygwin works well. I can't get this cygwin to work as it should so I could run full fetch script. Running manually lines 1240 - 1245 gives me $ echo $battery 100 100 %
from neofetch.
I've fixed the doubled usage in my local branch, thanks for finding it.
What about this command in git bash?:
cmd /c wmic Path Win32_Battery get EstimatedChargeRemaining /value
from neofetch.
I just pushed a fix to master for the doubled battery usage.
from neofetch.
If the command above doesn't work in git bash then I'm going to close this issue as it works in CYGWIN.
from neofetch.
Related Issues (20)
- how install neofetch win 11 HOT 6
- `gen-man` Fails
- Random Characters during auto-startup
- doesn't respect config: info "host" model HOT 3
- windows 11 in ascii HOT 2
- Resolution wrong on Pi OS on Raspberry Pi 5?
- Bash 3.2.57(1)-release "conditional binary operator expected" HOT 1
- MPG123 in songs HOT 1
- neofetch hangs in SSH connection unless 6 options on by default are disabled
- [Idea] Fast way to run NeoFetch one time only (without downloading or installing it) HOT 1
- Add Parch Linux ascii art HOT 1
- Is this project dead? HOT 6
- [Feature] Display device MAC Address HOT 1
- Add VanillaOS ascii art
- feature request `neofetch --config` returns the location of the config file HOT 2
- Question Marks displaying when using neofetch HOT 4
- Hyfetch changes the OS info from Neofetch HOT 2
- requirements to add new distro HOT 6
- Local IP shows vpn-interface instead of physical interface on Ubuntu 22.04
- Changing function's 'subtitle' output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neofetch.