Comments (19)
I have added Linux implementation back here: #37
The MR still needs some cleaning, I will merge this once I find some spare time.
from cnx.
@72siddharth I just merged the MR to master. Are you able to reproduce the issue with master branch ?
from cnx.
You mean it didn't show the volume before ?
Yea, that's what I meant.
Now the volume widget shows up but doesn't update.
from cnx.
@72siddharth Thanks, yeah I'm looking to see if there a better way to solve this. Can you open a new issue for the volume widget problem ?
from cnx.
@72siddharth I have updated the MR. Can you give that a try ?
from cnx.
I believe the Linux specific implementation has been withdrawn from the Widgets/battery.rs
.
Probably due to unresolved issues?
from cnx.
@psibi The bar runs but the issue persists in a new form.
The battey widget doesn't show up and it's printed
Error from widget 6: Could not load value from battery status file: charge_full
from cnx.
I also noticed another issue.
The volume doesn't update real time.
The volume displayed is the volume of the system when the bar was started, and it doesn't update with any changes
from cnx.
Thanks for the feedback! I haven't tested the battery thing yet as I don't run cnx on my laptop as I don't use it frequently these days.
The volume displayed is the volume of the system when the bar was started, and it doesn't update with any changes
That is strange as I can tell you that it works for me. But I'm not that surprised as it's the only module currently which I'm not that happy about. Some questions:
- Did the volume widget work for you before ?
- Are you getting any messages from cnx when you are updating the volume ?
from cnx.
Thanks for your quick response
Did the volume widget work for you before ?
Previously the bar ran but the position for volume widget was empty
Are you getting any messages from cnx when you are updating the volume ?
Nope, cnx doesn't seem to notice the volume change or it doesn't check the volume after the first check, if that makes any sense
from cnx.
Previously the bar ran but the position for volume widget was empty
What do you mean by volume widget was empty ? You mean it didn't show the volume before ? You mean in the current behaviour: it's showing volume but it doesn't get updated ?
from cnx.
@72siddharth I can reproduce the issue at my side and will have a fix soon. What is the output of this in your system:
ls /sys/class/power_supply/BAT1/
from cnx.
@72siddharth I have created a PR which fixes the battery widget for Linux: #43
You can optionally now specify the battery path name:
let battery = Battery::new(attr.clone(), Color::red(), Some("BAT1".into()), Some(battery_render));
Can you give it a try and see if that fixes it for you ?
from cnx.
@72siddharth I can reproduce the issue at my side and will have a fix soon. What is the output of this in your system:
ls /sys/class/power_supply/BAT1/
$ ls /sys/class/power_supply/BAT1/
alarm model_name
capacity power
capacity_level present
charge_full serial_number
charge_full_design status
charge_now subsystem
current_now technology
cycle_count type
device uevent
hwmon2 voltage_min_design
manufacturer voltage_now
from cnx.
@72siddharth Thanks, that LGTM and I think my new above linked PR should fix the issue for you. Give it a go and let me know how it goes.
from cnx.
@psibi
So I tried the PR, unfortunately it didn't fix the issue in it's current state and I got this
Error from widget 7: Could not load value from battery status file: current_now
But as it turns out this was a really helpful error message, so I checked .../BAT1/current_now and this is what cat results in
cat: /sys/class/power_supply/BAT1/current_now: No such device
So I fiddled around with the battery fetching code and switched "current_now" with "charge_now" within the load_value function, and behold it works perfectly.
from cnx.
@72siddharth Thanks, I will investigate more about it to understand this further. From a quick google the above issue you are facing looks like a BIOS issue: https://bugzilla.kernel.org/show_bug.cgi?id=83411
from cnx.
@psibi You're right, seems to be more of a firmware issue.
Thank you, the issue seems to be solved by replacing "current_now" with "charge_now" although I do not understand the overall implications of this.
And unfortunately the volume widget problem still persists, of not updating with changes in volume.
from cnx.
The battery widget now works perfectly. Thank you very much.
from cnx.
Related Issues (20)
- Move more of the Tokio setup into Bar, to keep main() simple? HOT 1
- Add a README
- Get tests (or test? :)) passing on Travis HOT 2
- Do we need the Widget trait, or should a widget just mean something than implements Stream? HOT 3
- Consider renaming as `hue` is not available on crates.io HOT 1
- Add some docstrings! HOT 1
- Add support for vertical status bar? HOT 2
- Wayland HOT 2
- Fails to compile in Arch Linux HOT 2
- Make master compatible with Linux HOT 4
- active_window_title widget doesn't change when switching to an empty tag. HOT 2
- Implement disk statistics HOT 3
- Volume Widget doesn't update HOT 2
- Rust toolchain HOT 4
- Update to latest xcb (1.2.0)
- Allow to specify the width and offset of the bar HOT 1
- LetWM pager in cnx-contrib HOT 1
- How to make it work with Penrose? HOT 1
- (feature) systray HOT 4
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 cnx.