mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 03:29:48 +01:00
hyprctl: Fix hyprctl
batch JSON command (#8749)
This commit is contained in:
parent
e2c78c00e5
commit
5f1df55fcb
1 changed files with 3 additions and 1 deletions
|
@ -284,8 +284,10 @@ int requestHyprpaper(std::string arg) {
|
||||||
void batchRequest(std::string arg, bool json) {
|
void batchRequest(std::string arg, bool json) {
|
||||||
std::string commands = arg.substr(arg.find_first_of(' ') + 1);
|
std::string commands = arg.substr(arg.find_first_of(' ') + 1);
|
||||||
|
|
||||||
if (json)
|
if (json) {
|
||||||
RE2::GlobalReplace(&commands, ";\\s*", ";j/");
|
RE2::GlobalReplace(&commands, ";\\s*", ";j/");
|
||||||
|
commands.insert(0, "j/");
|
||||||
|
}
|
||||||
|
|
||||||
std::string rq = "[[BATCH]]" + commands;
|
std::string rq = "[[BATCH]]" + commands;
|
||||||
request(rq);
|
request(rq);
|
||||||
|
|
Loading…
Reference in a new issue