mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:45:59 +01: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();
|
||||
|
||||
const std::string DELIMITER = "\n\n\n";
|
||||
|
||||
while (curitem != "" || request != "") {
|
||||
reply += g_pHyprCtl->getReply(curitem);
|
||||
reply += g_pHyprCtl->getReply(curitem) + DELIMITER;
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue