Add new monitor added/removed events (#875)

* feat: add new monitor added/removed events

* fix: move cmonitor* to phlmonitor
This commit is contained in:
Alessio Molinari 2024-11-17 21:49:57 +01:00 committed by GitHub
parent 7fc01c1d48
commit 4e89688c75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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` | ✕ | | tick | fired on a tick, meaning once per (1000 / highestMonitorHz) ms | `nullptr` | ✕ |
| activeWindow | fired on active window change | `PHLWINDOW` | ✕ | | activeWindow | fired on active window change | `PHLWINDOW` | ✕ |
| keyboardFocus | fired on keyboard focus change. Contains the newly focused surface | `SP<CWLSurfaceResource>` | ✕ | | keyboardFocus | fired on keyboard focus change. Contains the newly focused surface | `SP<CWLSurfaceResource>` | ✕ |
| moveWorkspace | fired when a workspace changes its monitor | `std::vector<std::any>{PHLWORKSPACE, CMonitor*}` | ✕ | | moveWorkspace | fired when a workspace changes its monitor | `std::vector<std::any>{PHLWORKSPACE, PHLMONITOR}` | ✕ |
| focusedMon | fired on monitor focus change | CMonitor* | ✕ | | focusedMon | fired on monitor focus change | PHLMONITOR | ✕ |
| moveWindow | fired when a window changes workspace | `std::vector<std::any>{PHLWINDOW, PHLWORKSPACE}` | ✕ | | moveWindow | fired when a window changes workspace | `std::vector<std::any>{PHLWINDOW, PHLWORKSPACE}` | ✕ |
| openLayer | fired when a LS is mapped | `PHLLS` | ✕ | | openLayer | fired when a LS is mapped | `PHLLS` | ✕ |
| closeLayer | fired when a LS is unmapped | `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` | ✕ | | closeWindow | fired when a window is unmapped | `PHLWINDOW` | ✕ |
| windowUpdateRules | fired when a window's rules are updated | `PHLWINDOW` | ✕ | | windowUpdateRules | fired when a window's rules are updated | `PHLWINDOW` | ✕ |
| urgent | fired when a window requests urgent | `PHLWINDOW` | ✕ | | urgent | fired when a window requests urgent | `PHLWINDOW` | ✕ |
| monitorAdded | fired when a monitor is plugged in | `CMonitor*` | ✕ | | preMonitorAdded | fired when a monitor is plugged in, before Hyprland handles it | `PHLMONITOR` | ✕ |
| monitorRemoved | fired when a monitor is unplugged | `CMonitor*` | ✕ | | 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` | ✕ | | createWorkspace | fired when a workspace is created | `PHLWORKSPACE` | ✕ |
| destroyWorkspace | fired when a workspace is destroyed | `PHLWORKSPACE` | ✕ | | destroyWorkspace | fired when a workspace is destroyed | `PHLWORKSPACE` | ✕ |
| fullscreen | fired when a window changes fullscreen state | `PHLWINDOW` | ✕ | | 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` | ✔ | | touchUp | fired on a touch up event | `ITouch::SUpEvent` | ✔ |
| touchMove | fired on a touch motion event | `ITouch::SMotionEvent` | ✔ | | 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<std::any>{SP<IKeyboard>, std::string}` | ✕ | | 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}` | ✕ |
| 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<uint64_t>{state, framesInHalfSecond, owner}` | ✕ | | 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` | ✕ | | 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` | ✕ | | windowtitle | emitted when a window title changes. | `PHLWINDOW` | ✕ |