New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Battery segment showing as charging color/icon when it should show as discharging #644
Comments
The code is actually the same, so there's no way oh-my-posh can inform a difference in behaviour unless the OS (or distaffs/battery) reports something else. The only thing impacting this can be when Windows reports maybe more batteries than WSL, which indeed maps the status the most logical way. |
Yes, I'm sure
This is a surface book which has multiple batteries, so that must be the source of the behavior difference. I charged overnight and unplugged, now my battery toolbar widget lists both batteries as "100% and in use" I'm not sure why OMP on Windows displays this state using the charging icon + color |
@devhawk would it make more sense for you to see both batteries btw? I'll validate the logic as maybe I made a silly mistake. |
I would think displaying a single combined battery segment makes most sense. Thanks for taking a look at the logic. Let me know how I can help. Unfortunately, my go skills are VERY limited so I can't really help troubleshoot locally |
@devhawk I tweaked the mapping and adjusted it so it can be tested. Can you validate the latest release? |
Also had the same behaviour on my Windows machine, but seems resolved by the v3.137.3 release... |
v3.137.3 also appears to have resolved this issue on my Surface Book. Thanks @JanDeDobbeleer! |
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. |
Prerequisites
CONTRIBUTING
guideDescription
Battery segment shows as charging when power is disconnected.
Problem seems to be isolated to Windows. I have configured my WSL distros on this box to use the oh-my-posh-wsl binary and the same theme as I do on Windows (bash instead of powershell tho). On Ubuntu, the battery segment displays correctly when discharging.
Environment
Steps to Reproduce
Battery segment of my theme:
Expected behavior: [What you expected to happen]
How it looks on WSL:
Actual behavior: [What actually happened]
How it looks on Windows:
The text was updated successfully, but these errors were encountered: