Comments (4)
Hi, thanks for the report,
can you show the output of
ls -la /sys/class/power_supply/
you may need to change the value of the adapter
variable to the constructor accordingly.
and
ls -la /sys/class/power_supply/BAT*/
If there is nothing, do you have acpi installed? What OS are you running?
from battery-widget.
ls -la /sys/class/power_supply output:
total 0
drwxr-xr-x 2 root root 0 Jul 25 18:20 .
drwxr-xr-x 54 root root 0 Jul 25 18:20 ..
lrwxrwxrwx 1 root root 0 Jul 25 20:41 ACAD -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/ACPI0003:00/power_supply/ACAD
lrwxrwxrwx 1 root root 0 Jul 25 20:41 BAT1 -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:01/PNP0C0A:00/power_supply/BAT1
ls -la /sys/class/power_supply/BAT*/ output:
total 0
drwxr-xr-x 3 root root 0 Jul 25 18:20 .
drwxr-xr-x 3 root root 0 Jul 25 18:20 ..
-rw-r--r-- 1 root root 4096 Jul 25 20:45 alarm
-r--r--r-- 1 root root 4096 Jul 25 20:45 capacity
-r--r--r-- 1 root root 4096 Jul 25 20:45 capacity_level
-r--r--r-- 1 root root 4096 Jul 25 20:45 charge_full
-r--r--r-- 1 root root 4096 Jul 25 20:45 charge_full_design
-r--r--r-- 1 root root 4096 Jul 25 20:45 charge_now
-r--r--r-- 1 root root 4096 Jul 25 20:45 current_now
-r--r--r-- 1 root root 4096 Jul 25 20:45 cycle_count
lrwxrwxrwx 1 root root 0 Jul 25 20:45 device -> ../../../PNP0C0A:00
-r--r--r-- 1 root root 4096 Jul 25 20:45 manufacturer
-r--r--r-- 1 root root 4096 Jul 25 20:45 model_name
drwxr-xr-x 2 root root 0 Jul 25 20:45 power
-r--r--r-- 1 root root 4096 Jul 25 20:45 present
-r--r--r-- 1 root root 4096 Jul 25 20:45 serial_number
-r--r--r-- 1 root root 4096 Jul 25 20:45 status
lrwxrwxrwx 1 root root 0 Jul 25 20:45 subsystem -> ../../../../../../../../class/power_supply
-r--r--r-- 1 root root 4096 Jul 25 20:45 technology
-r--r--r-- 1 root root 4096 Jul 25 20:45 type
-rw-r--r-- 1 root root 4096 Jul 25 18:20 uevent
-r--r--r-- 1 root root 4096 Jul 25 20:45 voltage_min_design
-r--r--r-- 1 root root 4096 Jul 25 20:45 voltage_now
I did not have installed acpi so I did it, however the error is still the same
my OS : 4.11.9-1-ARCH (Arch Linux)
Thanks for your help
from battery-widget.
Try using "BAT1" as adapter:
battery = battery_widget({adapter = "BAT1"})
Does it solve the problem?
from battery-widget.
Yes ! It solved ! Thank you for your help !
from battery-widget.
Related Issues (11)
- Widget only displays battery prefix HOT 5
- Port to FreeBSD
- Error init.lua:272: attempt to compare number with string HOT 2
- Widget Fails on Battery Power (Pinebook Pro) HOT 2
- Font to small. HOT 2
- error on install HOT 4
- Unicode character support assistance HOT 4
- "Capacity 119%" in your screenshot HOT 1
- Rename battery-widget.lua to init.lua HOT 6
- How to add this to the wibar? 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 battery-widget.