feat(niri/worspaces): add ignore-workspaces configuration option

This commit is contained in:
Thomas Crha
2025-10-09 18:03:24 +11:00
parent 559079e9a6
commit e1d4967d8e
3 changed files with 47 additions and 0 deletions
+5
View File
@@ -2,6 +2,8 @@
#include <gtkmm/button.h>
#include <json/value.h>
#include <regex>
#include <vector>
#include "AModule.hpp"
#include "bar.hpp"
@@ -20,11 +22,14 @@ class Workspaces : public AModule, public EventHandler {
void doUpdate();
Gtk::Button &addButton(const Json::Value &ws);
std::string getIcon(const std::string &value, const Json::Value &ws);
bool isWorkspaceIgnored(const std::string &name);
const Bar &bar_;
Gtk::Box box_;
// Map from niri workspace id to button.
std::unordered_map<uint64_t, Gtk::Button> buttons_;
// Vec of regex rules to ignore workspaces.
std::vector<std::regex> ignoreWorkspaces_;
};
} // namespace waybar::modules::niri