aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKhalid <[email protected]>2024-12-17 20:26:02 +0300
committerGitHub <[email protected]>2024-12-17 18:26:02 +0100
commit5f1df55fcb45a72e92258113685aa9064f6ebf3e (patch)
treea50520b7d4cf5408a3ceb58264bbed3a3a1c648f
parente2c78c00e50a0835c3830c8a0cd82049dc5700b8 (diff)
downloadHyprland-5f1df55fcb45a72e92258113685aa9064f6ebf3e.tar.gz
Hyprland-5f1df55fcb45a72e92258113685aa9064f6ebf3e.zip
hyprctl: Fix `hyprctl` batch JSON command (#8749)
-rw-r--r--hyprctl/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp
index 676c8b98..16d66223 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);