Added used space to EWW_DISK
This commit is contained in:
parent
86dce341ac
commit
5ca6ba03c4
1 changed files with 12 additions and 7 deletions
|
@ -15,13 +15,18 @@ pub fn get_disks() -> String {
|
||||||
"{{ {} }}",
|
"{{ {} }}",
|
||||||
c.get_disks()
|
c.get_disks()
|
||||||
.iter()
|
.iter()
|
||||||
.map(|c| format!(
|
.map(|c| {
|
||||||
r#""{}": {{"name": {:?}, "total": {}, "free": {}}}"#,
|
let total_space = c.get_total_space();
|
||||||
c.get_mount_point().display(),
|
let available_space = c.get_available_space();
|
||||||
c.get_name(),
|
format!(
|
||||||
c.get_total_space(),
|
r#""{}": {{"name": {:?}, "total": {}, "free": {}, "used": {}}}"#,
|
||||||
c.get_available_space(),
|
c.get_mount_point().display(),
|
||||||
))
|
c.get_name(),
|
||||||
|
total_space,
|
||||||
|
available_space,
|
||||||
|
total_space - available_space,
|
||||||
|
)
|
||||||
|
})
|
||||||
.join(",")
|
.join(",")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue