mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
parent
a255a022a7
commit
138f5faed8
1 changed files with 3 additions and 3 deletions
|
@ -98,11 +98,11 @@ namespace modules {
|
|||
|
||||
mount->bytes_total = buffer.f_bsize * buffer.f_blocks;
|
||||
mount->bytes_free = buffer.f_bsize * buffer.f_bfree;
|
||||
mount->bytes_used = mount->bytes_total - buffer.f_bsize * buffer.f_bavail;
|
||||
mount->bytes_used = mount->bytes_total - mount->bytes_free;
|
||||
mount->bytes_avail = buffer.f_bsize * buffer.f_bavail;
|
||||
|
||||
mount->percentage_free = math_util::percentage<double>(mount->bytes_avail, mount->bytes_total);
|
||||
mount->percentage_used = math_util::percentage<double>(mount->bytes_used, mount->bytes_total);
|
||||
mount->percentage_free = math_util::percentage<double>(mount->bytes_avail, mount->bytes_used + mount->bytes_avail);
|
||||
mount->percentage_used = math_util::percentage<double>(mount->bytes_used, mount->bytes_used + mount->bytes_avail);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue