hyprland-wiki/pages/Plugins/Development/Event-list.md

57 lines
3.8 KiB
Markdown
Raw Normal View History

---
weight: 3
title: Event list
---
2023-04-12 14:21:29 +02:00
2023-04-12 14:25:44 +02:00
These are all the events that can be listened to using Event Hooks.
2023-04-12 14:21:29 +02:00
## Complete list
{{< callout type=info >}}
M: means std::unordered_map<std::string, std::any> following props are members.
{{</ callout >}}
2023-11-30 19:48:26 +01:00
2023-10-21 15:59:42 +02:00
| name | description | argument(s) | cancellable |
| --- | --- | --- | --- |
| tick | fired on a tick, meaning once per (1000 / highestMonitorHz) ms | nullptr | ✕ |
2024-04-27 13:44:12 +02:00
| activeWindow | fired on active window change | PHLWINDOW | ✕ |
2023-10-21 15:59:42 +02:00
| keyboardFocus | fired on keyboard focus change. Contains the newly focused surface | wlr_surface* | ✕ |
2024-04-02 21:32:32 +02:00
| moveWorkspace | fired when a workspace changes its monitor | std::vector<std::any>{CWorkspace*, PHLWORKSPACE} | ✕ |
2023-10-21 15:59:42 +02:00
| focusedMon | fired on monitor focus change | CMonitor* | ✕ |
2024-04-27 13:44:12 +02:00
| moveWindow | fired when a window changes workspace | std::vector<std::any>{PHLWINDOW, PHLWORKSPACE} | ✕ |
2023-10-21 15:59:42 +02:00
| openLayer | fired when a LS is mapped | CLayerSurface* | ✕ |
| closeLayer | fired when a LS is unmapped | CLayerSurface* | ✕ |
2024-04-27 13:44:12 +02:00
| openWindow | fired when a window is mapped | PHLWINDOW | ✕ |
| closeWindow | fired when a window is unmapped | PHLWINDOW | ✕ |
2024-05-02 03:18:41 +02:00
| windowUpdateRules | fired when a window's rules are updated | PHLWINDOW | ✕ |
2024-04-27 13:44:12 +02:00
| urgent | fired when a window requests urgent | PHLWINDOW | ✕ |
| minimize | fired when a window requests a minimize status change. Second param is 1 or 0 | std::vector<std::any>{PHLWINDOW, int64_t} | ✕ |
2023-10-21 15:59:42 +02:00
| monitorAdded | fired when a monitor is plugged in | CMonitor* | ✕ |
| monitorRemoved | fired when a monitor is unplugged | CMonitor* | ✕ |
| createWorkspace | fired when a workspace is created | CWorkspace* | ✕ |
| destroyWorkspace | fired when a workspace is destroyed | CWorkspace* | ✕ |
2024-04-27 13:44:12 +02:00
| fullscreen | fired when a window changes fullscreen state | PHLWINDOW | ✕ |
| changeFloatingMode | fired when a window changes float state | PHLWINDOW | ✕ |
2023-10-21 15:59:42 +02:00
| workspace | fired on a workspace change (only ones explicitly requested by a user) | CWorkspace* | ✕ |
| submap | fired on a submap change | std::string | ✕ |
| mouseMove | fired when the cursor moves. Param is coords. | const Vector2D | ✔ |
| mouseButton | fired on a mouse button press | wlr_pointer_button_event* | ✔ |
2023-11-30 19:48:26 +01:00
| mouseAxis | fired on a mouse axis event | M: `event`:`wlr_pointer_axis_event*` | ✔ |
2023-11-13 17:32:14 +01:00
| touchDown | fired on a touch down event | wlr_touch_down_event* | ✔ |
| touchUp | fired on a touch up event | wlr_touch_up_event* | ✔ |
| touchMove | fired on a touch motion event | wlr_touch_motion_event* | ✔ |
2024-05-05 18:11:23 +02:00
| activeLayout | fired on a keyboard layout change. String pointer temporary, not guaranteed after execution of the handler finishes. | std::vector<std::any>{SP<IKeyboard>, std::string} | ✕ |
2023-10-21 15:59:42 +02:00
| preRender | fired before a frame for a monitor is about to be rendered | CMonitor* | ✕ |
| screencast | fired when the screencopy state of a client changes. Keep in mind there might be multiple separate clients. | std::vector<uint64_t>{state, framesInHalfSecond, owner} | ✕ |
| render | fired at various stages of rendering to allow your plugin to render stuff. See `src/SharedDefs.hpp` for a list with explanations | eRenderStage | ✕ |
2024-04-27 13:44:12 +02:00
| windowtitle | emitted when a window title changes. | PHLWINDOW | ✕ |
2023-10-29 18:10:57 +01:00
| configReloaded | emitted after the config is reloaded | nullptr | ✕ |
2023-11-13 17:32:14 +01:00
| preConfigReload | emitted before a config reload | nullptr | ✕ |
2024-05-05 18:11:47 +02:00
| keyPress | emitted on a key press | M: `event`:`wlr_keyboard_key_event*`, `keyboard`:`SP<IKeyboard>` | ✔ |
2024-04-27 13:44:12 +02:00
| pin | emitted when a window is pinned or unpinned | PHLWINDOW | ✕ |
2024-04-03 20:21:48 +02:00
| swipeBegin | emitted when a touchpad swipe is commenced | `wlr_pointer_swipe_begin_event*` | ✔ |
| swipeUpdate | emitted when a touchpad swipe is updated | `wlr_pointer_swipe_update_event*` | ✔ |
| swipeEnd | emitted when a touchpad swipe is ended | `wlr_pointer_swipe_end_event*` | ✔ |