[BUG] EWW_RAM returning strange values
DOD-101 opened this issue · comments
Checklist before submitting an issue
- I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
- I have specifically verified that this bug is not a common user error
- I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)
Description of the bug
EWW_RAM returns some ridiculously high values, which are according to the (docs)[https://elkowar.github.io/eww/magic-vars.html#eww_ram] in kB. However the usage percentage is still accurate.
Returned json by "eww get EWW_RAM":
{"available_mem":9100951552,"free_mem":5621874688,"free_swap":8589930496,"total_mem":16716967936,"total_swap":8589930496,"used_mem":7616016384.0,"used_mem_perc":45.558597564697266}
Reproducing the issue
Simply run "eww get EWW_RAM" in your terminal emulator of choice.
Expected behaviour
The value should ideally equal (at least roughly) what I actually have in my system; 16 GB + 8GB swap.
Additional context
cat /proc/meminfo
MemTotal: 16325164 kB
MemFree: 5492476 kB
MemAvailable: 8888928 kB
The values are in bytes instead of kilobytes. The documentation is wrong. I think returning values in bytes is fine and the docs should be updated instead so that no widgets are broken.
I agree, changing the docs is the best approach here.
The values are in bytes instead of kilobytes.
No idea how I didn't think of checking that.