aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs26
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));
+ }
+}