diff options
author | mustafa salih <mustafasalih1991@gmail.com> | 2020-12-21 13:29:45 +0300 |
---|---|---|
committer | mustafa salih <mustafasalih1991@gmail.com> | 2020-12-21 13:29:45 +0300 |
commit | f7b750580cab658b6f6f725608a15a8e75423a97 (patch) | |
tree | 10ec77645d9d35f05fe1ce164893e9a2e36edffd /src/main.rs |
init commit
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e69b5af --- /dev/null +++ b/src/main.rs @@ -0,0 +1,26 @@ +use std::process::Command; +use std::thread; +use std::time::Duration; + +mod date; +mod disk; +mod mem; + +fn main() { + loop { + let args = format!( + "{}{}{}", + disk::disk_free(), + mem::mem().unwrap(), + date::fmt_date("%d %b, %I:%M:%S %p") + ); + + Command::new("xsetroot") + .arg("-name") + .arg(args) + .output() + .unwrap(); + + thread::sleep(Duration::new(1, 0)); + } +} |