diff options
author | vaxerski <[email protected]> | 2023-03-20 15:23:25 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-03-20 15:23:25 +0000 |
commit | 34da16b7e626be4d96c3098b5265e2c008fb2d65 (patch) | |
tree | cb4b5fc91507c2c93f76468b276f2e69aa7cd847 /example | |
parent | 71a95a581f86a801b1db24a417f41d9a395cab38 (diff) | |
download | Hyprland-34da16b7e626be4d96c3098b5265e2c008fb2d65.tar.gz Hyprland-34da16b7e626be4d96c3098b5265e2c008fb2d65.zip |
plugin api: add addNotificationV2
Allows for issuing fancy notifs via api
Diffstat (limited to 'example')
-rw-r--r-- | example/examplePlugin/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/example/examplePlugin/main.cpp b/example/examplePlugin/main.cpp index 49364f59..6007a58b 100644 --- a/example/examplePlugin/main.cpp +++ b/example/examplePlugin/main.cpp @@ -77,6 +77,9 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { g_pMouseDownHook = HyprlandAPI::createFunctionHook( PHANDLE, HyprlandAPI::getFunctionAddressFromSignature(PHANDLE, "_ZN13CInputManager22processMouseDownNormalEP24wlr_pointer_button_event"), (void*)&hkProcessMouseDownNormal); + // 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}}); + // Enable our hooks g_pFocusHook->hook(); g_pMotionHook->hook(); |