aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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);