Comments (7)
Should this issue be closed since the issue was in configuration, not in this repo?
from awesome-wm-widgets.
Thanks for raising an issue 👍 I am on 4.2 now and haven't tested on 4.3 yet. AFAIR there are some breaking changes with awful.spawn
. I'll upgrade my awesome this week and will fix the issues. I'll post here when I'm done.
from awesome-wm-widgets.
I was wrong, there are no breaking changes in 4.3 for awful.spawn
. And I just upgraded to 4.3 and batteryarc works as expected, at least updates the arcchart. Could you please try master again.
BTW, where did you get the error log from?
from awesome-wm-widgets.
I'm now using master (commit 54924ef), but the result is still the same.
Looking in the logs I found another error which seems to be real culprit:
2019-04-25 12:21:10 E: awesome: Error during a protected call: ...some/awesome-wm-widgets/batteryarc-widget/batteryarc.lua:103: bad argument #2 to 'format' (number has no integer representation)
stack traceback:
[C]: in function 'string.format'
...some/awesome-wm-widgets/batteryarc-widget/batteryarc.lua:103: in upvalue 'callback'
/usr/share/awesome/lib/awful/widget/watch.lua:77: in function </usr/share/awesome/lib/awful/widget/watch.lua:76>
(...tail calls...)
/usr/share/awesome/lib/awful/spawn.lua:481: in function </usr/share/awesome/lib/awful/spawn.lua:475>
[C]: in function 'xpcall'
/usr/share/awesome/lib/gears/protected_call.lua:36: in function </usr/share/awesome/lib/gears/protected_call.lua:35>
(...tail calls...)
/usr/share/awesome/lib/awful/spawn.lua:577: in upvalue 'done'
/usr/share/awesome/lib/awful/spawn.lua:592: in function </usr/share/awesome/lib/awful/spawn.lua:584>
In batteryarc.lua if I change line 103 to:
-- or string.format('%d', charge)
or charge
The widget works, although without a textual percentage (it always shows three dots as the text).
With the original line, the arc-ring is also always white, while with the change it shows the correct colors (usually a green ring and yellow when below 30% (?))*.
I did upgrade from Ubuntu 18.04 to 19.04 (which brought Awesome 4.3 with it), but I don't think this changed anything in the acpi -i
output. As far as I see the regexes all still match the expected output. I do have a Bluetooth keyboard which has no (useful) battery info available, but that should be filtered out as well. When I disable my Bluetooth keyboad it does not make any difference for the widget.
Output of acpi -i
:
Battery 0: Charging, 55%, 00:37:31 until charged
Battery 0: design capacity 3598 mAh, last full capacity 2919 mAh = 81%
Battery 1: Discharging, 0%, rate information unavailable
Battery 2: Unknown, 5%
Battery 2: design capacity 2097 mAh, last full capacity 1516 mAh = 72%
I obtained the logs by running awesome from bash: awesome -r &
from awesome-wm-widgets.
Adding a debug line before line 101 shows me that charge
is a float:
print("----- Charge: " .. charge)
----- Charge: 46.099518459069
changing line 103 to:
or string.format('%2.0f', charge)
seems to fix the issue
from awesome-wm-widgets.
@teranex It looks like the first error you described was caused by the leftover set_value
function in the widget declaration. When I removed it, the error disappeared.
from awesome-wm-widgets.
@dyfrgi yep, you right, thanks!
from awesome-wm-widgets.
Related Issues (20)
- How to install logout menu widget HOT 4
- todo-widget does not pop up HOT 3
- pactl: Older versions of pactl do not have get-sink-* commands HOT 2
- man i love this widgets are awesome as awesome is the awesomewm
- Pactl volume-widget only updates on one screen HOT 5
- Consider using wttr.in for weather widget HOT 2
- Weather widget does not work, but there are 0 errors
- volume-widget: Mixer selection
- pactl-widget: No way to set limit on max volume HOT 2
- brightness_widget: incorrect brightnessctl command for getting current brightness level HOT 1
- Change color font on the spotify-widget Widget HOT 3
- cpu widget gets placed off screen sometimes HOT 1
- Install dir not found
- README.md installation info is missing HOT 2
- Are there any plans to support hibernate in logout popup? HOT 1
- scripts
- Batteryarc shows battery warning when battery is fully charged
- [Calendar] `focus_date_bg` and `focus_date_fg` broken after updating to last commits HOT 4
- apt widget not working because icon does not show in bar HOT 3
- calendar-widget: 'today' day is not set when opening the calendar
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 awesome-wm-widgets.