mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix: lint
This commit is contained in:
@ -31,17 +31,18 @@ auto waybar::modules::Memory::update() -> void {
|
||||
}
|
||||
|
||||
if (memtotal > 0 && memfree >= 0) {
|
||||
float total_ram_gigabytes = 0.01*round(memtotal / 10485.76); // 100*10485.76 = 2^20 = 1024^2 = GiB/KiB
|
||||
float total_swap_gigabytes = 0.01*round(swaptotal / 10485.76);
|
||||
float total_ram_gigabytes =
|
||||
0.01 * round(memtotal / 10485.76); // 100*10485.76 = 2^20 = 1024^2 = GiB/KiB
|
||||
float total_swap_gigabytes = 0.01 * round(swaptotal / 10485.76);
|
||||
int used_ram_percentage = 100 * (memtotal - memfree) / memtotal;
|
||||
int used_swap_percentage = 0;
|
||||
if (swaptotal && swapfree) {
|
||||
used_swap_percentage = 100 * (swaptotal - swapfree) / swaptotal;
|
||||
}
|
||||
float used_ram_gigabytes = 0.01*round((memtotal - memfree) / 10485.76);
|
||||
float used_swap_gigabytes = 0.01*round((swaptotal - swapfree) / 10485.76);
|
||||
float available_ram_gigabytes = 0.01*round(memfree / 10485.76);
|
||||
float available_swap_gigabytes = 0.01*round(swapfree / 10485.76);
|
||||
float used_ram_gigabytes = 0.01 * round((memtotal - memfree) / 10485.76);
|
||||
float used_swap_gigabytes = 0.01 * round((swaptotal - swapfree) / 10485.76);
|
||||
float available_ram_gigabytes = 0.01 * round(memfree / 10485.76);
|
||||
float available_swap_gigabytes = 0.01 * round(swapfree / 10485.76);
|
||||
|
||||
auto format = format_;
|
||||
auto state = getState(used_ram_percentage);
|
||||
|
Reference in New Issue
Block a user