mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2025-10-29 11:48:42 +00:00
all: chase hyprland (#462)
* hyprexpo: update workspace animation calls * fix: update include path of animation manager
This commit is contained in:
parent
bf843fc6ad
commit
376d08bbbd
72
flake.lock
generated
72
flake.lock
generated
@ -20,11 +20,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751740947,
|
||||
"narHash": "sha256-35040CHH7P3JGmhGVfEb2oJHL/A5mI2IXumhkxrBnao=",
|
||||
"lastModified": 1755946532,
|
||||
"narHash": "sha256-POePremlUY5GyA1zfbtic6XLxDaQcqHN6l+bIxdT5gc=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "dfc1db15a08c4cd234288f66e1199c653495301f",
|
||||
"rev": "81584dae2df6ac79f6b6dae0ecb7705e95129ada",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -36,11 +36,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -87,11 +87,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749155331,
|
||||
"narHash": "sha256-XR9fsI0zwLiFWfqi/pdS/VD+YNorKb3XIykgTg4l1nA=",
|
||||
"lastModified": 1753964049,
|
||||
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "45fcc10b4c282746d93ec406a740c43b48b4ef80",
|
||||
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -116,11 +116,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751808145,
|
||||
"narHash": "sha256-OXgL0XaKMmfX2rRQkt9SkJw+QNfv0jExlySt1D6O72g=",
|
||||
"lastModified": 1755678602,
|
||||
"narHash": "sha256-uEC5O/NIUNs1zmc1aH1+G3GRACbODjk2iS0ET5hXtuk=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"rev": "b841473a0bd4a1a74a0b64f1ec2ab199035c349f",
|
||||
"rev": "157cc52065a104fc3b8fa542ae648b992421d1c7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -145,11 +145,11 @@
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752149340,
|
||||
"narHash": "sha256-DJc2ROpttbP6FHcXwWpmK7EB2cpVsP/LmXjEr8RWcO8=",
|
||||
"lastModified": 1756372920,
|
||||
"narHash": "sha256-kUTDPrbBksfu/xbwyD8NAMUcu/D5jWwiCEfANgxCnG4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "b5433bb75324a95dd27eb5492141565466c2cdd6",
|
||||
"rev": "4b2bfbd85f1ea77a165d9ba92d62016cdf3abfcd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -238,11 +238,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750371812,
|
||||
"narHash": "sha256-D868K1dVEACw17elVxRgXC6hOxY+54wIEjURztDWLk8=",
|
||||
"lastModified": 1753819801,
|
||||
"narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-qtutils",
|
||||
"rev": "b13c7481e37856f322177010bdf75fccacd1adc8",
|
||||
"rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -267,11 +267,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750371198,
|
||||
"narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=",
|
||||
"lastModified": 1753622892,
|
||||
"narHash": "sha256-0K+A+gmOI8IklSg5It1nyRNv0kCNL51duwnhUO/B8JA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b",
|
||||
"rev": "23f0debd2003f17bd65f851cd3f930cff8a8c809",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -292,11 +292,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751888065,
|
||||
"narHash": "sha256-F2SV9WGqgtRsXIdUrl3sRe0wXlQD+kRRZcSfbepjPJY=",
|
||||
"lastModified": 1756117388,
|
||||
"narHash": "sha256-oRDel6pNl/T2tI+nc/USU9ZP9w08dxtl7hiZxa0C/Wc=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "a8229739cf36d159001cfc203871917b83fdf917",
|
||||
"rev": "b2ae3204845f5f2f79b4703b441252d8ad2ecfd0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -317,11 +317,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751881472,
|
||||
"narHash": "sha256-meB0SnXbwIe2trD041MLKEv6R7NZ759QwBcVIhlSBfE=",
|
||||
"lastModified": 1755184602,
|
||||
"narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "8fb426b3e5452fd9169453fd6c10f8c14ca37120",
|
||||
"rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -332,11 +332,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1751792365,
|
||||
"narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=",
|
||||
"lastModified": 1756266583,
|
||||
"narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb",
|
||||
"rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -356,11 +356,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750779888,
|
||||
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
|
||||
"lastModified": 1755960406,
|
||||
"narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
|
||||
"rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -425,11 +425,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751300244,
|
||||
"narHash": "sha256-PFuv1TZVYvQhha0ac53E3YgdtmLShrN0t4T6xqHl0jE=",
|
||||
"lastModified": 1755354946,
|
||||
"narHash": "sha256-zdov5f/GcoLQc9qYIS1dUTqtJMeDqmBmo59PAxze6e4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "6115f3fdcb2c1a57b4a80a69f3c797e47607b90a",
|
||||
"rev": "a10726d6a8d0ef1a0c645378f983b6278c42eaa0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include <hyprland/src/render/Renderer.hpp>
|
||||
#include <hyprland/src/managers/LayoutManager.hpp>
|
||||
#include <hyprland/src/config/ConfigManager.hpp>
|
||||
#include <hyprland/src/managers/AnimationManager.hpp>
|
||||
#include <hyprland/src/managers/animation/AnimationManager.hpp>
|
||||
#include <hyprland/src/protocols/LayerShell.hpp>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
|
||||
@ -126,16 +126,16 @@ static void swipeEnd(void* self, SCallbackInfo& info, std::any param) {
|
||||
g_pOverview->onSwipeEnd();
|
||||
}
|
||||
|
||||
static void onExpoDispatcher(std::string arg) {
|
||||
static SDispatchResult onExpoDispatcher(std::string arg) {
|
||||
|
||||
if (swipeActive)
|
||||
return;
|
||||
return {};
|
||||
if (arg == "select") {
|
||||
if (g_pOverview) {
|
||||
g_pOverview->selectHoveredWorkspace();
|
||||
g_pOverview->close();
|
||||
}
|
||||
return;
|
||||
return {};
|
||||
}
|
||||
if (arg == "toggle") {
|
||||
if (g_pOverview)
|
||||
@ -145,21 +145,22 @@ static void onExpoDispatcher(std::string arg) {
|
||||
g_pOverview = std::make_unique<COverview>(g_pCompositor->m_lastMonitor->m_activeWorkspace);
|
||||
renderingOverview = false;
|
||||
}
|
||||
return;
|
||||
return {};
|
||||
}
|
||||
|
||||
if (arg == "off" || arg == "close" || arg == "disable") {
|
||||
if (g_pOverview)
|
||||
g_pOverview->close();
|
||||
return;
|
||||
return {};
|
||||
}
|
||||
|
||||
if (g_pOverview)
|
||||
return;
|
||||
return {};
|
||||
|
||||
renderingOverview = true;
|
||||
g_pOverview = std::make_unique<COverview>(g_pCompositor->m_lastMonitor->m_activeWorkspace);
|
||||
renderingOverview = false;
|
||||
return {};
|
||||
}
|
||||
|
||||
static void failNotif(const std::string& reason) {
|
||||
@ -219,7 +220,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
|
||||
static auto P3 = HyprlandAPI::registerCallbackDynamic(PHANDLE, "swipeEnd", [](void* self, SCallbackInfo& info, std::any data) { swipeEnd(self, info, data); });
|
||||
static auto P4 = HyprlandAPI::registerCallbackDynamic(PHANDLE, "swipeUpdate", [](void* self, SCallbackInfo& info, std::any data) { swipeUpdate(self, info, data); });
|
||||
|
||||
HyprlandAPI::addDispatcher(PHANDLE, "hyprexpo:expo", onExpoDispatcher);
|
||||
HyprlandAPI::addDispatcherV2(PHANDLE, "hyprexpo:expo", onExpoDispatcher);
|
||||
|
||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprexpo:columns", Hyprlang::INT{3});
|
||||
HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprexpo:gap_size", Hyprlang::INT{5});
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/config/ConfigValue.hpp>
|
||||
#include <hyprland/src/config/ConfigManager.hpp>
|
||||
#include <hyprland/src/managers/AnimationManager.hpp>
|
||||
#include <hyprland/src/managers/animation/AnimationManager.hpp>
|
||||
#include <hyprland/src/managers/animation/DesktopAnimationManager.hpp>
|
||||
#include <hyprland/src/managers/input/InputManager.hpp>
|
||||
#include <hyprland/src/helpers/time/Time.hpp>
|
||||
#undef private
|
||||
@ -156,7 +157,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
|
||||
if (PWORKSPACE) {
|
||||
image.pWorkspace = PWORKSPACE;
|
||||
PMONITOR->m_activeWorkspace = PWORKSPACE;
|
||||
PWORKSPACE->startAnim(true, true, true);
|
||||
g_pDesktopAnimationManager->startAnimation(PWORKSPACE, CDesktopAnimationManager::ANIMATION_TYPE_IN, true, true);
|
||||
PWORKSPACE->m_visible = true;
|
||||
|
||||
if (PWORKSPACE == startedOn)
|
||||
@ -165,7 +166,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
|
||||
g_pHyprRenderer->renderWorkspace(PMONITOR, PWORKSPACE, Time::steadyNow(), monbox);
|
||||
|
||||
PWORKSPACE->m_visible = false;
|
||||
PWORKSPACE->startAnim(false, false, true);
|
||||
g_pDesktopAnimationManager->startAnimation(PWORKSPACE, CDesktopAnimationManager::ANIMATION_TYPE_OUT, false, true);
|
||||
|
||||
if (PWORKSPACE == startedOn)
|
||||
PMONITOR->m_activeSpecialWorkspace.reset();
|
||||
@ -184,7 +185,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
|
||||
PMONITOR->m_activeSpecialWorkspace = openSpecial;
|
||||
PMONITOR->m_activeWorkspace = startedOn;
|
||||
startedOn->m_visible = true;
|
||||
startedOn->startAnim(true, true, true);
|
||||
g_pDesktopAnimationManager->startAnimation(startedOn, CDesktopAnimationManager::ANIMATION_TYPE_IN, true, true);
|
||||
|
||||
// zoom on the current workspace.
|
||||
// const auto& TILE = images[std::clamp(currentid, 0, SIDE_LENGTH * SIDE_LENGTH)];
|
||||
@ -294,7 +295,7 @@ void COverview::redrawID(int id, bool forcelowres) {
|
||||
|
||||
if (PWORKSPACE) {
|
||||
pMonitor->m_activeWorkspace = PWORKSPACE;
|
||||
PWORKSPACE->startAnim(true, true, true);
|
||||
g_pDesktopAnimationManager->startAnimation(PWORKSPACE, CDesktopAnimationManager::ANIMATION_TYPE_IN, true, true);
|
||||
PWORKSPACE->m_visible = true;
|
||||
|
||||
if (PWORKSPACE == startedOn)
|
||||
@ -303,7 +304,7 @@ void COverview::redrawID(int id, bool forcelowres) {
|
||||
g_pHyprRenderer->renderWorkspace(pMonitor.lock(), PWORKSPACE, Time::steadyNow(), monbox);
|
||||
|
||||
PWORKSPACE->m_visible = false;
|
||||
PWORKSPACE->startAnim(false, false, true);
|
||||
g_pDesktopAnimationManager->startAnimation(PWORKSPACE, CDesktopAnimationManager::ANIMATION_TYPE_OUT, false, true);
|
||||
|
||||
if (PWORKSPACE == startedOn)
|
||||
pMonitor->m_activeSpecialWorkspace.reset();
|
||||
@ -316,7 +317,7 @@ void COverview::redrawID(int id, bool forcelowres) {
|
||||
pMonitor->m_activeSpecialWorkspace = openSpecial;
|
||||
pMonitor->m_activeWorkspace = startedOn;
|
||||
startedOn->m_visible = true;
|
||||
startedOn->startAnim(true, true, true);
|
||||
g_pDesktopAnimationManager->startAnimation(startedOn, CDesktopAnimationManager::ANIMATION_TYPE_IN, true, true);
|
||||
|
||||
blockOverviewRendering = false;
|
||||
}
|
||||
@ -389,8 +390,8 @@ void COverview::close() {
|
||||
else
|
||||
g_pKeybindManager->changeworkspace(NEWIDWS->getConfigName());
|
||||
|
||||
pMonitor->m_activeWorkspace->startAnim(true, true, true);
|
||||
OLDWS->startAnim(false, false, true);
|
||||
g_pDesktopAnimationManager->startAnimation(pMonitor->m_activeWorkspace, CDesktopAnimationManager::ANIMATION_TYPE_IN, true, true);
|
||||
g_pDesktopAnimationManager->startAnimation(OLDWS, CDesktopAnimationManager::ANIMATION_TYPE_OUT, false, true);
|
||||
|
||||
startedOn = pMonitor->m_activeWorkspace;
|
||||
}
|
||||
@ -405,7 +406,7 @@ void COverview::onPreRender() {
|
||||
|
||||
void COverview::onWorkspaceChange() {
|
||||
if (valid(startedOn))
|
||||
startedOn->startAnim(false, false, true);
|
||||
g_pDesktopAnimationManager->startAnimation(startedOn, CDesktopAnimationManager::ANIMATION_TYPE_OUT, false, true);
|
||||
else
|
||||
startedOn = pMonitor->m_activeWorkspace;
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/config/ConfigValue.hpp>
|
||||
#include <hyprland/src/helpers/AnimatedVariable.hpp>
|
||||
#include <hyprland/src/managers/AnimationManager.hpp>
|
||||
#include <hyprland/src/managers/animation/AnimationManager.hpp>
|
||||
#include <hyprland/src/managers/eventLoop/EventLoopManager.hpp>
|
||||
#include <hyprland/src/managers/LayoutManager.hpp>
|
||||
#include <hyprland/src/config/ConfigManager.hpp>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user