aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/examplePlugin/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'example/examplePlugin/main.cpp')
-rw-r--r--example/examplePlugin/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/example/examplePlugin/main.cpp b/example/examplePlugin/main.cpp
index 589c99c0..560af387 100644
--- a/example/examplePlugin/main.cpp
+++ b/example/examplePlugin/main.cpp
@@ -77,8 +77,12 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
static const auto METHODS = HyprlandAPI::findFunctionsByName(PHANDLE, "processMouseDownNormal");
g_pMouseDownHook = HyprlandAPI::createFunctionHook(PHANDLE, METHODS[0].address, (void*)&hkProcessMouseDownNormal);
+ static auto* const PBORDERCOLOR = HyprlandAPI::getConfigValue(PHANDLE, "plugin:example:border_color");
+
// fancy notifications
- HyprlandAPI::addNotificationV2(PHANDLE, {{"text", "Example hint"}, {"time", (uint64_t)10000}, {"color", CColor(0.2, 0.2, 0.9, 1.0)}, {"icon", ICON_HINT}});
+ HyprlandAPI::addNotificationV2(
+ PHANDLE,
+ {{"text", "Example hint, color " + std::to_string(PBORDERCOLOR->intValue)}, {"time", (uint64_t)10000}, {"color", CColor{PBORDERCOLOR->intValue}}, {"icon", ICON_HINT}});
// Enable our hooks
g_pFocusHook->hook();