aboutsummaryrefslogtreecommitdiff
path: root/src/disk.rs
diff options
context:
space:
mode:
authorMustafa Salih <37256744+MustafaSalih1993@users.noreply.github.com>2020-12-22 07:40:05 +0300
committerGitHub <noreply@github.com>2020-12-22 07:40:05 +0300
commitf6affec55f1c20366e11accf76b99caf4528753f (patch)
treec55292749bfefcc6ac8643e2933949bf72973f63 /src/disk.rs
parent7075f7cf2889076df5f932b17489eee01c6bcccd (diff)
parentd34ef0dd0392674d1a7a8f098b9c57945e96683a (diff)
Merge pull request #3 from MustafaSalih1993/dev
Added rsblocks.yml file and yaml parser to customize
Diffstat (limited to 'src/disk.rs')
-rw-r--r--src/disk.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/disk.rs b/src/disk.rs
index 72dd5bf..3c5db62 100644
--- a/src/disk.rs
+++ b/src/disk.rs
@@ -1,6 +1,7 @@
+use crate::load_config::Settings;
use std::process::Command;
-pub fn disk_free() -> String {
+pub fn disk_free(setting: &Settings) -> String {
let cmd = Command::new("sh")
.arg("-c")
.args(&["df -h"])
@@ -15,5 +16,8 @@ pub fn disk_free() -> String {
break;
}
}
- format!("  {} │", disk_used)
+ format!(
+ " {} {} {}",
+ setting.disk.icon, disk_used, setting.seperator
+ )
}