mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 14:48:34 +01:00
An animation that moves a window at one pace all the way looks flat, and the stock Geometry Change has one curve, an exponential ease out. The patched effect reads a Curve setting, the name of one of Qt's easing curves. komorebi's styles are those curves with Ease in front, so the look the backend is asked for names the curve as Qt does, and the effect's settings have it next to the duration. A cubic Bezier, which only a configuration can say, is not one of Qt's curves and is an ease out. With the stock effect every style is that ease out. komorebic gets animation-style, for every animation or the movement of windows alone. vm-features puts two curves a few seconds into a 30 s move of the same window and checks that they are in different places. The animation key of komorebi.json takes a style too, for every kind of animation or for one.
41 lines
1.5 KiB
Nix
41 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
# "Geometry Change" by Peter Fajdiga (GPLv3): animates windows that are moved or resized by programs
|
|
# or scripts, which stock KWin does not. It is a scripted (JS) effect package, so installing it is
|
|
# only a copy into `share/kwin/effects`; kwin discovers it at startup, not afterwards. Its metadata
|
|
# already says `"EnabledByDefault": false`, so KWin does not load it until it is asked for.
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "kwin-effect-geometry-change";
|
|
version = "1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "peterfajdiga";
|
|
repo = "kwin4_effect_geometry_change";
|
|
rev = "398491e8a3f5b9bb785850439abd41820f3c5986";
|
|
hash = "sha256-aJx3hDzIk/bQrrRvs/CPigJ0miTgqxd8OI9I6kuiXkk=";
|
|
};
|
|
|
|
# `Curve`: any of Qt's easing curves by name, which is how komorebi's `animation.style` reaches the
|
|
# effect (it has one fixed curve, an ease out exponential, and no setting for it)
|
|
patches = [ ./kwin-effect-geometry-change/curve.patch ];
|
|
|
|
dontBuild = true;
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/share/kwin/effects/kwin4_effect_geometry_change
|
|
cp -r package/* $out/share/kwin/effects/kwin4_effect_geometry_change/
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "KWin effect that animates windows moved or resized by programs or scripts";
|
|
homepage = "https://github.com/peterfajdiga/kwin4_effect_geometry_change";
|
|
license = lib.licenses.gpl3Only;
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|