feat: add dispatcher to trigger magnification

closes: #51
This commit is contained in:
Virt 2025-01-10 22:06:23 +01:00
commit 94eaf75d09
8 changed files with 80 additions and 2 deletions

View file

@ -1,4 +1,5 @@
#include "helpers/AnimatedVariable.hpp"
#include <bits/getopt_ext.h>
#include <hyprutils/animation/AnimatedVariable.hpp>
#include <hyprutils/math/Vector2D.hpp>
#include <vector>
@ -20,6 +21,9 @@ class CShake {
/* called when a cursor warp has happened (to avoid magnifying on warps) */
void warp(Vector2D old, Vector2D pos);
/* force magnification regardless of speed now */
void force(std::optional<int> duration, std::optional<float> size);
private:
/* tracks whether the current shake has already been announced in the ipc */
bool ipc = false;