From 4e89688c755e3e428d6018191fbe6d4e5a6addcb Mon Sep 17 00:00:00 2001 From: Alessio Molinari Date: Sun, 17 Nov 2024 21:49:57 +0100 Subject: [PATCH] Add new monitor added/removed events (#875) * feat: add new monitor added/removed events * fix: move cmonitor* to phlmonitor --- pages/Plugins/Development/Event-list.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/Plugins/Development/Event-list.md b/pages/Plugins/Development/Event-list.md index 592ec051..79af73d2 100644 --- a/pages/Plugins/Development/Event-list.md +++ b/pages/Plugins/Development/Event-list.md @@ -18,8 +18,8 @@ These are all the events that can be listened to using Event Hooks. | tick | fired on a tick, meaning once per (1000 / highestMonitorHz) ms | `nullptr` | ✕ | | activeWindow | fired on active window change | `PHLWINDOW` | ✕ | | keyboardFocus | fired on keyboard focus change. Contains the newly focused surface | `SP` | ✕ | -| moveWorkspace | fired when a workspace changes its monitor | `std::vector{PHLWORKSPACE, CMonitor*}` | ✕ | -| focusedMon | fired on monitor focus change | CMonitor* | ✕ | +| moveWorkspace | fired when a workspace changes its monitor | `std::vector{PHLWORKSPACE, PHLMONITOR}` | ✕ | +| focusedMon | fired on monitor focus change | PHLMONITOR | ✕ | | moveWindow | fired when a window changes workspace | `std::vector{PHLWINDOW, PHLWORKSPACE}` | ✕ | | openLayer | fired when a LS is mapped | `PHLLS` | ✕ | | closeLayer | fired when a LS is unmapped | `PHLLS` | ✕ | @@ -27,8 +27,10 @@ These are all the events that can be listened to using Event Hooks. | closeWindow | fired when a window is unmapped | `PHLWINDOW` | ✕ | | windowUpdateRules | fired when a window's rules are updated | `PHLWINDOW` | ✕ | | urgent | fired when a window requests urgent | `PHLWINDOW` | ✕ | -| monitorAdded | fired when a monitor is plugged in | `CMonitor*` | ✕ | -| monitorRemoved | fired when a monitor is unplugged | `CMonitor*` | ✕ | +| preMonitorAdded | fired when a monitor is plugged in, before Hyprland handles it | `PHLMONITOR` | ✕ | +| monitorAdded | fired when a monitor is plugged in, after Hyprland has handled it | `PHLMONITOR` | ✕ | +| preMonitorRemoved | fired when a monitor is unplugged, before Hyprland handles it | `PHLMONITOR` | ✕ | +| monitorRemoved | fired when a monitor is unplugged, after Hypralnd has handled it | `PHLMONITOR` | ✕ | | createWorkspace | fired when a workspace is created | `PHLWORKSPACE` | ✕ | | destroyWorkspace | fired when a workspace is destroyed | `PHLWORKSPACE` | ✕ | | fullscreen | fired when a window changes fullscreen state | `PHLWINDOW` | ✕ | @@ -42,7 +44,7 @@ These are all the events that can be listened to using Event Hooks. | touchUp | fired on a touch up event | `ITouch::SUpEvent` | ✔ | | touchMove | fired on a touch motion event | `ITouch::SMotionEvent` | ✔ | | activeLayout | fired on a keyboard layout change. String pointer temporary, not guaranteed after execution of the handler finishes. | `std::vector{SP, std::string}` | ✕ | -| preRender | fired before a frame for a monitor is about to be rendered | `CMonitor*` | ✕ | +| preRender | fired before a frame for a monitor is about to be rendered | `PHLMONITOR` | ✕ | | screencast | fired when the screencopy state of a client changes. Keep in mind there might be multiple separate clients. | `std::vector{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` | ✕ | | windowtitle | emitted when a window title changes. | `PHLWINDOW` | ✕ |