Add tooltip selection based on name and state
One can set different tooltips for different workspaces. Selection works the same as it does for Icons. Also refactored the `selectIcon` function to a more general `selectString` function. Man page is updated too.
This commit is contained in:
@@ -62,7 +62,7 @@ class Workspace {
|
||||
public:
|
||||
explicit Workspace(const Json::Value& workspace_data, Workspaces& workspace_manager,
|
||||
const Json::Value& clients_data = Json::Value::nullRef);
|
||||
std::string& selectIcon(std::map<std::string, std::string>& icons_map);
|
||||
std::string& selectString(std::map<std::string, std::string>& string_map);
|
||||
Gtk::Button& button() { return m_button; };
|
||||
|
||||
int id() const { return m_id; };
|
||||
@@ -199,7 +199,9 @@ class Workspaces : public AModule, public EventHandler {
|
||||
{"DEFAULT", SortMethod::DEFAULT}};
|
||||
|
||||
std::string m_format;
|
||||
std::string m_tooltipFormat;
|
||||
|
||||
std::map<std::string, std::string> m_tooltipMap;
|
||||
bool m_withTooltip;
|
||||
|
||||
std::map<std::string, std::string> m_iconsMap;
|
||||
util::RegexCollection m_windowRewriteRules;
|
||||
|
||||
Reference in New Issue
Block a user