trim spaces from title and layout symbol

This commit is contained in:
Ben Collerson 2022-11-25 19:30:41 +10:00 committed by Raphael Robatsch
parent 77c2c1de97
commit 6e464bf35d

View file

@ -300,6 +300,7 @@ static void handleStdin(const std::string& line)
return; return;
if (command == "title") { if (command == "title") {
auto title = std::string {}; auto title = std::string {};
stream >> std::ws;
std::getline(stream, title); std::getline(stream, title);
mon->bar.setTitle(title); mon->bar.setTitle(title);
} else if (command == "selmon") { } else if (command == "selmon") {
@ -326,6 +327,7 @@ static void handleStdin(const std::string& line)
mon->tags = tags; mon->tags = tags;
} else if (command == "layout") { } else if (command == "layout") {
auto layout = std::string {}; auto layout = std::string {};
stream >> std::ws;
std::getline(stream, layout); std::getline(stream, layout);
mon->bar.setLayout(layout); mon->bar.setLayout(layout);
} }