From 07a19e2c9597977b637cc251f74bf110575ac0d0 Mon Sep 17 00:00:00 2001 From: Khalid Date: Tue, 17 Dec 2024 20:26:02 +0300 Subject: [PATCH] hyprctl: Fix `hyprctl` batch JSON command (#8749) --- hyprctl/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index 676c8b982..16d662236 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -284,8 +284,10 @@ int requestHyprpaper(std::string arg) { void batchRequest(std::string arg, bool json) { std::string commands = arg.substr(arg.find_first_of(' ') + 1); - if (json) + if (json) { RE2::GlobalReplace(&commands, ";\\s*", ";j/"); + commands.insert(0, "j/"); + } std::string rq = "[[BATCH]]" + commands; request(rq);