mirror of
https://github.com/vale981/Hyprland
synced 2025-03-06 01:51:37 -05:00
hyprctl: add delimiter to hyprctl batch command (#6261)
adds a delimiter of 3 newlines to separate different command outputs
This commit is contained in:
parent
db5d39a66f
commit
546a486bab
1 changed files with 4 additions and 2 deletions
|
@ -1045,13 +1045,15 @@ std::string dispatchBatch(eHyprCtlOutputFormat format, std::string request) {
|
||||||
|
|
||||||
nextItem();
|
nextItem();
|
||||||
|
|
||||||
|
const std::string DELIMITER = "\n\n\n";
|
||||||
|
|
||||||
while (curitem != "" || request != "") {
|
while (curitem != "" || request != "") {
|
||||||
reply += g_pHyprCtl->getReply(curitem);
|
reply += g_pHyprCtl->getReply(curitem) + DELIMITER;
|
||||||
|
|
||||||
nextItem();
|
nextItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
return reply;
|
return reply.substr(0, std::max(static_cast<int>(reply.size() - DELIMITER.size()), 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string dispatchSetCursor(eHyprCtlOutputFormat format, std::string request) {
|
std::string dispatchSetCursor(eHyprCtlOutputFormat format, std::string request) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue