Not sure if this is the best way to do this. I noticed that a space was being included at the start of the layout icon text. My attempt to remove it.
diff --git a/src/main.cpp b/src/main.cpp
index 697909b..7b567e9 100644
--- a/src/main.cpp+++ b/src/main.cpp
@@ -326,6 +326,8 @@ static void handleStdin(const std::string& line)
mon->tags = tags;
} else if (command == "layout") {
auto layout = std::string {};
+ while (stream.peek() == ' ') // skip spaces+ stream.get(); std::getline(stream, layout);
mon->bar.setLayout(layout);
}
Wow, nice find!
Here's a shorter way: Replace your two new lines with
stream >> std::ws;
This must also be done for the `if (command == "title")` block.
Raphi
This patch does not apply cleanly on top of current master, I assume you have other patches applied. Please rebase your patch on top of current master, and also use either `git format-patch` or `git send-email` [1] to create it. Otherwise the patch will not be attributed to you because it lacks your author information.
Applying: trim spaces from before layout icon
error: patch failed: src/main.cpp:300
error: src/main.cpp: patch does not apply
Patch failed at 0001 trim spaces from before layout icon
Raphi
[1] https://git-send-email.io/