aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKhalid <[email protected]>2024-12-17 20:26:02 +0300
committerVaxry <[email protected]>2024-12-19 19:26:40 +0000
commit07a19e2c9597977b637cc251f74bf110575ac0d0 (patch)
treed048f0134ca203a1d4844b66a11d695dc242e974
parent46d5b363fac3820cedede60c8d2a619d5cbeadc2 (diff)
downloadHyprland-07a19e2c9597977b637cc251f74bf110575ac0d0.tar.gz
Hyprland-07a19e2c9597977b637cc251f74bf110575ac0d0.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);