mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 16:13:21 +02:00
feat: implemented shaperules
This commit is contained in:
parent
f2793f3bd3
commit
9fd1b6a1c2
13 changed files with 448 additions and 95 deletions
46
src/config/config.hpp
Normal file
46
src/config/config.hpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
|
||||
#include <hyprlang.hpp>
|
||||
#include "ShapeRule.hpp"
|
||||
|
||||
#define NAMESPACE "plugin:dynamic-cursors:"
|
||||
|
||||
#define CONFIG_ENABLED "enabled"
|
||||
#define CONFIG_MODE "mode"
|
||||
#define CONFIG_THRESHOLD "threshold"
|
||||
#define CONFIG_HW_DEBUG "hw_debug"
|
||||
|
||||
#define CONFIG_SHAKE "shake:enabled"
|
||||
#define CONFIG_SHAKE_NEAREST "shake:nearest"
|
||||
#define CONFIG_SHAKE_THRESHOLD "shake:threshold"
|
||||
#define CONFIG_SHAKE_FACTOR "shake:factor"
|
||||
#define CONFIG_SHAKE_EFFECTS "shake:effects"
|
||||
#define CONFIG_SHAKE_IPC "shake:ipc"
|
||||
|
||||
#define CONFIG_ROTATE_LENGTH "rotate:length"
|
||||
#define CONFIG_ROTATE_OFFSET "rotate:offset"
|
||||
|
||||
#define CONFIG_TILT_LIMIT "tilt:limit"
|
||||
#define CONFIG_TILT_FUNCTION "tilt:function"
|
||||
|
||||
#define CONFIG_STRETCH_LIMIT "stretch:limit"
|
||||
#define CONFIG_STRETCH_FUNCTION "stretch:function"
|
||||
|
||||
#define CONFIG_SHAPERULE "shaperule"
|
||||
|
||||
/* initializes stuff so config can be set up */
|
||||
void startConfig();
|
||||
/* finishes config setup */
|
||||
void finishConfig();
|
||||
|
||||
/* add shaperule config entry */
|
||||
void addRulesConfig();
|
||||
|
||||
/* will add an ordinary config value */
|
||||
void addConfig(std::string name, std::variant<std::string, float, int> value);
|
||||
|
||||
/* will add a config variable which is also a property for shape rules */
|
||||
void addShapeConfig(std::string name, std::variant<std::string, float, int> value);
|
||||
|
||||
/* get static pointer to config value */
|
||||
void* const* getConfig(std::string name);
|
Loading…
Add table
Add a link
Reference in a new issue