outputfile and i3blocks command via argument
This commit is contained in:
parent
a6a9598126
commit
daa53a059d
17
src/main.rs
17
src/main.rs
|
@ -296,14 +296,19 @@ fn main() {
|
||||||
|
|
||||||
for (i, num_unseen) in rx {
|
for (i, num_unseen) in rx {
|
||||||
unseen[i] = num_unseen;
|
unseen[i] = num_unseen;
|
||||||
let mut file = std::fs::File::create("/tmp/mails").expect("create failed");
|
let output_path = ::std::env::args().nth(1).unwrap();
|
||||||
|
let commands = ::std::env::args().nth(2).unwrap();
|
||||||
|
let mut file = std::fs::File::create(&output_path).expect("create failed");
|
||||||
file.write_all(num_unseen.to_string().as_bytes()).expect(
|
file.write_all(num_unseen.to_string().as_bytes()).expect(
|
||||||
"write failed",
|
"write failed",
|
||||||
);
|
);
|
||||||
Command::new("pkill")
|
Command::new("sh").arg("-c").arg(&commands).spawn().expect(
|
||||||
.arg("-RTMIN+2")
|
"command failed to start",
|
||||||
.arg("i3blocks")
|
);
|
||||||
.spawn()
|
// Command::new("pkill")
|
||||||
.expect("pkill command failed to start");
|
// .arg("-RTMIN+2")
|
||||||
|
// .arg("i3blocks")
|
||||||
|
// .spawn()
|
||||||
|
// .expect("pkill command failed to start");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue