adding a new keyword 'on-click-copy' that accepts a bool and copies to clipboard on true'

This commit is contained in:
Skyfrei
2026-03-24 20:12:30 +01:00
parent be2ad4a858
commit fff1495efb
4 changed files with 14 additions and 5 deletions
+1
View File
@@ -26,6 +26,7 @@ class ALabel : public AModule {
std::string default_format_;
bool handleToggle(GdkEventButton* const& e) override;
void copyToClipboard(const std::string&);
virtual std::string getState(uint8_t value, bool lesser = false);
std::map<std::string, GtkMenuItem*> submenus_;
+2 -1
View File
@@ -78,7 +78,8 @@ class AModule : public IModule {
{std::make_pair(9, GdkEventType::GDK_BUTTON_PRESS), "on-click-forward"},
{std::make_pair(9, GdkEventType::GDK_BUTTON_RELEASE), "on-click-forward-release"},
{std::make_pair(9, GdkEventType::GDK_2BUTTON_PRESS), "on-double-click-forward"},
{std::make_pair(9, GdkEventType::GDK_3BUTTON_PRESS), "on-triple-click-forward"}};
{std::make_pair(9, GdkEventType::GDK_3BUTTON_PRESS), "on-triple-click-forward"},
{std::make_pair(10, GdkEventType::GDK_BUTTON_PRESS), "on-click-copy"}};
};
} // namespace waybar