Implemented ExecNoBlock command support too. This really would've fit into one commit.

This commit is contained in:
Schrottkatze 2022-07-01 12:11:09 +02:00
parent 4581e8972e
commit cedebb4b6d
2 changed files with 8 additions and 4 deletions

View file

@ -14,9 +14,9 @@ This program is inspired by [**xmacro**](https://github.com/Ortega-Dan/xmacroInc
- [x] KeySym/KeyCode/KeyStr action support
- [x] MotionNotify and button support
- [ ] String typing support (Not too high priority, but I'll add it some time probably)
- [ ] ExecBlock/ExecNoBlock support (not high priority)
- [x] ExecBlock/ExecNoBlock support (not high priority)
- [x] ExecBlock
- [ ] ExecNoBlock
- [x] ExecNoBlock
- [x] Recording macros (xmacro like)
- [x] Delay
- [x] Keyboard actions

View file

@ -96,12 +96,16 @@ fn run_instruction(instruction: &str, display: &XDisplay) {
"String" => {
println!("Strings are currently not supported.");
}
"ExecBlock" => {
"ExecBlock" | "ExecNoBlock" => {
let mut command = Command::new(instruction[1]);
for arg in &instruction[2..] {
command.arg(arg);
}
if instruction[0] == "ExecBlock" {
command.status();
} else {
command.spawn();
}
}
c => {
panic!("Unknown command {:?}", instruction)