mirror of
https://github.com/ItsDrike/hyprland-dwindle-autogroup.git
synced 2025-06-28 21:40:42 +00:00
Full rewrite
This commit is contained in:
parent
e5661c4a37
commit
3505d4aa5b
6 changed files with 302 additions and 160 deletions
9
include/func_finder.hpp
Normal file
9
include/func_finder.hpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "globals.hpp"
|
||||
|
||||
/* Find function pointer from the Hyprland binary by it's name and demangledName
|
||||
*
|
||||
* \param[in] name Simple name of the function (i.e. createGroup)
|
||||
* \param[in] demangledName Demangled name of the function (i.e. CWindow::createGroup())
|
||||
* \return Raw pointer to the found function
|
||||
*/
|
||||
void* findHyprlandFunction(const std::string& name, const std::string& demangledName);
|
|
@ -1,5 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <hyprland/src/layout/DwindleLayout.hpp>
|
||||
#include <hyprland/src/plugins/HookSystem.hpp>
|
||||
#include <hyprland/src/plugins/PluginAPI.hpp>
|
||||
|
||||
const CColor s_notifyColor = {0x61 / 255.0f, 0xAF / 255.0f, 0xEF / 255.0f, 1.0f}; // RGBA
|
||||
const PLUGIN_DESCRIPTION_INFO s_pluginDescription = {"dwindle-autogroup", "Dwindle Autogroup", "ItsDrike", "1.0"};
|
||||
|
||||
inline HANDLE PHANDLE = nullptr;
|
||||
|
||||
typedef void* (*createGroupFuncT)(CWindow*);
|
||||
inline CFunctionHook* g_pCreateGroupHook = nullptr;
|
||||
|
||||
typedef void* (*destroyGroupFuncT)(CWindow*);
|
||||
inline CFunctionHook* g_pDestroyGroupHook = nullptr;
|
||||
|
||||
typedef SDwindleNodeData* (*nodeFromWindowFuncT)(void*, CWindow*);
|
||||
inline nodeFromWindowFuncT g_pNodeFromWindow = nullptr;
|
||||
|
|
9
include/plugin.hpp
Normal file
9
include/plugin.hpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "globals.hpp"
|
||||
|
||||
/* New custom function replacing the original CWindow::createGroup function
|
||||
*/
|
||||
void newCreateGroup(CWindow*);
|
||||
|
||||
/* New custom function replacing the original CWindow::createGroup function
|
||||
*/
|
||||
void newDestroyGroup(CWindow*);
|
Loading…
Add table
Add a link
Reference in a new issue