From cedebb4b6d2b9dd7633efa725a9d20ca2a23f43c Mon Sep 17 00:00:00 2001 From: Gabriel <68819302+obsidianical@users.noreply.github.com> Date: Fri, 1 Jul 2022 12:11:09 +0200 Subject: [PATCH] Implemented ExecNoBlock command support too. This really would've fit into one commit. --- README.md | 4 ++-- src/bin/easymacroplay.rs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b1bbc1e..a9f7045 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/bin/easymacroplay.rs b/src/bin/easymacroplay.rs index d4df99e..24f5663 100644 --- a/src/bin/easymacroplay.rs +++ b/src/bin/easymacroplay.rs @@ -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); } - command.status(); + if instruction[0] == "ExecBlock" { + command.status(); + } else { + command.spawn(); + } } c => { panic!("Unknown command {:?}", instruction)