Merge pull request #2979 from grimpy/filterscratch
Filter out special output __i3 which contains scratchpadpull/2983/head
commit
e7c7ef6814
|
@ -107,11 +107,16 @@ void Workspaces::onCmd(const struct Ipc::ipc_response &res) {
|
||||||
auto payload = parser_.parse(res.payload);
|
auto payload = parser_.parse(res.payload);
|
||||||
workspaces_.clear();
|
workspaces_.clear();
|
||||||
std::vector<Json::Value> outputs;
|
std::vector<Json::Value> outputs;
|
||||||
|
bool alloutputs = config_["all-outputs"].asBool();
|
||||||
std::copy_if(payload["nodes"].begin(), payload["nodes"].end(), std::back_inserter(outputs),
|
std::copy_if(payload["nodes"].begin(), payload["nodes"].end(), std::back_inserter(outputs),
|
||||||
[&](const auto &workspace) {
|
[&](const auto &output) {
|
||||||
return !config_["all-outputs"].asBool()
|
if (alloutputs && output["name"].asString() != "__i3") {
|
||||||
? workspace["name"].asString() == bar_.output->name
|
return true;
|
||||||
: true;
|
}
|
||||||
|
if (output["name"].asString() == bar_.output->name) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
for (auto &output : outputs) {
|
for (auto &output : outputs) {
|
||||||
|
|
Loading…
Reference in New Issue