diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 623f587..b355463 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -18,10 +18,6 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- - name: Download Clang-Format
- run: |
- sudo apt update -qq
- sudo apt install clang-format -qq
- name: Run Clang-Format
run: scripts/clang-format.sh
- name: Compare Results
@@ -93,7 +89,6 @@ jobs:
- "39"
- "40"
- "41"
- - "rawhide"
session:
- "gnome-xsession"
steps:
diff --git a/.gitignore b/.gitignore
index 205225b..4e46477 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,5 @@
/resources/burn-my-windows.gresource
/resources/burn-my-windows.gresource.xml
kwin/_build
-kwin/*.tar.gz
\ No newline at end of file
+kwin/*.tar.gz
+notes.md
diff --git a/README.md b/README.md
index f7e5ee9..aa57b2c 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@ This extension is not only more useless than the cube, but it is also much more
| Effect | Preview |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| **Apparition** This effect hides your windows by violently sucking them into the void of magic! | |
+| **Aura Glow** A radiant edge-lit animation | |
| **Broken Glass** Shatter your windows into a shower sharp shards! This effect can be configured so that the shards fly away from your mouse pointer position! | |
| **Doom** Melt your windows. Inspired by the legendary screen transitions of the original Doom. | |
| **Energize A** Beam your windows away! | |
@@ -41,12 +42,15 @@ This extension is not only more useless than the cube, but it is also much more
| **Hexagon** With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi. | |
| **Incinerate** A less snappy but definitely more fancy take on the fire effect. | |
| **Matrix** Turn your windows into a shower of green letters! The color is actually configurable. | |
+| **Mushroom** Inspired by your favorite italian plumber! | |
| **Paint Brush** Paint or erase your windows with a thick paint brush. | |
| **Pixelate** Pixelate your windows and randomly hide pixels until the entire window is gone. | |
| **Pixel Wheel** This simple effect pixelates the window and hides the pixels in a wheel-like fashion. | |
| **Pixel Wipe** This effect pixelates the window and hides the pixels radially, starting from the pointer position. | |
| **Portal** This ridiculous effect teleports your windows from and to alternative dimensions. It may resemble the portal from a well-known cartoon series... | |
+| **RGB Warp** Red Blue and Green go bye bye. | |
| **Snap of Disintegration** Dissolve your windows into a cloud of dust. | |
+| **TeamRocket** ... is blasting off again! | |
| **T-Rex Attack** Destroy your windows with a series of violent slashes! | |
| **TV Effect** This is a very simple effect to demonstrate that this extension could also be used in a more professional environment. | |
| **TV Glitch** This effect combines the Glitch and the TV Effect. | |
@@ -61,32 +65,36 @@ Below is a table which summarizes the current availability for all effects.
-
GNOME
+
GNOME
KWin
-
3.36
3.38
40+
5.25.0+
-
Apparition
✅
✅
-
Broken Glass
✅
-
Doom
✅
✅
✅
-
Energize A
✅
✅
✅
✅
-
Energize B
✅
✅
✅
✅
-
Fire
✅
✅
✅
✅
-
Focus
✅
✅
✅
✅
-
Glide
✅
✅
✅
✅
-
Glitch
✅
✅
✅
✅
-
Hexagon
✅
✅
✅
✅
-
Incinerate
✅
✅
✅
✅
-
Matrix
✅
-
Paint Brush
✅
-
Pixelate
✅
✅
✅
✅
-
Pixel Wheel
✅
✅
✅
✅
-
Pixel Wipe
✅
✅
✅
✅
-
Portal
✅
✅
✅
✅
-
Snap of Disintegration
✅
-
T-Rex Attack
✅
-
TV Effect
✅
✅
✅
✅
-
TV Glitch
✅
✅
✅
✅
-
Wisps
✅
✅
✅
✅
+
3.36
3.38
40-44
45+
5.25.0+
+
Apparition
✅
✅
✅
+
Aura Glow
✅
+
Broken Glass
✅
✅
+
Doom
✅
✅
✅
✅
+
Energize A
✅
✅
✅
✅
✅
+
Energize B
✅
✅
✅
✅
✅
+
Fire
✅
✅
✅
✅
✅
+
Focus
✅
✅
+
Glide
✅
✅
✅
✅
✅
+
Glitch
✅
✅
✅
✅
✅
+
Hexagon
✅
✅
✅
✅
✅
+
Incinerate
✅
✅
✅
✅
✅
+
Matrix
✅
✅
+
Mushroom
✅
+
Paint Brush
✅
✅
+
Pixelate
✅
✅
✅
✅
✅
+
Pixel Wheel
✅
✅
✅
✅
✅
+
Pixel Wipe
✅
✅
✅
✅
✅
+
Portal
✅
✅
✅
✅
✅
+
RGB Warp
✅
+
Snap of Disintegration
✅
✅
+
TeamRocket
✅
+
T-Rex Attack
✅
✅
+
TV Effect
✅
✅
✅
✅
✅
+
TV Glitch
✅
✅
✅
✅
✅
+
Wisps
✅
✅
✅
✅
✅
## 💞 Show that you love Burn-My-Windows!
diff --git a/docs/changelog.md b/docs/changelog.md
index 9cc9e12..b3c3844 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -9,8 +9,16 @@ SPDX-License-Identifier: CC-BY-4.0
**Release Date:** TBD
+#### New Features
+
+- **New Effect: Aura Glow!** This effect adds a glowing aura to your windows. Thanks to [@jgarza9788](https://github.com/jgarza9788) for this contribution!
+- **New Effect: Mushroom!** This overly ridiculous effect is inspired by the animation of Super Mario when he eats a mushroom. Thanks again to [@jgarza9788](https://github.com/jgarza9788) for this contribution!
+- **New Effect: RGB Warp!** This effect warps the colors of your windows separating the color channels. Thanks once more to [@jgarza9788](https://github.com/jgarza9788) for this contribution!
+- **New Effect: Team Rocket!** Do you remember what happened when Team Rocket failed again? Thanks the fourth time to [@jgarza9788](https://github.com/jgarza9788) for this contribution!
+
#### Other Changes
+- If after filtering the effects in the preferences dialog only one effect is left, the effect's settings are shown immediately.
- The fire of the Incinerate effect now propagates circularly. This makes the effect look more natural as it does not mimic the window's aspect ratio anymore. Thanks to [@rcmz](https://github.com/rcmz) for this contribution!
## [Burn My Windows 44](https://github.com/schneegans/Burn-My-Windows/releases/tag/v44)
diff --git a/docs/how-to-create-new-effects.md b/docs/how-to-create-new-effects.md
index 2a49b23..bab6f7d 100644
--- a/docs/how-to-create-new-effects.md
+++ b/docs/how-to-create-new-effects.md
@@ -394,3 +394,39 @@ make install && pkill -f '.Extensions' && sleep 2 ; gnome-extensions prefs burn-
That's it!
If you have any questions, feel free to [ask them on the discussions board](https://github.com/Schneegans/Burn-My-Windows/discussions).
If you are happy with your effect, submit a pull request, and it may get included in the next version!
+
+
+## Install Dependencies (if needed)
+the list below might not be 100% correct, please pull request if changes need to be made
+
+### **Ubuntu**
+```bash
+sudo apt install make gettext libglib2.0-dev-bin clang-format
+```
+
+### **Fedora/RHEL**
+```bash
+sudo dnf install make gettext glib2-devel clang-format
+```
+
+### **Arch Linux**
+```bash
+sudo pacman -S base-devel gettext glib2 clang-format
+```
+
+### **openSUSE**
+```bash
+sudo zypper install make gettext-tools glib2-devel clang-format
+```
+
+### **Alpine Linux**
+For minimal distributions like Alpine:
+```bash
+sudo apk add build-base gettext-dev glib-dev clang-format
+```
+
+### **Gentoo**
+```bash
+sudo emerge --ask sys-devel/make sys-devel/gettext dev-libs/glib clang-format
+```
+
diff --git a/docs/pics/README.md b/docs/pics/README.md
index 3c7f422..1a13876 100644
--- a/docs/pics/README.md
+++ b/docs/pics/README.md
@@ -4,4 +4,13 @@ The preview GIFs are recorded with OBS Studio at 1920x1080, cut to a length of e
```bash
gifski --fps 30 -W 320 -H 180 -o effect.gif effect.mp4
-```
\ No newline at end of file
+```
+
+# gif Info
+GIF length: 2 second(s)
+GIF width/height: 320×180 pixels
+number of frames: 60
+number of colors: 256
+loop count: 0 (endless)
+
+The animation should starts 1s into the gif.
diff --git a/docs/pics/aura-glow.gif b/docs/pics/aura-glow.gif
new file mode 100644
index 0000000..accc912
Binary files /dev/null and b/docs/pics/aura-glow.gif differ
diff --git a/docs/pics/mushroom.gif b/docs/pics/mushroom.gif
new file mode 100644
index 0000000..84fc762
Binary files /dev/null and b/docs/pics/mushroom.gif differ
diff --git a/docs/pics/rgbwarp.gif b/docs/pics/rgbwarp.gif
new file mode 100644
index 0000000..610962e
Binary files /dev/null and b/docs/pics/rgbwarp.gif differ
diff --git a/docs/pics/teamrocket.gif b/docs/pics/teamrocket.gif
new file mode 100644
index 0000000..a9c3a2e
Binary files /dev/null and b/docs/pics/teamrocket.gif differ
diff --git a/extension.js b/extension.js
index cdc3ef6..cff39d8 100644
--- a/extension.js
+++ b/extension.js
@@ -23,6 +23,7 @@ import {WindowPicker} from './src/WindowPicker.js';
import * as utils from './src/utils.js';
import Apparition from './src/effects/Apparition.js';
+import AuraGlow from './src/effects/AuraGlow.js';
import BrokenGlass from './src/effects/BrokenGlass.js';
import Doom from './src/effects/Doom.js';
import EnergizeA from './src/effects/EnergizeA.js';
@@ -34,18 +35,20 @@ import Glitch from './src/effects/Glitch.js';
import Hexagon from './src/effects/Hexagon.js';
import Incinerate from './src/effects/Incinerate.js';
import Matrix from './src/effects/Matrix.js';
+import Mushroom from './src/effects/Mushroom.js';
import PaintBrush from './src/effects/PaintBrush.js';
import Pixelate from './src/effects/Pixelate.js';
import PixelWheel from './src/effects/PixelWheel.js';
import PixelWipe from './src/effects/PixelWipe.js';
import Portal from './src/effects/Portal.js';
+import RGBWarp from './src/effects/RGBWarp.js';
import SnapOfDisintegration from './src/effects/SnapOfDisintegration.js';
+import TeamRocket from './src/effects/TeamRocket.js';
import TRexAttack from './src/effects/TRexAttack.js';
import TVEffect from './src/effects/TVEffect.js';
import TVGlitch from './src/effects/TVGlitch.js';
import Wisps from './src/effects/Wisps.js';
-
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import {Workspace} from 'resource:///org/gnome/shell/ui/workspace.js';
import {WindowPreview} from 'resource:///org/gnome/shell/ui/windowPreview.js';
@@ -71,14 +74,13 @@ export default class BurnMyWindows extends Extension {
// New effects must be registered here and in prefs.js.
this._ALL_EFFECTS = [
- new Apparition(), new BrokenGlass(), new Doom(),
- new EnergizeA(), new EnergizeB(), new Fire(),
- new Focus(), new Glide(), new Glitch(),
- new Hexagon(), new Incinerate(), new Matrix(),
- new PaintBrush(), new Pixelate(), new PixelWheel(),
- new PixelWipe(), new Portal(), new SnapOfDisintegration(),
- new TRexAttack(), new TVEffect(), new TVGlitch(),
- new Wisps(),
+ new Apparition(), new AuraGlow(), new BrokenGlass(), new Doom(),
+ new EnergizeA(), new EnergizeB(), new Fire(), new Focus(),
+ new Glide(), new Glitch(), new Hexagon(), new Incinerate(),
+ new Matrix(), new PaintBrush(), new Pixelate(), new PixelWheel(),
+ new PixelWipe(), new Portal(), new RGBWarp(), new SnapOfDisintegration(),
+ new TeamRocket(), new TRexAttack(), new TVEffect(), new TVGlitch(),
+ new Wisps(), new Mushroom()
];
// Load all of our resources.
diff --git a/metadata.json b/metadata.json
index 9053a09..db6b0cf 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,19 +1,15 @@
{
- "uuid": "burn-my-windows@schneegans.github.com",
- "description": "Disintegrate your windows with style.",
- "name": "Burn My Windows",
- "donations": {
- "kofi": "schneegans",
- "github": "schneegans",
- "paypal": "simonschneegans"
- },
- "gettext-domain": "burn-my-windows",
- "settings-schema": "org.gnome.shell.extensions.burn-my-windows",
- "shell-version": [
- "45",
- "46",
- "47"
- ],
- "url": "https://github.com/Schneegans/Burn-My-Windows",
- "version": 45
-}
\ No newline at end of file
+ "uuid": "burn-my-windows@schneegans.github.com",
+ "description": "Disintegrate your windows with style.",
+ "name": "Burn My Windows",
+ "donations": {
+ "kofi": "schneegans",
+ "github": "schneegans",
+ "paypal": "simonschneegans"
+ },
+ "gettext-domain": "burn-my-windows",
+ "settings-schema": "org.gnome.shell.extensions.burn-my-windows",
+ "shell-version": ["45", "46", "47"],
+ "url": "https://github.com/Schneegans/Burn-My-Windows",
+ "version": 45
+}
diff --git a/prefs.js b/prefs.js
index 04b2413..8476964 100644
--- a/prefs.js
+++ b/prefs.js
@@ -24,6 +24,7 @@ import * as utils from './src/utils.js';
import {ProfileManager} from './src/ProfileManager.js';
import Apparition from './src/effects/Apparition.js';
+import AuraGlow from './src/effects/AuraGlow.js';
import BrokenGlass from './src/effects/BrokenGlass.js';
import Doom from './src/effects/Doom.js';
import EnergizeA from './src/effects/EnergizeA.js';
@@ -35,12 +36,15 @@ import Glitch from './src/effects/Glitch.js';
import Hexagon from './src/effects/Hexagon.js';
import Incinerate from './src/effects/Incinerate.js';
import Matrix from './src/effects/Matrix.js';
+import Mushroom from './src/effects/Mushroom.js';
import PaintBrush from './src/effects/PaintBrush.js';
import Pixelate from './src/effects/Pixelate.js';
import PixelWheel from './src/effects/PixelWheel.js';
import PixelWipe from './src/effects/PixelWipe.js';
import Portal from './src/effects/Portal.js';
+import RGBWarp from './src/effects/RGBWarp.js';
import SnapOfDisintegration from './src/effects/SnapOfDisintegration.js';
+import TeamRocket from './src/effects/TeamRocket.js';
import TRexAttack from './src/effects/TRexAttack.js';
import TVEffect from './src/effects/TVEffect.js';
import TVGlitch from './src/effects/TVGlitch.js';
@@ -71,10 +75,15 @@ export default class BurnMyWindowsPreferences extends ExtensionPreferences {
// New effects must be registered here and in extension.js.
this._ALL_EFFECTS = [
- Apparition, BrokenGlass, Doom, EnergizeA, EnergizeB, Fire,
- Focus, Glide, Glitch, Hexagon, Incinerate, Matrix,
- PaintBrush, Pixelate, PixelWheel, PixelWipe, Portal, SnapOfDisintegration,
- TRexAttack, TVEffect, TVGlitch, Wisps,
+ Apparition, AuraGlow, BrokenGlass,
+ Doom, EnergizeA, EnergizeB,
+ Fire, Focus, Glide,
+ Glitch, Hexagon, Incinerate,
+ Matrix, Mushroom, PaintBrush,
+ Pixelate, PixelWheel, PixelWipe,
+ Portal, RGBWarp, SnapOfDisintegration,
+ TeamRocket, TRexAttack, TVEffect,
+ TVGlitch, Wisps,
];
@@ -183,22 +192,33 @@ export default class BurnMyWindowsPreferences extends ExtensionPreferences {
this._searchEntry.connect('search-changed', () => {
const query = this._searchEntry.get_text().toLowerCase();
- this._effectRows.forEach(er => {
+ // If only one effect is left, we will expand it automatically.
+ let lastRow = null;
+ let numRows = 0;
+
+ this._effectRows.forEach(row => {
+ row.set_expanded(false);
+
if (query === '') {
- er.show(); // Show all effects if query is empty
+ row.show(); // Show all effects if query is empty
} else {
// Show or hide each effect based on query match
- const showEffect = er.name.toLowerCase().includes(query);
- showEffect ? er.show() : er.hide();
+ const showEffect = row.name.toLowerCase().includes(query);
- // TODO
- // maybe add a fuzzy search later
- /*
- const showEffect = utils.fuzzyMatch(er.name.toLowerCase(),
- query.toLowerCase()); showEffect ? er.show() : er.hide();
- */
+ if (showEffect) {
+ row.show();
+ lastRow = row;
+ numRows++;
+ } else {
+ row.hide();
+ }
}
});
+
+ // If only one effect is left, we expand it automatically.
+ if (numRows === 1) {
+ lastRow.set_expanded(true);
+ }
});
// Then add a preferences group for the effect expander rows.
diff --git a/resources/shaders/aura-glow.frag b/resources/shaders/aura-glow.frag
new file mode 100644
index 0000000..6c9d4bb
--- /dev/null
+++ b/resources/shaders/aura-glow.frag
@@ -0,0 +1,117 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza
+// SPDX-FileCopyrightText: Simon Schneegans
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// The content from common.glsl is automatically prepended to each shader effect. This
+// provides the standard input:
+
+// vec2 iTexCoord: Texture coordinates for retrieving the window input color.
+// bool uIsFullscreen: True if the window is maximized or in fullscreen mode.
+// bool uForOpening: True if a window-open animation is ongoing, false otherwise.
+// float uProgress: A value which transitions from 0 to 1 during the animation.
+// float uDuration: The duration of the current animation in seconds.
+// vec2 uSize: The size of uTexture in pixels.
+// float uPadding: The empty area around the actual window (e.g. where the shadow
+// is drawn). For now, this will only be set on GNOME.
+
+// Furthermore, there are two global methods for reading the window input color and
+// setting the shader output color. Both methods assume straight alpha:
+
+// vec4 getInputColor(vec2 coords)
+// void setOutputColor(vec4 outColor)
+
+uniform float uColorSpeed;
+uniform bool uRandomColorOffset;
+uniform float uColorOffset;
+uniform float uColorSaturation;
+uniform float uBlur;
+uniform vec2 uSeed;
+uniform float uEdgeSize;
+uniform float uEdgeHardness;
+
+void main() {
+
+ // We simply inverse the progress for opening windows.
+ float progress = uForOpening ? uProgress : 1.0 - uProgress;
+
+ // Map UV to window content (without the shadow padding).
+ vec2 uv = (iTexCoord.st - 0.5) * uSize / (vec2(1.0) - vec2(uPadding * 2.0) / uSize);
+ uv = uv / uSize + 0.5;
+
+ // We want the shapes of the masks at the end of the animation to have a 1:1 aspect
+ // ratio. For this, we scale the UV coordinates based on the aspect ratio of the window
+ // and later blend between the original UV and the 1:1 UV based on the progress.
+ vec2 oneToOneUV = uv;
+ oneToOneUV -= 0.5;
+
+ if (uSize.x > uSize.y) {
+ oneToOneUV.y *= uSize.y / uSize.x;
+ } else {
+ oneToOneUV.x *= uSize.x / uSize.y;
+ }
+
+ oneToOneUV += 0.5;
+
+ uv = mix(oneToOneUV, uv, progress);
+
+ // This blends between a square-shaped gradient towards the window edges and a circular
+ // gradient.
+ float shape = mix(2.0, 100.0, pow(progress, 5.0));
+ float gradient = pow(abs(uv.x - 0.5) * 2.0, shape) + pow(abs(uv.y - 0.5) * 2.0, shape);
+ gradient += simplex2D((iTexCoord + uSeed)) * 0.5;
+
+ // This mask is used for the color overlay.
+ float glowMask = (progress - gradient) / mix(uEdgeSize, 0.5, progress);
+ glowMask = 1.0 - clamp(glowMask - progress, 0.0, 1.0);
+
+ // Quickly fade out the glow mask at the end of the animation.
+ glowMask *= easeOutSine(min(1.0, (1.0 - progress) * 4.0));
+
+ // Get the color from the window texture. We gradually blur the input color based on
+ // the progress of the animation. We also slightly scale the UV coordinates to make
+ // the window scale up during the animation.
+ vec2 windowUV = (iTexCoord.st - 0.5) * mix(1.1, 1.0, easeOutCubic(progress)) + 0.5;
+ vec4 windowColor;
+ if (uBlur > 0.0) {
+ windowColor = getBlurredInputColor(windowUV, (1.0 - progress) * uBlur, 3.0);
+ } else {
+ windowColor = getInputColor(windowUV);
+ }
+ glowMask *= windowColor.a;
+
+ vec3 glowColor = cos(progress * uColorSpeed + uv.xyx + vec3(0, 2, 4)).xyz;
+ float colorOffset = (uRandomColorOffset) ? hash12(uSeed) : uColorOffset;
+ glowColor = offsetHue(glowColor, colorOffset + 0.1);
+ glowColor = clamp(glowColor * uColorSaturation, vec3(0.0), vec3(1.0));
+
+ windowColor.rgb += glowColor * glowMask;
+
+ // To make this look better on light themes, we also add some color non-additively.
+ windowColor = alphaOver(windowColor, vec4(glowColor, glowMask * 0.2));
+
+ // A mask which will crop the window gradually into a circle.
+ float softCrop = 1.0 - smoothstep(progress - 0.5, progress + 0.5, gradient);
+ float hardCrop = 1.0 - smoothstep(progress - 0.05, progress + 0.05, gradient);
+ float cropMask = mix(softCrop, hardCrop, uEdgeHardness);
+
+ // Quickly fade in the alpha mask at the beginning of the animation.
+ cropMask *= easeInSine(min(1.0, progress * 2.0));
+
+ // Quickly fade out the alpha mask at the end of the animation.
+ cropMask = max(cropMask, 1.0 - easeOutSine(min(1.0, (1.0 - progress) * 4.0)));
+
+ windowColor.a *= cropMask;
+
+ setOutputColor(windowColor);
+}
\ No newline at end of file
diff --git a/resources/shaders/common.glsl b/resources/shaders/common.glsl
index 73cf20c..8f112b4 100644
--- a/resources/shaders/common.glsl
+++ b/resources/shaders/common.glsl
@@ -153,6 +153,35 @@ void setOutputColor(vec4 outColor) { cogl_color_out = outColor; }
#endif // -------------------------------------------------------------------------------
+// A simple blur function
+vec4 getBlurredInputColor(vec2 uv, float radius, float samples) {
+ // Initialize the color accumulator to zero.
+ vec4 color = vec4(0.0);
+
+ // Define a constant for 2 * PI (tau), which represents a full circle in radians.
+ const float tau = 6.28318530718;
+
+ // Number of directions for sampling around the circle.
+ const float directions = 15.0;
+
+ // Outer loop iterates over multiple directions evenly spaced around a circle.
+ for (float d = 0.0; d < tau; d += tau / directions) {
+ // Inner loop samples along each direction, with decreasing intensity.
+ for (float s = 0.0; s < 1.0; s += 1.0 / samples) {
+ // Calculate the offset for this sample based on direction, radius, and step.
+ // The (1.0 - s) term ensures more sampling occurs closer to the center.
+ vec2 offset = vec2(cos(d), sin(d)) * radius * (1.0 - s) / uSize;
+
+ // Add the sampled color at the offset position to the accumulator.
+ color += getInputColor(uv + offset);
+ }
+ }
+
+ // Normalize the accumulated color by dividing by the total number of samples
+ // and directions to ensure the result is averaged.
+ return color / samples / directions;
+}
+
// ----------------------------------------------------------------- compositing operators
// The Shell.GLSLEffect uses straight alpha blending. This helper method allows
@@ -185,6 +214,54 @@ vec3 darken(vec3 color, float fac) { return color * (1.0 - fac); }
// color will be white.
vec3 lighten(vec3 color, float fac) { return color + (vec3(1.0) - color) * fac; }
+// change the color based on an offset amount
+vec3 offsetHue(vec3 color, float hueOffset) {
+ // Convert RGB to HSV
+ float maxC = max(max(color.r, color.g), color.b);
+ float minC = min(min(color.r, color.g), color.b);
+ float delta = maxC - minC;
+
+ float hue = 0.0;
+ if (delta > 0.0) {
+ if (maxC == color.r) {
+ hue = mod((color.g - color.b) / delta, 6.0);
+ } else if (maxC == color.g) {
+ hue = (color.b - color.r) / delta + 2.0;
+ } else {
+ hue = (color.r - color.g) / delta + 4.0;
+ }
+ }
+ hue /= 6.0;
+
+ float saturation = (maxC > 0.0) ? (delta / maxC) : 0.0;
+ float value = maxC;
+
+ // Offset the hue
+ hue = mod(hue + hueOffset, 1.0);
+
+ // Convert HSV back to RGB
+ float c = value * saturation;
+ float x = c * (1.0 - abs(mod(hue * 6.0, 2.0) - 1.0));
+ float m = value - c;
+
+ vec3 rgb;
+ if (hue < 1.0 / 6.0) {
+ rgb = vec3(c, x, 0.0);
+ } else if (hue < 2.0 / 6.0) {
+ rgb = vec3(x, c, 0.0);
+ } else if (hue < 3.0 / 6.0) {
+ rgb = vec3(0.0, c, x);
+ } else if (hue < 4.0 / 6.0) {
+ rgb = vec3(0.0, x, c);
+ } else if (hue < 5.0 / 6.0) {
+ rgb = vec3(x, 0.0, c);
+ } else {
+ rgb = vec3(c, 0.0, x);
+ }
+
+ return rgb + m;
+}
+
// ---------------------------------------------------------------------- easing functions
// Here are some basic easing function. More can be added if required!
@@ -202,6 +279,121 @@ float easeOutBack(float x, float e) {
return p * p * ((e + 1.0) * p + e) + 1.0;
}
+// https://easings.net/
+/*
+Easing functions define the rate of change of a parameter over time, commonly used in
+animations, UI transitions, and game development. They provide a way to make movements
+more natural or visually appealing rather than linear and mechanical. Popular categories
+of easing functions include:
+
+Linear: Constant speed from start to finish.
+Quadratic (Ease In, Ease Out, Ease In Out): Changes at varying rates, with smoother starts
+or stops. Cubic: Similar to quadratic but allows for even more nuanced transitions.
+Exponential: Drastic changes at the start or end, often used for dramatic effects.
+Bounce: Mimics a bouncing object with oscillations.
+Elastic: Simulates the behavior of a spring, with overshooting and oscillations.
+Below are text-based "graphs" of some easing functions, where the horizontal axis
+represents time and the vertical axis represents progress.
+*/
+
+// Quadratic Easing
+// Smooth acceleration and deceleration using quadratic (t^2) curves.
+
+float easeInOutQuad(float t) {
+ // Accelerates for the first half, decelerates for the second half.
+ return t < 0.5 ? 2.0 * t * t : -1.0 + (4.0 - 2.0 * t) * t;
+}
+
+// Cubic Easing
+// Smoother transitions compared to quadratic easing using cubic (t^3) curves.
+
+float easeInCubic(float t) {
+ // Starts slow and accelerates as t increases.
+ return t * t * t;
+}
+
+float easeOutCubic(float t) {
+ // Starts fast and decelerates as t approaches 1.0.
+ float f = t - 1.0;
+ return f * f * f + 1.0;
+}
+
+float easeInOutCubic(float t) {
+ // Combines easeIn and easeOut cubic behavior for smooth transitions.
+ return t < 0.5 ? 4.0 * t * t * t : (t - 1.0) * (2.0 * t - 2.0) * (2.0 * t - 2.0) + 1.0;
+}
+
+// Quartic Easing
+// Even smoother transitions than cubic, using quartic (t^4) curves.
+
+float easeInQuart(float t) {
+ // Starts very slow and accelerates steeply.
+ return t * t * t * t;
+}
+
+float easeOutQuart(float t) {
+ // Starts steeply and slows down dramatically.
+ float f = t - 1.0;
+ return 1.0 - f * f * f * f;
+}
+
+float easeInOutQuart(float t) {
+ // Combines easeIn and easeOut quartic behavior for very smooth transitions.
+ return t < 0.5 ? 8.0 * t * t * t * t
+ : 1.0 - 8.0 * (t - 1.0) * (t - 1.0) * (t - 1.0) * (t - 1.0);
+}
+
+// Sine Easing
+// Smooth, wave-like acceleration and deceleration using sine curves.
+
+float easeInSine(float t) {
+ // Starts very slow, following a sine wave curve.
+ return 1.0 - cos((t * 3.141592653589793) / 2.0);
+}
+
+float easeOutSine(float t) {
+ // Starts fast and slows down following a sine wave curve.
+ return sin((t * 3.141592653589793) / 2.0);
+}
+
+float easeInOutSine(float t) {
+ // Smooth start and end, mimicking half a sine wave.
+ return -0.5 * (cos(3.141592653589793 * t) - 1.0);
+}
+
+// Exponential Easing
+// Sharp transitions with rapid acceleration and deceleration.
+
+float easeInExpo(float t) {
+ // Very slow start, accelerates exponentially.
+ return t == 0.0 ? 0.0 : pow(2.0, 10.0 * (t - 1.0));
+}
+
+float easeOutExpo(float t) {
+ // Starts fast and slows down exponentially.
+ return t == 1.0 ? 1.0 : 1.0 - pow(2.0, -10.0 * t);
+}
+
+float easeInOutExpo(float t) {
+ // Combines easeIn and easeOut exponential for sharp transitions.
+ if (t == 0.0) return 0.0;
+ if (t == 1.0) return 1.0;
+ return t < 0.5 ? 0.5 * pow(2.0, 20.0 * t - 10.0)
+ : 1.0 - 0.5 * pow(2.0, -20.0 * t + 10.0);
+}
+
+// Back Easing
+// Creates an overshooting effect for more dynamic animations.
+
+float easeInOutBack(float t) {
+ // Uses constants to define the overshooting magnitude.
+ const float c1 = 1.70158;
+ const float c2 = c1 * 1.525;
+ return t < 0.5
+ ? (pow(2.0 * t, 2.0) * ((c2 + 1.0) * 2.0 * t - c2)) / 2.0
+ : (pow(2.0 * t - 2.0, 2.0) * ((c2 + 1.0) * (t * 2.0 - 2.0) + c2) + 2.0) / 2.0;
+}
+
// --------------------------------------------------------------------- edge mask helpers
// This method returns a mask which smoothly transitions towards zero when approaching
@@ -225,7 +417,7 @@ float getEdgeMask(vec2 uv, vec2 maxUV, float fadeWidth) {
// the fade zone is given in pixels. This uses the standard uniforms uSize and uPadding.
// This means that the fading zone is not actually at the actors boundaries but at the
// position of the window border in the texture.
-// The offset paramter controls whether the fading is placed inside the window borders
+// The offset parameter controls whether the fading is placed inside the window borders
// (offset = 0), ontop the window borders (offset = 0.5) or outside the window borders
// (offset = 1).
float getAbsoluteEdgeMask(float fadePixels, float offset) {
@@ -269,6 +461,12 @@ vec2 rotate(vec2 a, float angle) {
return vec2(a.x * cos(angle) - a.y * sin(angle), a.x * sin(angle) + a.y * cos(angle));
}
+// rotates a given 2d vector, around a given center (angle is in radians)
+vec2 rotate(vec2 a, float angle, vec2 center) {
+ return vec2(cos(angle) * (a.x - center.x) + sin(angle) * (a.y - center.y) + center.x,
+ cos(angle) * (a.y - center.y) - sin(angle) * (a.x - center.x) + center.y);
+}
+
// --------------------------------------------------------------------------------- noise
// These noise algorithms are based on implementations by various authors from
@@ -470,3 +668,55 @@ float simplex3DFractal(vec3 m) {
return 0.5333333 * simplex3D(m * rot1) + 0.2666667 * simplex3D(2.0 * m * rot2) +
0.1333333 * simplex3D(4.0 * m * rot3) + 0.0666667 * simplex3D(8.0 * m);
}
+
+// --------------------------------------------------------------------------------- remap
+
+/*
+These functions remap a given value from one range to another.
+The remap operation is particularly useful in shader programming
+to scale or normalize data, ensuring compatibility across various
+input ranges. Each version of the remap function supports a
+different data type:
+
+1. float: Remap a single scalar value.
+2. vec2: Remap a 2D vector.
+3. vec3: Remap a 3D vector.
+4. vec4: Remap a 4D vector.
+
+The general formula used is:
+ newMin + (value - oldMin) * (newMax - newMin) / (oldMax - oldMin)
+
+This ensures a linear transformation from the old range to the new range.
+*/
+
+// Remap for float
+// Maps a float value from one range [oldMin, oldMax] to another range [newMin, newMax].
+// This is useful for normalizing or scaling scalar values to fit within a desired range.
+float remap(float value, float oldMin, float oldMax, float newMin, float newMax) {
+ return clamp(newMin + (value - oldMin) * (newMax - newMin) / (oldMax - oldMin), newMin,
+ newMax);
+}
+
+// Remap for vec2
+// Maps a 2D vector (vec2) from one range [oldMin, oldMax] to another range [newMin,
+// newMax]. Each component of the vec2 is individually scaled and transformed.
+vec2 remap(vec2 value, vec2 oldMin, vec2 oldMax, vec2 newMin, vec2 newMax) {
+ return clamp(newMin + (value - oldMin) * (newMax - newMin) / (oldMax - oldMin), newMin,
+ newMax);
+}
+
+// Remap for vec3
+// Maps a 3D vector (vec3) from one range [oldMin, oldMax] to another range [newMin,
+// newMax]. Each component of the vec3 is individually scaled and transformed.
+vec3 remap(vec3 value, vec3 oldMin, vec3 oldMax, vec3 newMin, vec3 newMax) {
+ return clamp(newMin + (value - oldMin) * (newMax - newMin) / (oldMax - oldMin), newMin,
+ newMax);
+}
+
+// Remap for vec4
+// Maps a 4D vector (vec4) from one range [oldMin, oldMax] to another range [newMin,
+// newMax]. Each component of the vec4 is individually scaled and transformed.
+vec4 remap(vec4 value, vec4 oldMin, vec4 oldMax, vec4 newMin, vec4 newMax) {
+ return clamp(newMin + (value - oldMin) * (newMax - newMin) / (oldMax - oldMin), newMin,
+ newMax);
+}
diff --git a/resources/shaders/focus.frag b/resources/shaders/focus.frag
index 5082499..d8da2c4 100644
--- a/resources/shaders/focus.frag
+++ b/resources/shaders/focus.frag
@@ -30,57 +30,38 @@
// vec4 getInputColor(vec2 coords)
// void setOutputColor(vec4 outColor)
-
-// Ease-in-out cubic for alpha
-float easeInOutCubic(float x) {
- return x < 0.5 ? 4.0 * x * x * x : 1.0 - pow(-2.0 * x + 2.0, 3.0) / 2.0;
-}
-
-// Ease-in-out sine for blur
-float easeInOutSine(float x) {
- return -(cos(3.14159265 * x) - 1.0) / 2.0;
-}
-
-// A simple blur function
-vec4 blur(vec2 uv, float radius, float samples) {
- vec4 color = vec4(0.0);
-
- const float tau = 6.28318530718;
- const float directions = 15.0;
-
- for (float d = 0.0; d < tau; d += tau / directions) {
- for (float s = 0.0; s < 1.0; s += 1.0 / samples) {
- vec2 offset = vec2(cos(d), sin(d)) * radius * (1.0 - s) / uSize;
- color += getInputColor(uv + offset);
- }
- }
-
- return color / samples / directions;
-}
-
-
// The width of the fading effect is loaded from the settings.
uniform float uBlurAmount;
uniform float uBlurQuality;
void main() {
+ // Calculate the progression value based on the animation direction.
+ // If opening, use uProgress as-is; if closing, invert the progression.
float progl = uForOpening ? uProgress : 1.0 - uProgress;
- float easedProgressBlur = easeInOutSine(progl); // Blur easing
- float easedProgressAlpha = easeInOutCubic(progl); // Alpha easing
+ // Apply easing functions to the progression value:
+ // - easedProgressBlur: Used for controlling the blur effect smoothly.
+ // - easedProgressAlpha: Used for controlling the alpha (opacity) transition.
+ float easedProgressBlur = easeInOutSine(progl); // Sine-based smooth easing for blur.
+ float easedProgressAlpha = easeInOutCubic(progl); // Cubic-based smooth easing for alpha.
- // Control blur amount using easedProgressBlur
+ // Calculate the blur amount by interpolating (mixing) between the maximum blur (uBlurAmount)
+ // and zero blur based on the eased progression value.
float blurAmount = mix(uBlurAmount, 0.0, easedProgressBlur);
- // Apply blur
- vec4 texColor = blur( iTexCoord.st, blurAmount, uBlurQuality);
+ // Apply the calculated blur effect to the texture at the current texture coordinates.
+ // The blur function uses the blur amount and quality (uBlurQuality) for sampling.
+ vec4 texColor = getBlurredInputColor(iTexCoord.st, blurAmount, uBlurQuality);
- // Control alpha using easedProgressAlpha
+ // Calculate the alpha value for the transition using eased progress.
+ // This determines how transparent the final color will appear.
float alpha = easedProgressAlpha;
- // Set final color with alpha transition
+ // Apply the alpha transition to the final texture color.
+ // Multiply the texture's alpha channel by the computed alpha value.
texColor.a *= alpha;
+ // Output the final color with the applied blur and alpha transition.
setOutputColor(texColor);
-}
\ No newline at end of file
+}
diff --git a/resources/shaders/mushroom.frag b/resources/shaders/mushroom.frag
new file mode 100644
index 0000000..e1e873c
--- /dev/null
+++ b/resources/shaders/mushroom.frag
@@ -0,0 +1,403 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza JGarza9788@gmail.com
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// The content from common.glsl is automatically prepended to each shader effect. This
+// provides the standard input:
+
+// vec2 iTexCoord: Texture coordinates for retrieving the window input color.
+// bool uIsFullscreen: True if the window is maximized or in fullscreen mode.
+// bool uForOpening: True if a window-open animation is ongoing, false otherwise.
+// float uProgress: A value which transitions from 0 to 1 during the animation.
+// float uDuration: The duration of the current animation in seconds.
+// vec2 uSize: The size of uTexture in pixels.
+// float uPadding: The empty area around the actual window (e.g. where the shadow
+// is drawn). For now, this will only be set on GNOME.
+
+// Furthermore, there are two global methods for reading the window input color and
+// setting the shader output color. Both methods assume straight alpha:
+
+// vec4 getInputColor(vec2 coords)
+// void setOutputColor(vec4 outColor)
+
+// The width of the fading effect is loaded from the settings.
+
+// use 8BitStyle or not (sliding scale)
+uniform float uScaleStyle;
+
+// these are for the sparks
+uniform float uSparkCount;
+uniform vec4 uSparkColor;
+uniform float uSparkRotation;
+
+// these are for the Rays
+uniform vec4 uRaysColor;
+
+// these are for the stars
+uniform float uRingCount;
+uniform float uRingRotation;
+uniform float uStarCount;
+
+// and the colors they change over time
+uniform vec4 uStarColor0;
+uniform vec4 uStarColor1;
+uniform vec4 uStarColor2;
+uniform vec4 uStarColor3;
+uniform vec4 uStarColor4;
+uniform vec4 uStarColor5;
+
+// seed
+uniform vec2 uSeed;
+
+// helps to find the angle
+vec3 getPosByAngle(float angle) { return vec3(cos(angle), sin(angle), 0); }
+
+// gets the mask of a Star
+float getStar(vec2 uv, vec2 center, float npoints, float radiusRatio, float size,
+ float rotation) {
+
+ float radiusMax = 1.0;
+ float radiusMin = radiusMax * radiusRatio;
+
+ float PI = 3.1415926;
+ float starangle = 2.0 * PI / npoints; // Angle between points on the star
+
+ // Offset rotation to ensure one point is always up when rotation = 0
+ rotation += PI / 2.0 - starangle / 1.0;
+
+ // Define the positions for the outer and inner points of the star's initial angle,
+ // rotated by `rotation`
+ vec3 p0 =
+ (radiusMax * size) * getPosByAngle(rotation); // Outer point, rotated by `rotation`
+ vec3 p1 = (radiusMin * size) *
+ getPosByAngle(starangle + rotation); // Inner point, also rotated
+
+ // Calculate the position of the current fragment relative to the star's center
+ vec2 curPosuv =
+ (uv - center); // Center UV coordinates, then scale to fit the star size
+ float curRadius = length(curPosuv); // Radius from center, no need to scale further
+ float curPosAngle =
+ atan(curPosuv.y, curPosuv.x) - rotation; // Calculate angle and adjust by `rotation`
+
+ // Determine the fractional position within the current star segment
+ float a =
+ fract(curPosAngle / starangle); // Fractional angle position within one segment
+ if (a >= 0.5)
+ a = 1.0 - a; // Ensure we are within the first half of the segment (symmetry)
+
+ // Calculate the current point on the star segment, applying rotation
+ a = a * starangle; // Actual angle for this position on the segment
+ vec3 curPos = curRadius * getPosByAngle(a + rotation); // Final position, rotated
+
+ // Calculate directions for edge detection using cross product
+ vec3 dir0 = p1 - p0; // Vector from outer to inner point
+ vec3 dir1 = curPos - p0; // Vector from outer point to current position
+
+ // Use cross product to determine if `curPos` is inside the star's edge
+ return step(0.0,
+ cross(dir0, dir1).z); // Returns 1.0 if inside, 0.0 if outside (solid edge)
+}
+
+// use to scale the window
+vec2 scaleUV(vec2 uv, vec2 scale) {
+ // Put texture coordinate origin to center of window.
+ uv = uv * 2.0 - 1.0;
+
+ // scale
+ uv /= mix(vec2(1.0, 1.0), vec2(0.0, 0.0), scale);
+
+ // scale from center
+ uv = uv * 0.5 + 0.5;
+
+ return uv;
+}
+
+// this returns the Spark
+float getSpark(vec2 uv, vec2 center, float brightness, float size, float rotation) {
+ brightness = clamp(brightness, 0.001, 1.0);
+ size = clamp(size, 0.001, 1.0);
+ float bn = mix(0.0, 0.07, brightness); // recalculate size
+
+ uv = (uv + vec2(0.5));
+ uv = (uv - center); // Center UV coordinates, then scale to fit the star size
+ uv = scaleUV(uv, vec2(1.0 - size));
+ uv = rotate(uv, rotation, vec2(0.5)); // rotate the UV
+
+ // this is basically the brightness
+ float p = mix(-1.0, 1000.0, easeInExpo(bn));
+
+ float m =
+ mix(0.0, 1.0,
+ clamp(pow(abs(uv.x - 0.5) * 2.0, p) + pow(abs(uv.y - 0.5) * 2.0, p), 0.0, 1.0));
+
+ float mask = easeInSine(1.0 - (m - bn)) - 0.004;
+ mask = clamp(mask, 0.0, 1.0);
+
+ return mask;
+}
+
+// returns the star's color
+vec4 getStarColor(float v, float alpha) {
+ // Clamp v to ensure it's in [0.0, 1.0]
+ v = clamp(v, 0.0, 1.0);
+
+ // Define steps for color interpolation
+ float steps[6];
+ steps[0] = 0.0;
+ steps[1] = 0.1666;
+ steps[2] = 0.3332;
+ steps[3] = 0.4998;
+ steps[4] = 0.6664;
+ steps[5] = 0.8330;
+
+ // Define color values
+ vec4 colors[6];
+ colors[0] = uStarColor0;
+ colors[1] = uStarColor1;
+ colors[2] = uStarColor2;
+ colors[3] = uStarColor3;
+ colors[4] = uStarColor4;
+ colors[5] = uStarColor5;
+
+ // Assign alpha values
+ for (int i = 0; i < 6; ++i) {
+ colors[i].a = alpha * colors[i].a;
+ }
+
+ // Handle edge cases
+ if (v <= steps[0]) {
+ return colors[0];
+ }
+ if (v >= steps[5]) {
+ return colors[5];
+ }
+
+ // Find the correct interpolation segment
+ for (int i = 0; i < 5; ++i) {
+ if (v <= steps[i + 1]) {
+ float t = (v - steps[i]) / (steps[i + 1] - steps[i]);
+ return mix(colors[i], colors[i + 1], t);
+ }
+ }
+
+ // Fallback (should never be reached)
+ return vec4(0.0, 0.0, 0.0, 1.0);
+}
+
+// 1| __________
+// | / \
+// | / \
+// | / \
+// |/ \
+// 0|0.................1
+/*
+graph above ... where t is close to 0, or 1 the result will fade to zero
+i.e. this is just the function of power(x,p) shifted
+where x is time, and p is 2.0,4.0,8.0,10.0 ... or any positive even number
+*/
+float zeroStartEnd(float t, float max_size, float power) {
+ float s = -1.0 * pow((t - 0.5) / (0.5), power) + 1.0;
+ s = clamp(s, 0.0, 1.0) * max_size;
+ return s;
+}
+
+// this gives us the jerky 8bit growth effect.
+float eightBitScale(float progress) {
+ float scale = 1.0;
+ if (progress <= 0.1) {
+ scale = 0.25;
+ } else if (progress <= 0.2) {
+ scale = 0.5;
+ } else if (progress <= 0.3) {
+ scale = 0.25;
+ } else if (progress <= 0.4) {
+ scale = 0.5;
+ } else if (progress <= 0.5) {
+ scale = 0.25;
+ } else if (progress <= 0.6) {
+ scale = 0.5;
+ } else if (progress <= 0.7) {
+ scale = 1.0;
+ } else if (progress <= 0.8) {
+ scale = 0.25;
+ } else if (progress <= 0.9) {
+ scale = 0.5;
+ }
+ return scale;
+}
+
+// gets all the sparks
+vec4 getSparks(float progress) {
+ // the UV for this function
+ float aspect = uSize.x / uSize.y;
+ vec2 uv = iTexCoord.st * vec2(aspect, 1.0);
+
+ // this will be the result to return
+ vec4 result = vec4(0.0);
+
+ // 0 at the edges
+ float xEdge = -1.0 * pow((uv.x - (aspect * 0.5)) / (aspect * 0.5), 8.0) + 1.0;
+ xEdge = clamp(xEdge, 0.0, 1.0);
+
+ // declare some variables before the loop
+ vec2 h = vec2(0.0);
+ float y = 0.0;
+ float x = 0.0;
+
+ // loop for each spart
+ for (float xusp = 0.0; xusp < uSparkCount; ++xusp) {
+ // calculate some variables
+ h = hash21(xusp + uSeed.x);
+ y = mix(0.0 - h.y, 1.0 + (1.0 - h.y), progress);
+ y = clamp(y, 0.0, 1.0);
+
+ x = 0.66 * sin(h.x * 6.28);
+ x += 0.5 * aspect;
+
+ // here we get the mask for the spark
+ float a4ps = getSpark(uv, vec2(x, y), // position (x, y)
+ zeroStartEnd(y, 1.0, 4.0) * xEdge, // Brightness
+ zeroStartEnd(y, 0.5, 4.0) * xEdge, // Size
+ progress * 6.28 * float(uSparkRotation) // rotation
+ );
+
+ // set it to the results
+ result = alphaOver(
+ result, vec4(uSparkColor.r, uSparkColor.g, uSparkColor.b, uSparkColor.a * a4ps));
+ }
+
+ // and we are returning the result
+ return result;
+}
+
+// gets the Rays
+vec4 getRays(float progress) {
+ // create the UV for it
+ vec2 rayUV = iTexCoord.st;
+ rayUV *= vec2(10.0, 0.5);
+ rayUV.y += progress * -1.0;
+ rayUV.x += uSeed.y;
+
+ // gets the ray
+ float ray = simplex2D(rayUV);
+ // 0 around the edges
+ ray *= zeroStartEnd(iTexCoord.t, 1.0, 8.0);
+ ray *= zeroStartEnd(iTexCoord.s, 1.0, 8.0);
+ // 0 at the begining and end of the animation
+ ray *= zeroStartEnd(progress, 1.0, 8.0);
+
+ // adjust the numbers and clamp
+ ray = remap(ray * 1.10, 0.0, 1.0, -5.0, 1.0);
+
+ float alpha = clamp(uRaysColor.a * ray, 0.0, 1.0);
+
+ // return
+ return vec4(uRaysColor.r, uRaysColor.g, uRaysColor.b, alpha);
+}
+
+// returns the stars
+vec4 getStars(vec2 starUV, float aspect, float progress, float oColorAlpha) {
+ // this will be the result to return
+ vec4 result = vec4(0.0);
+
+ vec2 h = vec2(0.0);
+ float y = 0.0;
+
+ // for each ring
+ for (float r = 0.0; r < uRingCount; ++r) {
+
+ float spread = r * (1.0 / uRingCount);
+ y = mix(0.0 - spread, 1.0 + (1.0 - spread), 1.0 - progress);
+ y = clamp(y, 0.00001, 0.99999);
+
+ // each star in each ring
+ for (float s = 0.0; s < uStarCount; ++s) {
+
+ // this returns a Star
+
+ float a5ps =
+ getStar(starUV,
+ vec2(sin(progress * uRingRotation * 6.28 + (s * (6.28 / uStarCount))) *
+ aspect * 0.33,
+ y), // position (x, y)
+ 5.0, // nPoints
+ 0.5, // radiusRatio
+ zeroStartEnd(y, 0.1, 2.0), // Size
+ 0.0 // rotation
+ );
+ a5ps = clamp(a5ps, 0.0, 1.0);
+
+ // //put the star in back or the front of the window
+ float depth = cos(progress * uRingRotation * 6.28 + (s * (6.28 / uStarCount)));
+
+ // if we want the star behind or infront of the window
+
+ if (depth < 0.0) {
+ result = alphaOver(result, getStarColor(y, a5ps));
+ } else {
+ result = alphaOver(getStarColor(y, a5ps) * (1.0 - oColorAlpha), result);
+ }
+ }
+ }
+
+ // and we are returning the result
+ return result;
+}
+
+void main() {
+
+ // Calculate the animation progress, flipping direction if opening
+ // 'uProgress' varies from 0 to 1, depending on the animation phase
+ float progress = uForOpening ? 1.0 - uProgress : uProgress;
+
+ // Initialize the output color to fully transparent black
+ vec4 oColor = vec4(0.0, 0.0, 0.0, 0.0);
+
+ // get scales
+ float scale8bit = eightBitScale(progress);
+ vec2 scaleV2 = vec2(easeInOutSine(progress), easeInQuad(progress));
+
+ vec2 fscale = mix(vec2(scale8bit), scaleV2, uScaleStyle);
+
+ // Fetch the color based on the scaled texture coordinates
+ oColor = getInputColor(scaleUV(iTexCoord.st, fscale));
+
+ // Store the alpha value of the fetched color for later use
+ float oColorAlpha = oColor.a;
+
+ // Calculate the aspect ratio of the render area
+ float aspect = uSize.x / uSize.y;
+
+ // Transform UV coordinates for star effects
+ // starUV.x [-0.5 , 0.5]
+ // starUV.y [1.0 , 0.0]
+ vec2 starUV = vec2(iTexCoord.s - 0.5, 1.0 - iTexCoord.t) * vec2(aspect, 1.0);
+
+ // If four-point stars are enabled, overlay them on the current color
+ if (uSparkCount > 0.0) {
+ oColor = alphaOver(oColor, getSparks(progress));
+ }
+
+ // If rays are enabled, overlay them on the current color
+ if (uRaysColor.a > 0.0) {
+ oColor = alphaOver(oColor, getRays(progress));
+ }
+
+ // If five-point stars are enabled, overlay them using stored alpha
+ if (uRingCount > 0.0 && uStarCount > 0.0) {
+ oColor = alphaOver(oColor, getStars(starUV, aspect, progress, oColorAlpha));
+ }
+
+ // Set the final output color to the computed value
+ setOutputColor(oColor);
+}
diff --git a/resources/shaders/rgbwarp.frag b/resources/shaders/rgbwarp.frag
new file mode 100644
index 0000000..ca58ae8
--- /dev/null
+++ b/resources/shaders/rgbwarp.frag
@@ -0,0 +1,74 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza JGarza9788@gmail.com
+// SPDX-FileCopyrightText: Simon Schneegans
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// The content from common.glsl is automatically prepended to each shader effect. This
+// provides the standard input:
+
+// vec2 iTexCoord: Texture coordinates for retrieving the window input color.
+// bool uIsFullscreen: True if the window is maximized or in fullscreen mode.
+// bool uForOpening: True if a window-open animation is ongoing, false otherwise.
+// float uProgress: A value which transitions from 0 to 1 during the animation.
+// float uDuration: The duration of the current animation in seconds.
+// vec2 uSize: The size of uTexture in pixels.
+// float uPadding: The empty area around the actual window (e.g. where the shadow
+// is drawn). For now, this will only be set on GNOME.
+
+// Furthermore, there are two global methods for reading the window input color and
+// setting the shader output color. Both methods assume straight alpha:
+
+// vec4 getInputColor(vec2 coords)
+// void setOutputColor(vec4 outColor)
+
+uniform float uBrightness;
+uniform float uSpeedR;
+uniform float uSpeedG;
+uniform float uSpeedB;
+
+float FadeInOut(float t, float power) {
+ float s = -1.0 * pow((t - 0.5) / (0.5), power) + 1.0;
+ s = clamp(s, 0.0, 1.0);
+ return s;
+}
+
+void main() {
+
+ // Calculate the progression value based on the animation direction.
+ float progress = uForOpening ? 1.0 - uProgress : uProgress;
+
+ // Percentage of the progress time which is spent until all pixels start moving up.
+ float minSpeed = min(uSpeedR, min(uSpeedG, uSpeedB));
+ float waveTime = mix(0.1, 0.9, minSpeed);
+ float waveProgress = progress / waveTime;
+
+ // Gradient from top to bottom (0 at top, 1 at bottom).
+ float t = iTexCoord.t;
+
+ // Calculate the vertical wave offset.
+ float offset = max(waveProgress - t, 0.0);
+ offset /= (1.0 / waveTime) - 1.0;
+ offset *= (1.0 - waveTime);
+
+ vec4 colorR = getInputColor(iTexCoord + vec2(0.0, offset * (uSpeedR - minSpeed + 1.0)));
+ vec4 colorG = getInputColor(iTexCoord + vec2(0.0, offset * (uSpeedG - minSpeed + 1.0)));
+ vec4 colorB = getInputColor(iTexCoord + vec2(0.0, offset * (uSpeedB - minSpeed + 1.0)));
+
+ vec4 oColor =
+ vec4(colorR.r, colorG.g, colorB.b, (colorR.a + colorG.a + colorB.a) / 3.0);
+ oColor.rgb *= mix(1.0, uBrightness, FadeInOut(progress, 4));
+
+ oColor.a *= getRelativeEdgeMask(0.1);
+
+ setOutputColor(oColor);
+}
diff --git a/resources/shaders/team-rocket.frag b/resources/shaders/team-rocket.frag
new file mode 100644
index 0000000..82bc4ff
--- /dev/null
+++ b/resources/shaders/team-rocket.frag
@@ -0,0 +1,161 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza JGarza9788@gmail.com
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// The content from common.glsl is automatically prepended to each shader effect. This
+// provides the standard input:
+
+// vec2 iTexCoord: Texture coordinates for retrieving the window input color.
+// bool uIsFullscreen: True if the window is maximized or in fullscreen mode.
+// bool uForOpening: True if a window-open animation is ongoing, false otherwise.
+// float uProgress: A value which transitions from 0 to 1 during the animation.
+// float uDuration: The duration of the current animation in seconds.
+// vec2 uSize: The size of uTexture in pixels.
+// float uPadding: The empty area around the actual window (e.g. where the shadow
+// is drawn). For now, this will only be set on GNOME.
+
+// Furthermore, there are two global methods for reading the window input color and
+// setting the shader output color. Both methods assume straight alpha:
+
+// vec4 getInputColor(vec2 coords)
+// void setOutputColor(vec4 outColor)
+
+// window time ... how we split the time between the window and the sparkle/star
+uniform float uWT;
+uniform float uXpos; // the Xposition of the star
+uniform float uYpos; // the Yposition of the star
+uniform float uSparkleRot; // the rotation of the star
+uniform float uSparkleSize; // the size of the star
+uniform bool uWinRot; // window rotation... but it's more of a warp
+uniform vec2 uSeed; // and random numbers
+
+// Used to scale the window.
+vec2 scaleUV(vec2 uv, vec2 scale, vec2 centerOffset) {
+ // Put texture coordinate origin to center of window.
+ uv -= centerOffset;
+ uv = uv * 2.0 - 1.0;
+
+ // scale
+ uv /= mix(vec2(1.0, 1.0), vec2(0.0, 0.0), scale);
+
+ // scale from center
+ uv = uv * 0.5 + 0.5;
+
+ return uv;
+}
+
+// This returns the Spark.
+float getSpark(vec2 uv, vec2 center, float brightness, float size, float rotation) {
+ brightness = clamp(brightness, 0.001, 1.0);
+ size = clamp(size, 0.001, 1.0);
+
+ float bn = mix(0.0, 0.07, brightness); // recalculate size
+
+ uv = (uv + vec2(0.5)); // set center
+ uv = (uv - center); // Center UV coordinates, then scale to fit the star size
+ uv = scaleUV(uv, vec2(1.0 - size), vec2(0.0));
+ uv = rotate(uv, rotation, vec2(0.5)); // rotate the UV
+
+ // this is basically the brightness
+ float p = mix(-1.0, 1000.0, easeInExpo(bn));
+
+ float m =
+ mix(0.0, 1.0,
+ clamp(pow(abs(uv.x - 0.5) * 2.0, p) + pow(abs(uv.y - 0.5) * 2.0, p), 0.0, 1.0));
+
+ // calcuate and return this mask
+ float mask = easeInSine(1.0 - (m - bn)) - 0.004;
+ mask = clamp(mask, 0.0, 1.0);
+ return mask;
+}
+
+// fades out at 0 and 1 ...based on the power
+// 1| __________
+// | / \
+// | / \
+// | / \
+// | / \
+// 0| 0.................1
+/*
+graph above ... where t is close to 0, or 1 the result will fade to zero
+i.e. this is just the function of power(x,p) shifted
+where x is time, and p is 2.0,4.0,8.0,10.0 ... or any positive even number
+*/
+float fadeInOut(float t, float power) {
+ float s = -1.0 * pow((t - 0.5) / (0.5), power) + 1.0;
+ s = clamp(s, 0.0, 1.0);
+ return s;
+}
+
+// 2x pi ... don't think too much about it
+float TAU = 6.28;
+
+void main() {
+ // Calculate the progression value based on the animation direction.
+ // If opening, use uProgress as-is; if closing, invert the progression.
+ float progress = uForOpening ? 1.0 - uProgress : uProgress;
+
+ // Scale progress ... the first half of the animation.
+ float scalep = remap(progress, 0.0, uWT + 0.1, 0.0, 1.0);
+ scalep = easeOutQuad(scalep);
+
+ // Sparkle progress ... the second half of the animation.
+ float sparkp = remap(progress, uWT - 0.1, 1.0, 0.0, 1.0);
+ sparkp = easeInOutSine(sparkp);
+
+ // This is the offset of the window... don't let them go too far each way.
+ vec2 offset = vec2(uXpos, uYpos * -1.0) * 0.20;
+ vec2 scaleOffset = mix(vec2(0.0), vec2(uXpos, uYpos * -1.0) * 0.50, scalep);
+
+ // the UV for this function
+ float aspect = uSize.x / uSize.y;
+ vec2 uv = iTexCoord.st * vec2(aspect, 1.0);
+
+ // get and adjust
+ vec2 uv2 = iTexCoord.st;
+ uv2 = uv2 * 2.0 - 1.0;
+ uv2 -= (scaleOffset / vec2(aspect, 1.0)) * scalep;
+ uv2 /= 1.0 - scalep;
+
+ // Rotation and if we are gonna rotate or not.
+ vec3 rot = vec3(0.0);
+ if (uWinRot) {
+ rot = hash32(uSeed);
+ rot *= 2.0;
+ rot -= 1.0;
+ rot *= 0.1;
+ }
+
+ // Rotate around x, y , and z.
+ uv2.x /= mix(1.0, rot.x * TAU * uv2.y, scalep);
+ uv2.y /= mix(1.0, rot.y * TAU * uv2.x, scalep);
+ uv2 = rotate(uv2, rot.z * TAU * scalep);
+
+ // re-center
+ uv2 = uv2 * 0.5 + 0.5;
+
+ // Get the sparkle.
+ float size = mix(25.0, 50.0, uSparkleSize);
+ float sparkle =
+ getSpark(uv, offset + vec2(0.5 * aspect, 0.5), fadeInOut(sparkp, 2) * uSparkleSize,
+ fadeInOut(sparkp, 2) * size, sparkp * TAU * float(uSparkleRot));
+ // Fade out at the edges.
+ sparkle *= fadeInOut(iTexCoord.t, 8);
+ sparkle *= fadeInOut(iTexCoord.s, 8);
+
+ // Combine the final color.
+ vec4 oColor = getInputColor(uv2);
+ oColor = alphaOver(oColor, vec4(1.0, 1.0, 1.0, sparkle));
+
+ setOutputColor(oColor);
+}
\ No newline at end of file
diff --git a/resources/ui/adw/aura-glow.ui b/resources/ui/adw/aura-glow.ui
new file mode 100644
index 0000000..e96a5b2
--- /dev/null
+++ b/resources/ui/adw/aura-glow.ui
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/ui/adw/mushroom.ui b/resources/ui/adw/mushroom.ui
new file mode 100644
index 0000000..e8275fd
--- /dev/null
+++ b/resources/ui/adw/mushroom.ui
@@ -0,0 +1,439 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Animation Time [ms]
+
+
+
+ center
+ 1
+ 0
+ left
+ 300
+
+
+
+ 5000
+ 100
+ 10
+ 100
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Effect Presets
+ mushroom-star-color-preset-button
+
+
+
+ center
+ Choose a Preset
+
+
+
+
+
+
+
+
+
+ Scale Style
+ 8Bit --- Smooth
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ 0.0
+ 0.1
+ 0.25
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Spark Count
+
+
+
+ center
+ 1
+ 0
+ left
+ 300
+
+
+
+ 25
+ 0
+ 1
+ 5
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Spark Rotation
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 3.0
+ -3.0
+ 0.5
+ 0.25
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Spark Color
+
+
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Rays Color
+
+
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Star Rings Count
+
+
+
+ center
+ 1
+ 0
+ left
+ 300
+
+
+
+ 5
+ 0
+ 1
+ 3
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Star Ring Rotation
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 3.0
+ -3.0
+ 0.25
+ 1.0
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Stars Count Per Ring
+
+
+
+ center
+ 1
+ 0
+ left
+ 300
+
+
+
+ 7
+ 0
+ 1
+ 3
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Star Gradient
+
+
+
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+ 1
+ 1
+ center
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/ui/adw/prefs.ui b/resources/ui/adw/prefs.ui
index 70d717d..f8d2fd5 100644
--- a/resources/ui/adw/prefs.ui
+++ b/resources/ui/adw/prefs.ui
@@ -63,7 +63,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
Effect Profile Constraints
- Define when the current effect settings should be used.
+ Define when the current effect
+ settings should be used.
@@ -181,7 +182,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
High Priority
- Use this profile even if there are better matching profiles.
+ Use this profile even if there are
+ better matching profiles.1profile-high-priority
diff --git a/resources/ui/adw/rgbwarp.ui b/resources/ui/adw/rgbwarp.ui
new file mode 100644
index 0000000..156b61a
--- /dev/null
+++ b/resources/ui/adw/rgbwarp.ui
@@ -0,0 +1,204 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Animation Time [ms]
+
+
+
+ center
+ 1
+ 0
+ left
+ 300
+
+
+
+ 5000
+ 100
+ 10
+ 100
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Brightness
+
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ 0.0
+ 0.1
+ 0.25
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+ Red Speed
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ 0.0
+ 0.01
+ 0.1
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+ Green Speed
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ 0.0
+ 0.01
+ 0.1
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+ Blue Speed
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ 0.0
+ 0.01
+ 0.1
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/ui/adw/team-rocket.ui b/resources/ui/adw/team-rocket.ui
new file mode 100644
index 0000000..94e2641
--- /dev/null
+++ b/resources/ui/adw/team-rocket.ui
@@ -0,0 +1,265 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Animation Time [ms]
+
+
+
+ center
+ 1
+ 0
+ left
+ 300
+
+
+
+ 5000
+ 100
+ 10
+ 100
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+ Animation Split
+
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 0.8
+ 0.2
+ 0.01
+ 0.1
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+ Rotate Window
+ team-rocket-win-rot
+
+
+ center
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+ Horizontal Sparkle Position
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ -1.0
+ 0.01
+ 0.1
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+ Vertical Sparkle Position
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ -1.0
+ 0.01
+ 0.1
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
+ Sparkle Size
+
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ 0.5
+ 0.1
+ 0.25
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+ Sparkle Rotation
+
+
+
+
+ center
+ 1
+ 2
+ left
+ 300
+
+
+
+ 1.0
+ -1.0
+ 0.1
+ 0.25
+
+
+
+
+
+
+
+ edit-clear-symbolic
+ center
+ Reset to Default Value
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml b/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml
index f7682cc..b7b4b8f 100644
--- a/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.burn-my-windows-profile.gschema.xml
@@ -823,7 +823,7 @@ SPDX-License-Identifier: CC0-1.0
-
+
@@ -850,6 +850,270 @@ SPDX-License-Identifier: CC0-1.0
The Quality of the Blur (Setting this too high may increase GPU load and affect performance)
+
+
+
+
+
+ false
+ mushroom Enable Effect
+ Use the mushroom effect.
+
+
+
+ 1500
+ mushroom Animation Time
+ The time the mushroom effect takes.
+
+
+
+
+
+ 1.0
+ 8Bit or Smooth Scaling
+ How the window scales
+
+
+
+ 4
+ The Number of Sparks
+ The Number of Sparks
+
+
+
+ "rgba(255, 255, 255, 1.0)"
+ The Sparks Color
+ The Sparks Color
+
+
+
+ 0.3
+ The Number of Rotations the Sparks do
+ The Number of Rotations the Sparks do
+
+
+
+ "rgba(255, 255, 255, 1.0)"
+ The Rays Color
+ The Rays Color
+
+
+
+ 3
+ Number of Rings
+ Number of Rings
+
+
+
+ 1.33
+ The Number of Rotations/Cycles the Stars do
+ The Number of Rotations/Cycles the Stars do
+
+
+
+ 5
+ The Number of Stars in each Ring
+ The Number of Stars in each Ring
+
+
+
+ "rgba(233, 249, 1, 1.0)"
+ Star Color 1
+ The Nth color of the Star gradient.
+
+
+
+ "rgba(233, 249, 1, 1.0)"
+ Star Color 1
+ The Nth color of the Star gradient.
+
+
+
+ "rgba(91, 255, 1, 1.0)"
+ Star Color 1
+ The Nth color of the Star gradient.
+
+
+
+ "rgba(91, 255, 1, 1.0)"
+ Star Color 1
+ The Nth color of the Star gradient.
+
+
+
+ "rgba(0, 240, 236, 1.0)"
+ Star Color 1
+ The Nth color of the Star gradient.
+
+
+
+ "rgba(0, 240, 236, 1.0)"
+ Star Color 1
+ The Nth color of the Star gradient.
+
+
+
+
+
+
+
+
+ false
+ Aura Glow Enable Effect
+ Use the Aura Glow effect.
+
+
+
+ 750
+ Aura Glow Animation Time
+ The time the Aura Glow effect takes.
+
+
+
+ false
+ Aura Glow Random Color Offset
+ Ramdomize the color offset
+
+
+
+ 0.0
+ Aura Glow Color Offset
+ Changes the inital color of the glow
+
+
+
+ 2.5
+ Aura Glow Color Speed
+ The Speed at which the color changes
+
+
+
+ 0.75
+ Aura Glow Color Saturation
+ Amount of color in the effect
+
+
+
+ 0.75
+ Aura Glow Size of the Color Edge
+ Size of the Color Edge
+
+
+
+ 0.25
+ Aura Glow Edge Hardness
+ The Hardness of the Edge
+
+
+
+ 15.0
+ Aura Glow Blur
+ Changes the Blue Amount
+
+
+
+
+
+
+
+ false
+ RGBWarp Enable Effect
+ Use the RGBWarp.
+
+
+
+ 750
+ RGBWarp Animation Time
+ The time the RGBWarp effect takes.
+
+
+
+ 1.0
+ RGBWarp Width
+ Width of the effect.
+
+
+
+ 1.0
+ RGBWarp Brightness
+ brightness of the effect.
+
+
+
+ 1.0
+ RGBWarp Red Speed
+ Red speed of the effect.
+
+
+
+ 0.90
+ RGBWarp Green Speed
+ Green speed of the effect.
+
+
+
+ 0.80
+ RGBWarp Blue Speed
+ Blue speed of the effect.
+
+
+
+
+
+
+
+ false
+ Team Rocket Enable Effect
+ Use the Team Rocket effect.
+
+
+
+ 1500
+ Team Rocket Animation Time
+ The time the Team Rocket effect takes.
+
+
+
+ 0.5
+ Window vs Sparkle split
+ Window vs Sparkle split
+
+
+
+ 0.0
+ Team Rocket X
+ X position
+
+
+
+ 0.5
+ Team Rocket Y
+ Y position
+
+
+
+ true
+ Rotate the Window
+ Rotate the Window
+
+
+
+ 0.33
+ Sparkle Rotation
+ Sparkle Rotation
+
+
+
+ 0.75
+ Sparkle Size
+ Sparkle Size
+
+
+
\ No newline at end of file
diff --git a/src/Shader.js b/src/Shader.js
index 2d53afe..3617622 100644
--- a/src/Shader.js
+++ b/src/Shader.js
@@ -47,166 +47,165 @@ import * as utils from './utils.js';
// used to clean up any resources.
//////////////////////////////////////////////////////////////////////////////////////////
-export var Shader = GObject.registerClass(
- {
- Signals: {
- 'begin-animation': {
- param_types: [
- Gio.Settings.$gtype, GObject.TYPE_BOOLEAN, GObject.TYPE_BOOLEAN,
- Clutter.Actor.$gtype
- ]
- },
- 'update-animation': {param_types: [GObject.TYPE_DOUBLE]},
- 'end-animation': {}
- }
- },
- class Shader extends Shell.GLSLEffect { // --------------------------------------------
- // The constructor automagically loads the shader's source code (in
- // vfunc_build_pipeline()) from the resource file resources/shaders/.glsl
- // resolving any #includes in this file.
- _init(nick) {
- this._nick = nick;
+export var Shader = GObject.registerClass({
+ Signals: {
+ 'begin-animation': {
+ param_types: [
+ Gio.Settings.$gtype, GObject.TYPE_BOOLEAN, GObject.TYPE_BOOLEAN,
+ Clutter.Actor.$gtype
+ ]
+ },
+ 'update-animation': {param_types: [GObject.TYPE_DOUBLE]},
+ 'end-animation': {}
+ }
+},
- // This will call vfunc_build_pipeline().
- super._init();
+ class Shader extends Shell.GLSLEffect {
+ // --------------------------------------------
+ // The constructor automagically loads the shader's source code (in
+ // vfunc_build_pipeline()) from the resource file resources/shaders/.glsl
+ // resolving any #includes in this file.
+ _init(nick) {
+ this._nick = nick;
- // These will be updated during the animation.
- this._progress = 0;
- this._time = 0;
+ // This will call vfunc_build_pipeline().
+ super._init();
- // Store standard uniform locations.
- this._uForOpening = this.get_uniform_location('uForOpening');
- this._uIsFullscreen = this.get_uniform_location('uIsFullscreen');
- this._uProgress = this.get_uniform_location('uProgress');
- this._uDuration = this.get_uniform_location('uDuration');
- this._uSize = this.get_uniform_location('uSize');
- this._uPadding = this.get_uniform_location('uPadding');
+ // These will be updated during the animation.
+ this._progress = 0;
+ this._time = 0;
- // Create a timeline to drive the animation.
- this._timeline = new Clutter.Timeline();
+ // Store standard uniform locations.
+ this._uForOpening = this.get_uniform_location('uForOpening');
+ this._uIsFullscreen = this.get_uniform_location('uIsFullscreen');
+ this._uProgress = this.get_uniform_location('uProgress');
+ this._uDuration = this.get_uniform_location('uDuration');
+ this._uSize = this.get_uniform_location('uSize');
+ this._uPadding = this.get_uniform_location('uPadding');
- // Call updateAnimation() once a frame.
- this._timeline.connect('new-frame', (t) => {
- if (this._testMode) {
- this.updateAnimation(0.5);
- } else {
- this.updateAnimation(t.get_progress());
- }
- });
+ // Create a timeline to drive the animation.
+ this._timeline = new Clutter.Timeline();
- // Clean up if the animation finished or was interrupted.
- this._timeline.connect('stopped', (t, finished) => {
- this.endAnimation();
- });
- }
-
- // This is called once each time the shader is used.
- beginAnimation(settings, forOpening, testMode, duration, actor) {
- if (this._timeline.is_playing()) {
- this._timeline.stop();
+ // Call updateAnimation() once a frame.
+ this._timeline.connect('new-frame', (t) => {
+ if (this._testMode) {
+ this.updateAnimation(0.5);
+ } else {
+ this.updateAnimation(t.get_progress());
}
+ });
- // On GNOME 3.36 this method was not yet available.
- if (this._timeline.set_actor) {
- this._timeline.set_actor(actor);
- }
+ // Clean up if the animation finished or was interrupted.
+ this._timeline.connect('stopped', (t, finished) => {
+ this.endAnimation();
+ });
+ }
- this._timeline.set_duration(duration);
- this._timeline.start();
-
- // Make sure that no fullscreen window is drawn over our animations.
- Meta.disable_unredirect_for_display(global.display);
- global.begin_work();
-
- // Reset progress value.
- this._progress = 0;
- this._testMode = testMode;
-
- // This is not necessarily symmetric, but I haven't figured out a way to
- // get the actual values...
- const padding = (actor.width - actor.meta_window.get_frame_rect().width) / 2;
- const isFullscreen =
- actor.meta_window.get_maximized() === Meta.MaximizeFlags.BOTH ||
- actor.meta_window.fullscreen;
-
- this.set_uniform_float(this._uPadding, 1, [padding]);
- this.set_uniform_float(this._uForOpening, 1, [forOpening]);
- this.set_uniform_float(this._uIsFullscreen, 1, [isFullscreen]);
- this.set_uniform_float(this._uDuration, 1, [duration * 0.001]);
- this.set_uniform_float(this._uSize, 2, [actor.width, actor.height]);
-
- this.emit('begin-animation', settings, forOpening, testMode, actor);
+ // This is called once each time the shader is used.
+ beginAnimation(settings, forOpening, testMode, duration, actor) {
+ if (this._timeline.is_playing()) {
+ this._timeline.stop();
}
- // This is called at each frame during the animation.
- updateAnimation(progress) {
- // Store the current progress value. The corresponding signal is emitted each frame
- // in vfunc_paint_target. We do not emit it here, as the pipeline which may be used
- // by handlers must not have been created yet.
- this._progress = progress;
-
- this.queue_repaint();
+ // On GNOME 3.36 this method was not yet available.
+ if (this._timeline.set_actor) {
+ this._timeline.set_actor(actor);
}
- // This will stop any running animation and emit the end-animation signal.
- endAnimation() {
- // This will call endAnimation() again, so we can return for now.
- if (this._timeline.is_playing()) {
- this._timeline.stop();
- return;
- }
+ this._timeline.set_duration(duration);
+ this._timeline.start();
- // Restore unredirecting behavior for fullscreen windows.
- Meta.enable_unredirect_for_display(global.display);
- global.end_work();
+ // Make sure that no fullscreen window is drawn over our animations.
+ Meta.disable_unredirect_for_display(global.display);
+ global.begin_work();
- this.emit('end-animation');
+ // Reset progress value.
+ this._progress = 0;
+ this._testMode = testMode;
+
+ // This is not necessarily symmetric, but I haven't figured out a way to
+ // get the actual values...
+ const padding = (actor.width - actor.meta_window.get_frame_rect().width) / 2;
+ const isFullscreen = actor.meta_window.get_maximized() === Meta.MaximizeFlags.BOTH ||
+ actor.meta_window.fullscreen;
+
+ this.set_uniform_float(this._uPadding, 1, [padding]);
+ this.set_uniform_float(this._uForOpening, 1, [forOpening]);
+ this.set_uniform_float(this._uIsFullscreen, 1, [isFullscreen]);
+ this.set_uniform_float(this._uDuration, 1, [duration * 0.001]);
+ this.set_uniform_float(this._uSize, 2, [actor.width, actor.height]);
+
+ this.emit('begin-animation', settings, forOpening, testMode, actor);
+ }
+
+ // This is called at each frame during the animation.
+ updateAnimation(progress) {
+ // Store the current progress value. The corresponding signal is emitted each frame
+ // in vfunc_paint_target. We do not emit it here, as the pipeline which may be used
+ // by handlers must not have been created yet.
+ this._progress = progress;
+
+ this.queue_repaint();
+ }
+
+ // This will stop any running animation and emit the end-animation signal.
+ endAnimation() {
+ // This will call endAnimation() again, so we can return for now.
+ if (this._timeline.is_playing()) {
+ this._timeline.stop();
+ return;
}
- // This is called by the constructor. This means, it's only called when the
- // effect is used for the first time.
- vfunc_build_pipeline() {
+ // Restore unredirecting behavior for fullscreen windows.
+ Meta.enable_unredirect_for_display(global.display);
+ global.end_work();
- // Shell.GLSLEffect requires the declarations and the main source code as separate
- // strings. As it's more convenient to store the in one GLSL file, we use a regex
- // here to split the source code in two parts.
- const code = this._loadShaderResource(`/shaders/${this._nick}.frag`);
+ this.emit('end-animation');
+ }
- // Match anything between the curly brackets of "void main() {...}".
- const regex = RegExp('void main *\\(\\) *\\{([\\S\\s]+)\\}');
- const match = regex.exec(code);
+ // This is called by the constructor. This means, it's only called when the
+ // effect is used for the first time.
+ vfunc_build_pipeline() {
+ // Shell.GLSLEffect requires the declarations and the main source code as separate
+ // strings. As it's more convenient to store the in one GLSL file, we use a regex
+ // here to split the source code in two parts.
+ const code = this._loadShaderResource(`/shaders/${this._nick}.frag`);
- const declarations = code.substr(0, match.index);
- const main = match[1];
+ // Match anything between the curly brackets of "void main() {...}".
+ const regex = RegExp('void main *\\(\\) *\\{([\\S\\s]+)\\}');
+ const match = regex.exec(code);
- this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT, declarations, main, true);
- }
+ const declarations = code.substr(0, match.index);
+ const main = match[1];
- // We use this vfunc to trigger the update as it allows calling this.get_pipeline() in
- // the handler. This could still be null if called from the updateAnimation() above.
- vfunc_paint_target(...params) {
- this.emit('update-animation', this._progress);
+ this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT, declarations, main, true);
+ }
- // Starting with GNOME 44.2, the alpha channel is not written to by default. We need
- // to undo this. It is a pity that we have to do this here, as it is not really
- // required to be done each frame. But it's the only place where we can do it.
- // https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650
- this.get_pipeline().set_blend(
- 'RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))');
+ // We use this vfunc to trigger the update as it allows calling this.get_pipeline() in
+ // the handler. This could still be null if called from the updateAnimation() above.
+ vfunc_paint_target(...params) {
+ this.emit('update-animation', this._progress);
- this.set_uniform_float(this._uProgress, 1, [this._progress]);
- super.vfunc_paint_target(...params);
- }
+ // Starting with GNOME 44.2, the alpha channel is not written to by default. We need
+ // to undo this. It is a pity that we have to do this here, as it is not really
+ // required to be done each frame. But it's the only place where we can do it.
+ // https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650
+ this.get_pipeline().set_blend(
+ 'RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))');
- // --------------------------------------------------------------------- private stuff
+ this.set_uniform_float(this._uProgress, 1, [this._progress]);
+ super.vfunc_paint_target(...params);
+ }
- // This loads a GLSL file from the extension's resources to a JavaScript string. The
- // code from "common.glsl" is prepended automatically.
- _loadShaderResource(path) {
- let common = utils.getStringResource('/shaders/common.glsl');
- let code = utils.getStringResource(path);
+ // --------------------------------------------------------------------- private stuff
- // Add a trailing newline. Else the GLSL compiler complains...
- return common + '\n' + code + '\n';
- }
- });
+ // This loads a GLSL file from the extension's resources to a JavaScript string. The
+ // code from "common.glsl" is prepended automatically.
+ _loadShaderResource(path) {
+ let common = utils.getStringResource('/shaders/common.glsl');
+ let code = utils.getStringResource(path);
+
+ // Add a trailing newline. Else the GLSL compiler complains...
+ return common + '\n' + code + '\n';
+ }
+});
diff --git a/src/ShaderFactory.js b/src/ShaderFactory.js
index c73e2fe..6056262 100644
--- a/src/ShaderFactory.js
+++ b/src/ShaderFactory.js
@@ -91,4 +91,4 @@ export default class ShaderFactory {
return shader;
}
-}
+}
\ No newline at end of file
diff --git a/src/effects/AuraGlow.js b/src/effects/AuraGlow.js
new file mode 100644
index 0000000..b3e772b
--- /dev/null
+++ b/src/effects/AuraGlow.js
@@ -0,0 +1,136 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza
+// SPDX-FileCopyrightText: Simon Schneegans
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import the ShaderFactory only in the Shell process as it is not required in the
+// preferences process. The preferences process does not create any shader instances, it
+// only uses the static metadata of the effect.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect was inspired by apple's new siri effect. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// The effect class can be used to get some metadata (like the effect's name or supported
+// GNOME Shell versions), to initialize the respective page of the settings dialog, as
+// well as to create the actual shader for the effect.
+export default class Effect {
+ // The constructor creates a ShaderFactory which will be used by extension.js to create
+ // shader instances for this effect. The shaders will be automagically created using the
+ // GLSL file in resources/shaders/.glsl. The callback will be called for each
+ // newly created shader instance.
+
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Store uniform locations of newly created shaders.
+ shader._uColorSpeed = shader.get_uniform_location('uColorSpeed');
+ shader._uRandomColorOffset = shader.get_uniform_location('uRandomColorOffset');
+ shader._uColorOffset = shader.get_uniform_location('uColorOffset');
+ shader._uColorSaturation = shader.get_uniform_location('uColorSaturation');
+ shader._uEdgeSize = shader.get_uniform_location('uEdgeSize');
+ shader._uEdgeHardness = shader.get_uniform_location('uEdgeHardness');
+ shader._uBlur = shader.get_uniform_location('uBlur');
+ shader._uSeed = shader.get_uniform_location('uSeed');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uColorSpeed, 1, [settings.get_double('aura-glow-color-speed')]);
+ shader.set_uniform_float(shader._uRandomColorOffset, 1, [settings.get_boolean('aura-glow-random-color')]);
+ shader.set_uniform_float(shader._uColorOffset, 1, [settings.get_double('aura-glow-color-offset')]);
+ shader.set_uniform_float(shader._uColorSaturation, 1, [settings.get_double('aura-glow-color-saturation')]);
+ shader.set_uniform_float(shader._uEdgeSize, 1, [settings.get_double('aura-glow-edge-size')]);
+ shader.set_uniform_float(shader._uEdgeHardness, 1, [settings.get_double('aura-glow-edge-hardness')]);
+ shader.set_uniform_float(shader._uBlur, 1, [settings.get_double('aura-glow-blur')]);
+ shader.set_uniform_float(shader._uSeed, 2, [Math.random(), Math.random()]);
+ // clang-format on
+ });
+ });
+ }
+
+
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // The effect is available on all GNOME Shell versions supported by this extension.
+ static getMinShellVersion() {
+ return [3, 36];
+ }
+
+ // This will be called in various places where a unique identifier for this effect is
+ // required. It should match the prefix of the settings keys which store whether the
+ // effect is enabled currently (e.g. '*-enable-effect'), and its animation time
+ // (e.g. '*-animation-time'). Also, the shader file and the settings UI files should be
+ // named likes this.
+ static getNick() {
+ return 'aura-glow';
+ }
+
+ // This will be shown in the sidebar of the preferences dialog as well as in the
+ // drop-down menus where the user can choose the effect.
+ static getLabel() {
+ return _('Aura Glow');
+ }
+
+ // -------------------------------------------------------------------- API for prefs.js
+
+ // This is called by the preferences dialog whenever a new effect profile is loaded. It
+ // binds all user interface elements to the respective settings keys of the profile.
+ static bindPreferences(dialog) {
+ dialog.bindAdjustment('aura-glow-animation-time');
+ dialog.bindAdjustment('aura-glow-color-speed');
+ dialog.bindSwitch('aura-glow-random-color');
+ dialog.bindAdjustment('aura-glow-color-offset');
+ dialog.bindAdjustment('aura-glow-color-saturation');
+ dialog.bindAdjustment('aura-glow-edge-size');
+ dialog.bindAdjustment('aura-glow-edge-hardness');
+ dialog.bindAdjustment('aura-glow-blur');
+
+ // enable and disable the one slider
+ function enableDisablePref(dialog, state) {
+ dialog.getBuilder()
+ .get_object('aura-glow-color-offset-scale')
+ .set_sensitive(!state);
+ }
+
+ const switchWidget = dialog.getBuilder().get_object('aura-glow-random-color');
+
+ // Connect to the "state-set" signal to update preferences dynamically based on
+ // the switch state.
+ switchWidget.connect('state-set', (widget, state) => {
+ enableDisablePref(dialog, state); // Update sensitivity when the state changes.
+ });
+
+ // Manually call the update function on startup, using the initial state of the
+ // switch.
+ const initialState =
+ switchWidget.get_active(); // Get the current state of the switch.
+ enableDisablePref(dialog, initialState);
+ }
+
+ // ---------------------------------------------------------------- API for extension.js
+
+ // The getActorScale() is called from extension.js to adjust the actor's size during the
+ // animation. This is useful if the effect requires drawing something beyond the usual
+ // bounds of the actor. This only works for GNOME 3.38+.
+ static getActorScale(settings, forOpening, actor) {
+ return {x: 1.0, y: 1.0};
+ }
+}
\ No newline at end of file
diff --git a/src/effects/Fire.js b/src/effects/Fire.js
index 6ea498d..b325fac 100644
--- a/src/effects/Fire.js
+++ b/src/effects/Fire.js
@@ -195,6 +195,17 @@ export default class Effect {
color3: 'rgba(207,235,255,0.84)',
color4: 'rgb(208,243,255)',
color5: 'rgb(255,255,255)'
+ },
+ // i don't think he'll notice if i sneak this in
+ {
+ name: _('Nuclear ☢️'),
+ scale: 1.5,
+ speed: 0.5,
+ color1: 'rgba(0,0,0,0)',
+ color2: 'rgba(2, 40, 0, 0.3)',
+ color3: 'rgba(0, 200, 50, 0.9)',
+ color4: 'rgba(255, 255, 0, 1.0)',
+ color5: 'rgba(255, 255, 255, 1.0)'
}
];
diff --git a/src/effects/Mushroom.js b/src/effects/Mushroom.js
new file mode 100644
index 0000000..928aedd
--- /dev/null
+++ b/src/effects/Mushroom.js
@@ -0,0 +1,389 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza JGarza9788@gmail.com
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+// Import the Gio module from the GNOME platform (GObject Introspection).
+// This module provides APIs for I/O operations, settings management, and other core
+// features.
+import Gio from 'gi://Gio';
+
+// Import utility functions from the local utils.js file.
+// These utilities likely contain helper functions or shared logic used across the
+// application.
+import * as utils from '../utils.js';
+
+// We import the ShaderFactory only in the Shell process as it is not required in the
+// preferences process. The preferences process does not create any shader instances, it
+// only uses the static metadata of the effect.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect is inspired by the old 8bit mario video games and the New Super Mario //
+// Bros 2 specifically when mario gets the mushroom. i hope you enjoy this little blast //
+// from the past. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// The effect class can be used to get some metadata (like the effect's name or supported
+// GNOME Shell versions), to initialize the respective page of the settings dialog, as
+// well as to create the actual shader for the effect.
+export default class Effect {
+ // The constructor creates a ShaderFactory which will be used by extension.js to create
+ // shader instances for this effect. The shaders will be automagically created using the
+ // GLSL file in resources/shaders/.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // very basic effect... so nothing here
+
+ shader._uGradient = [
+ shader.get_uniform_location('uStarColor0'),
+ shader.get_uniform_location('uStarColor1'),
+ shader.get_uniform_location('uStarColor2'),
+ shader.get_uniform_location('uStarColor3'),
+ shader.get_uniform_location('uStarColor4'),
+ shader.get_uniform_location('uStarColor5'),
+ ];
+
+
+ shader._uScaleStyle = shader.get_uniform_location('uScaleStyle');
+
+ shader._uSparkCount = shader.get_uniform_location('uSparkCount');
+ shader._uSparkColor = shader.get_uniform_location('uSparkColor');
+ shader._uSparkRotation = shader.get_uniform_location('uSparkRotation');
+
+ shader._uRaysColor = shader.get_uniform_location('uRaysColor');
+
+ shader._uRingCount = shader.get_uniform_location('uRingCount');
+ shader._uRingRotation = shader.get_uniform_location('uRingRotation');
+ shader._uStarCount = shader.get_uniform_location('uStarCount');
+
+ shader._uSeed = shader.get_uniform_location('uSeed');
+
+ // And update all uniforms at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ for (let i = 0; i <= 5; i++) {
+ shader.set_uniform_float(
+ shader._uGradient[i], 4,
+ utils.parseColor(settings.get_string('mushroom-star-color-' + i)));
+ }
+
+ // clang-format off
+
+ shader.set_uniform_float(shader._uScaleStyle, 1, [settings.get_double('mushroom-scale-style')]);
+
+ shader.set_uniform_float(shader._uSparkCount, 1, [settings.get_int('mushroom-spark-count')]);
+ shader.set_uniform_float(shader._uSparkColor, 4, utils.parseColor(settings.get_string('mushroom-spark-color')));
+ shader.set_uniform_float(shader._uSparkRotation, 1, [settings.get_double('mushroom-spark-rotation')]);
+
+ shader.set_uniform_float(shader._uRaysColor, 4, utils.parseColor(settings.get_string('mushroom-rays-color')));
+
+ shader.set_uniform_float(shader._uRingCount, 1, [settings.get_int('mushroom-ring-count')]);
+ shader.set_uniform_float(shader._uRingRotation, 1, [settings.get_double('mushroom-ring-rotation')]);
+ shader.set_uniform_float(shader._uStarCount, 1, [settings.get_int('mushroom-star-count')]);
+
+ shader.set_uniform_float(shader._uSeed, 2, [Math.random(), Math.random()]);
+
+ // clang-format on
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // The effect is available on all GNOME Shell versions supported by this extension.
+ static getMinShellVersion() {
+ return [3, 36];
+ }
+
+ // This will be called in various places where a unique identifier for this effect is
+ // required. It should match the prefix of the settings keys which store whether the
+ // effect is enabled currently (e.g. '*-enable-effect'), and its animation time
+ // (e.g. '*-animation-time'). Also, the shader file and the settings UI files should be
+ // named likes this.
+ static getNick() {
+ return 'mushroom';
+ }
+
+ // This will be shown in the sidebar of the preferences dialog as well as in the
+ // drop-down menus where the user can choose the effect.
+ static getLabel() {
+ return _('Mushroom');
+ }
+
+ // -------------------------------------------------------------------- API for prefs.js
+
+ // This is called by the preferences dialog whenever a new effect profile is loaded. It
+ // binds all user interface elements to the respective settings keys of the profile.
+ static bindPreferences(dialog) {
+ // Empty for now... Code is added here later in the tutorial!
+ dialog.bindAdjustment('mushroom-animation-time');
+ // dialog.bindSwitch('mushroom-8bit-enable');
+
+ dialog.bindAdjustment('mushroom-scale-style');
+
+ dialog.bindAdjustment('mushroom-spark-count');
+ dialog.bindColorButton('mushroom-spark-color');
+ dialog.bindAdjustment('mushroom-spark-rotation');
+
+ dialog.bindColorButton('mushroom-rays-color');
+
+ dialog.bindAdjustment('mushroom-ring-count');
+ dialog.bindAdjustment('mushroom-ring-rotation');
+ dialog.bindAdjustment('mushroom-star-count');
+
+ dialog.bindColorButton('mushroom-star-color-0');
+ dialog.bindColorButton('mushroom-star-color-1');
+ dialog.bindColorButton('mushroom-star-color-2');
+ dialog.bindColorButton('mushroom-star-color-3');
+ dialog.bindColorButton('mushroom-star-color-4');
+ dialog.bindColorButton('mushroom-star-color-5');
+
+
+ // Ensure the button connections and other bindings happen only once,
+ // even if the bindPreferences function is called multiple times.
+ if (!Effect._isConnected) {
+ Effect._isConnected = true;
+
+ // Bind the "reset-star-colors" button to reset all star colors to their default
+ // values.
+ dialog.getBuilder().get_object('reset-star-colors').connect('clicked', () => {
+ // Reset each mushroom star color setting.
+ dialog.getProfileSettings().reset('mushroom-star-color-0');
+ dialog.getProfileSettings().reset('mushroom-star-color-1');
+ dialog.getProfileSettings().reset('mushroom-star-color-2');
+ dialog.getProfileSettings().reset('mushroom-star-color-3');
+ dialog.getProfileSettings().reset('mushroom-star-color-4');
+ dialog.getProfileSettings().reset('mushroom-star-color-5');
+ });
+
+
+ // Initialize the preset dropdown menu for mushroom star colors.
+ Effect._createMushroomPresets(dialog);
+ }
+ }
+
+ // ---------------------------------------------------------------- API for extension.js
+
+ // The getActorScale() is called from extension.js to adjust the actor's size during the
+ // animation. This is useful if the effect requires drawing something beyond the usual
+ // bounds of the actor. This only works for GNOME 3.38+.
+ static getActorScale(settings, forOpening, actor) {
+ return {x: 1.0, y: 1.0};
+ }
+
+ // ---------------------------------------------------------------- Presets
+
+ // This function initializes the preset dropdown menu for configuring fire options.
+ // It defines multiple color presets for the "mushroom star" effect and sets up
+ // the logic to apply these presets when selected.
+
+ static _createMushroomPresets(dialog) {
+ // Retrieve the builder object for the dialog and connect to the "realize" event of
+ // the button.
+ dialog.getBuilder()
+ .get_object('mushroom-star-color-preset-button')
+ .connect('realize', (widget) => {
+ // Define an array of color presets, each with a name and six color values (RGBA
+ // format).
+ const presets = [
+ {
+ name: _('8Bit Plumber'),
+ ScaleStyle: 0.0,
+ SparkCount: 0,
+ SparkColor: 'rgba(255,255,255,0.0)',
+ SparkRotation: 0.33,
+ RayColor: 'rgba(255,255,255,0.0)',
+ RingCount: 0,
+ RingRotation: 0.0,
+ StarCount: 0,
+ color0: 'rgba(233,249,0,1.0)',
+ color1: 'rgba(233,249,0,1.0)',
+ color2: 'rgba(91,255,0,1.0)',
+ color3: 'rgba(91,255,0,1.0)',
+ color4: 'rgba(0,240,236,1.0)',
+ color5: 'rgba(0,240,236,1.0)',
+ },
+ {
+ name: _('New Bros 2 🍄'),
+ ScaleStyle: 1.0,
+ SparkCount: 4,
+ SparkColor: 'rgba(255,255,255,1.0)',
+ SparkRotation: 0.3,
+ RayColor: 'rgba(255,255,255,1.0)',
+ RingCount: 3,
+ RingRotation: 1.33,
+ StarCount: 5,
+ color0: 'rgba(233,249,0,1.0)',
+ color1: 'rgba(233,249,0,1.0)',
+ color2: 'rgba(91,255,0,1.0)',
+ color3: 'rgba(91,255,0,1.0)',
+ color4: 'rgba(0,240,236,1.0)',
+ color5: 'rgba(0,240,236,1.0)',
+ },
+ {
+ name:
+ _('Red White and Blue 🇺🇸'), // A patriotic palette of red, white, and blue
+ ScaleStyle: 1.0,
+ SparkCount: 4,
+ SparkColor: 'rgba(255,255,255,1.0)',
+ SparkRotation: 0.3,
+ RayColor: 'rgba(255,255,255,0.0)',
+ RingCount: 3,
+ RingRotation: 1.33,
+ StarCount: 5,
+ color0: 'rgba(255, 0, 0, 1.0)',
+ color1: 'rgba(255, 0, 0, 1.0)',
+ color2: 'rgba(255,255,255, 1.0)',
+ color3: 'rgba(255,255,255, 1.0)',
+ color4: 'rgba(0,0,255, 1.0)',
+ color5: 'rgba(0,0,255, 1.0)'
+ },
+ {
+ name: _('Rainbow 🌈'), // A vivid rainbow spectrum of colors
+ ScaleStyle: 1.0,
+ SparkCount: 4,
+ SparkColor: 'rgba(255,255,255,1.0)',
+ SparkRotation: 0.3,
+ RayColor: 'rgba(255,255,255,0.0)',
+ RingCount: 3,
+ RingRotation: 2.0,
+ StarCount: 7,
+ color0: 'rgba(255, 69, 58, 1.0)', // Bold Red
+ color1: 'rgba(255, 140, 0, 1.0)', // Bold Orange
+ color2: 'rgba(255, 223, 0, 1.0)', // Bold Yellow
+ color3: 'rgba(50, 205, 50, 1.0)', // Bold Green
+ color4: 'rgba(30, 144, 255, 1.0)', // Bold Blue
+ color5: 'rgba(148, 0, 211, 1.0)' // Bold Purple
+ },
+ {
+ name: _('Cattuccino 😺'), // A soft pastel palette inspired by a
+ // cappuccino theme
+ ScaleStyle: 1.0,
+ SparkCount: 4,
+ SparkColor: 'rgba(255,255,255,1.0)',
+ SparkRotation: 0.3,
+ RayColor: 'rgba(255,255,255,0.0)',
+ RingCount: 3,
+ RingRotation: 2.0,
+ StarCount: 7,
+ color0: 'rgba(239, 146, 160, 1.0)',
+ color1: 'rgba(246, 178, 138, 1.0)',
+ color2: 'rgba(240, 217, 169, 1.0)',
+ color3: 'rgba(175, 223, 159, 1.0)',
+ color4: 'rgba(149, 182, 246, 1.0)',
+ color5: 'rgba(205, 170, 247, 1.0)'
+ },
+ {
+ name: _('Dracula 🦇'), // A dark palette inspired by the Dracula theme
+ ScaleStyle: 1.0,
+ SparkCount: 0,
+ SparkColor: 'rgba(255,255,255,1.0)',
+ SparkRotation: 0.3,
+ RayColor: 'rgba(255,255,255,0.0)',
+ RingCount: 3,
+ RingRotation: 2.0,
+ StarCount: 7,
+ color0: 'rgba(40, 42, 54, 1.0)', // Dark Grey
+ color1: 'rgba(68, 71, 90, 1.0)', // Medium Grey
+ color2: 'rgba(90, 94, 119, 1.0)', // Light Grey
+ color3: 'rgba(90, 94, 119, 1.0)', // Light Grey
+ color4: 'rgba(68, 71, 90, 1.0)', // Medium Grey
+ color5: 'rgba(40, 42, 54, 1.0)' // Dark Grey
+ },
+ {
+ name: _('Sparkle ✨'), // A dark palette inspired by the Dracula theme
+ ScaleStyle: 1.0,
+ SparkCount: 25,
+ SparkColor: 'rgba(255,255,255,1.0)',
+ SparkRotation: 0.3,
+ RayColor: 'rgba(255,255,255,0.0)',
+ RingCount: 0,
+ RingRotation: 1.33,
+ StarCount: 7,
+ color0: 'rgba(255,255,255,0.0)',
+ color1: 'rgba(255,255,255,0.0)',
+ color2: 'rgba(255,255,255,0.0)',
+ color3: 'rgba(255,255,255,0.0)',
+ color4: 'rgba(255,255,255,0.0)',
+ color5: 'rgba(255,255,255,0.0)',
+ }
+ ];
+
+ // Create a new menu model to hold the presets and an action group for handling
+ // selections.
+ const menu = Gio.Menu.new();
+ const group = Gio.SimpleActionGroup.new();
+ const groupName = 'presets';
+
+ // Iterate over the presets to populate the menu.
+ presets.forEach((preset, i) => {
+ // Define an action name based on the preset index.
+ const actionName = 'mushroom' + i;
+
+ // Append the preset name to the menu.
+ menu.append(preset.name, groupName + '.' + actionName);
+
+ // Create a new action for the preset.
+ let action = Gio.SimpleAction.new(actionName, null);
+
+ // Connect the action to a function that loads the preset colors into the
+ // dialog.
+ action.connect('activate', () => {
+ dialog.getProfileSettings().set_double('mushroom-scale-style',
+ preset.ScaleStyle);
+ dialog.getProfileSettings().set_int('mushroom-spark-count',
+ preset.SparkCount);
+ dialog.getProfileSettings().set_string('mushroom-spark-color',
+ preset.SparkColor);
+ dialog.getProfileSettings().set_double('mushroom-spark-rotation',
+ preset.SparkRotation);
+ dialog.getProfileSettings().set_string('mushroom-rays-color',
+ preset.RayColor);
+ dialog.getProfileSettings().set_int('mushroom-ring-count', preset.RingCount);
+ dialog.getProfileSettings().set_double('mushroom-ring-rotation',
+ preset.RingRotation);
+ dialog.getProfileSettings().set_int('mushroom-star-count', preset.StarCount);
+
+ dialog.getProfileSettings().set_string('mushroom-star-color-0',
+ preset.color0);
+ dialog.getProfileSettings().set_string('mushroom-star-color-1',
+ preset.color1);
+ dialog.getProfileSettings().set_string('mushroom-star-color-2',
+ preset.color2);
+ dialog.getProfileSettings().set_string('mushroom-star-color-3',
+ preset.color3);
+ dialog.getProfileSettings().set_string('mushroom-star-color-4',
+ preset.color4);
+ dialog.getProfileSettings().set_string('mushroom-star-color-5',
+ preset.color5);
+ });
+
+ // Add the action to the action group.
+ group.add_action(action);
+ });
+
+ // Assign the populated menu to the preset button.
+ dialog.getBuilder()
+ .get_object('mushroom-star-color-preset-button')
+ .set_menu_model(menu);
+
+ // Insert the action group into the root widget for handling the presets.
+ const root = widget.get_root();
+ root.insert_action_group(groupName, group);
+ });
+ }
+}
diff --git a/src/effects/RGBWarp.js b/src/effects/RGBWarp.js
new file mode 100644
index 0000000..e8ab802
--- /dev/null
+++ b/src/effects/RGBWarp.js
@@ -0,0 +1,100 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza JGarza9788@gmail.com
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import the ShaderFactory only in the Shell process as it is not required in the
+// preferences process. The preferences process does not create any shader instances, it
+// only uses the static metadata of the effect.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect warps the Red Green Blue values //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// The effect class can be used to get some metadata (like the effect's name or supported
+// GNOME Shell versions), to initialize the respective page of the settings dialog, as
+// well as to create the actual shader for the effect.
+export default class Effect {
+ // The constructor creates a ShaderFactory which will be used by extension.js to create
+ // shader instances for this effect. The shaders will be automagically created using the
+ // GLSL file in resources/shaders/.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Store uniform locations of newly created shaders.
+ shader._uBrightness = shader.get_uniform_location('uBrightness');
+ shader._uSpeedR = shader.get_uniform_location('uSpeedR');
+ shader._uSpeedG = shader.get_uniform_location('uSpeedG');
+ shader._uSpeedB = shader.get_uniform_location('uSpeedB');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uBrightness, 1, [settings.get_double('rgbwarp-brightness')]);
+ shader.set_uniform_float(shader._uSpeedR, 1, [settings.get_double('rgbwarp-speed-r')]);
+ shader.set_uniform_float(shader._uSpeedG, 1, [settings.get_double('rgbwarp-speed-g')]);
+ shader.set_uniform_float(shader._uSpeedB, 1, [settings.get_double('rgbwarp-speed-b')]);
+ // clang-format on
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // The effect is available on all GNOME Shell versions supported by this extension.
+ static getMinShellVersion() {
+ return [3, 36];
+ }
+
+ // This will be called in various places where a unique identifier for this effect is
+ // required. It should match the prefix of the settings keys which store whether the
+ // effect is enabled currently (e.g. '*-enable-effect'), and its animation time
+ // (e.g. '*-animation-time'). Also, the shader file and the settings UI files should be
+ // named likes this.
+ static getNick() {
+ return 'rgbwarp';
+ }
+
+ // This will be shown in the sidebar of the preferences dialog as well as in the
+ // drop-down menus where the user can choose the effect.
+ static getLabel() {
+ return _('RGB Warp');
+ }
+
+ // -------------------------------------------------------------------- API for prefs.js
+
+ // This is called by the preferences dialog whenever a new effect profile is loaded. It
+ // binds all user interface elements to the respective settings keys of the profile.
+ static bindPreferences(dialog) {
+ dialog.bindAdjustment('rgbwarp-animation-time');
+ dialog.bindAdjustment('rgbwarp-brightness');
+ dialog.bindAdjustment('rgbwarp-speed-r');
+ dialog.bindAdjustment('rgbwarp-speed-g');
+ dialog.bindAdjustment('rgbwarp-speed-b');
+ }
+
+ // ---------------------------------------------------------------- API for extension.js
+
+ // The getActorScale() is called from extension.js to adjust the actor's size during the
+ // animation. This is useful if the effect requires drawing something beyond the usual
+ // bounds of the actor. This only works for GNOME 3.38+.
+ static getActorScale(settings, forOpening, actor) {
+ return {x: 1.0, y: 1.0};
+ }
+}
\ No newline at end of file
diff --git a/src/effects/TeamRocket.js b/src/effects/TeamRocket.js
new file mode 100644
index 0000000..632b8b3
--- /dev/null
+++ b/src/effects/TeamRocket.js
@@ -0,0 +1,114 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza JGarza9788@gmail.com
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import the ShaderFactory only in the Shell process as it is not required in the
+// preferences process. The preferences process does not create any shader instances, it
+// only uses the static metadata of the effect.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect was inspired by Team Rocket Blasting Off again! //
+// https://c.tenor.com/0ag0MVXUaQEAAAAd/tenor.gif //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// The effect class can be used to get some metadata (like the effect's name or supported
+// GNOME Shell versions), to initialize the respective page of the settings dialog, as
+// well as to create the actual shader for the effect.
+export default class Effect {
+ // The constructor creates a ShaderFactory which will be used by extension.js to create
+ // shader instances for this effect. The shaders will be automagically created using the
+ // GLSL file in resources/shaders/.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Store uniform locations of newly created shaders.
+ shader._uWT = shader.get_uniform_location('uWT');
+ shader._uXpos = shader.get_uniform_location('uXpos');
+ shader._uYpos = shader.get_uniform_location('uYpos');
+ shader._uWinRot = shader.get_uniform_location('uWinRot');
+ shader._uSparkleRot = shader.get_uniform_location('uSparkleRot');
+ shader._uSparkleSize = shader.get_uniform_location('uSparkleSize');
+
+ shader._uSeed = shader.get_uniform_location('uSeed');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uWT, 1, [settings.get_double('team-rocket-window-time')]);
+ shader.set_uniform_float(shader._uXpos, 1, [settings.get_double('team-rocket-x')]);
+ shader.set_uniform_float(shader._uYpos, 1, [settings.get_double('team-rocket-y')]);
+ shader.set_uniform_float(shader._uWinRot, 1, [settings.get_boolean('team-rocket-win-rot')]);
+ shader.set_uniform_float(shader._uSparkleRot, 1, [settings.get_double('team-rocket-sparkle-rot')]);
+ shader.set_uniform_float(shader._uSparkleSize, 1, [settings.get_double('team-rocket-sparkle-size')]);
+ // clang-format on
+
+ // This will be used with a hash function to get a random number.
+ shader.set_uniform_float(shader._uSeed, 2, [Math.random(), Math.random()]);
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // The effect is available on all GNOME Shell versions supported by this extension.
+ static getMinShellVersion() {
+ return [3, 36];
+ }
+
+ // This will be called in various places where a unique identifier for this effect is
+ // required. It should match the prefix of the settings keys which store whether the
+ // effect is enabled currently (e.g. '*-enable-effect'), and its animation time
+ // (e.g. '*-animation-time'). Also, the shader file and the settings UI files should be
+ // named likes this.
+ static getNick() {
+ return 'team-rocket';
+ }
+
+ // This will be shown in the sidebar of the preferences dialog as well as in the
+ // drop-down menus where the user can choose the effect.
+ static getLabel() {
+ return _('Team Rocket');
+ }
+
+ // -------------------------------------------------------------------- API for prefs.js
+
+ // This is called by the preferences dialog whenever a new effect profile is loaded. It
+ // binds all user interface elements to the respective settings keys of the profile.
+ static bindPreferences(dialog) {
+ dialog.bindAdjustment('team-rocket-animation-time');
+ dialog.bindAdjustment('team-rocket-window-time');
+ dialog.bindAdjustment('team-rocket-x');
+ dialog.bindAdjustment('team-rocket-y');
+
+ dialog.bindSwitch('team-rocket-win-rot');
+
+ dialog.bindAdjustment('team-rocket-sparkle-rot');
+ dialog.bindAdjustment('team-rocket-sparkle-size');
+ }
+
+ // ---------------------------------------------------------------- API for extension.js
+
+ // The getActorScale() is called from extension.js to adjust the actor's size during the
+ // animation. This is useful if the effect requires drawing something beyond the usual
+ // bounds of the actor. This only works for GNOME 3.38+.
+ static getActorScale(settings, forOpening, actor) {
+ return {x: 1.0, y: 1.0};
+ }
+}
diff --git a/tests/generate-references.sh b/tests/generate-references.sh
index dab097b..5cc6837 100755
--- a/tests/generate-references.sh
+++ b/tests/generate-references.sh
@@ -182,6 +182,10 @@ send_keystroke "Alt+F4"
echo "Entering test mode."
set_setting "test-mode" true
+capture_effect "apparition"
+capture_effect "broken-glass"
+capture_effect "aura-glow"
+capture_effect "doom"
capture_effect "energize-a"
capture_effect "energize-b"
capture_effect "fire"
@@ -190,24 +194,17 @@ capture_effect "glide"
capture_effect "glitch"
capture_effect "hexagon"
capture_effect "incinerate"
+capture_effect "matrix"
capture_effect "pixelate"
capture_effect "pixel-wheel"
capture_effect "pixel-wipe"
capture_effect "portal"
+capture_effect "rgb-warp"
+capture_effect "snap"
+capture_effect "team-rocket"
+capture_effect "trex"
capture_effect "tv"
capture_effect "tv-glitch"
capture_effect "wisps"
-if [[ "${FEDORA_VERSION}" -gt 32 ]] || [[ "${FEDORA_VERSION}" == "rawhide" ]]; then
- capture_effect "apparition"
- capture_effect "doom"
-fi
-
-if [[ "${FEDORA_VERSION}" -gt 33 ]] || [[ "${FEDORA_VERSION}" == "rawhide" ]]; then
- capture_effect "trex"
- capture_effect "broken-glass"
- capture_effect "matrix"
- capture_effect "snap"
-fi
-
echo "All reference images generated successfully."
diff --git a/tests/references/apparition-close-gnome-xsession-39.png b/tests/references/apparition-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 90d03b8..58e278e
Binary files a/tests/references/apparition-close-gnome-xsession-39.png and b/tests/references/apparition-close-gnome-xsession-39.png differ
diff --git a/tests/references/apparition-close-gnome-xsession-40.png b/tests/references/apparition-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index d7929d0..de1217a
Binary files a/tests/references/apparition-close-gnome-xsession-40.png and b/tests/references/apparition-close-gnome-xsession-40.png differ
diff --git a/tests/references/apparition-close-gnome-xsession-41.png b/tests/references/apparition-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 6137322..201432f
Binary files a/tests/references/apparition-close-gnome-xsession-41.png and b/tests/references/apparition-close-gnome-xsession-41.png differ
diff --git a/tests/references/apparition-open-gnome-xsession-39.png b/tests/references/apparition-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 6d41346..312b537
Binary files a/tests/references/apparition-open-gnome-xsession-39.png and b/tests/references/apparition-open-gnome-xsession-39.png differ
diff --git a/tests/references/apparition-open-gnome-xsession-40.png b/tests/references/apparition-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index b186239..5837521
Binary files a/tests/references/apparition-open-gnome-xsession-40.png and b/tests/references/apparition-open-gnome-xsession-40.png differ
diff --git a/tests/references/apparition-open-gnome-xsession-41.png b/tests/references/apparition-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index bf0f683..f5f7a9d
Binary files a/tests/references/apparition-open-gnome-xsession-41.png and b/tests/references/apparition-open-gnome-xsession-41.png differ
diff --git a/tests/references/aura-glow-close-gnome-xsession-39.png b/tests/references/aura-glow-close-gnome-xsession-39.png
new file mode 100755
index 0000000..c215f7f
Binary files /dev/null and b/tests/references/aura-glow-close-gnome-xsession-39.png differ
diff --git a/tests/references/aura-glow-close-gnome-xsession-40.png b/tests/references/aura-glow-close-gnome-xsession-40.png
new file mode 100755
index 0000000..24af191
Binary files /dev/null and b/tests/references/aura-glow-close-gnome-xsession-40.png differ
diff --git a/tests/references/aura-glow-close-gnome-xsession-41.png b/tests/references/aura-glow-close-gnome-xsession-41.png
new file mode 100755
index 0000000..c62bd0e
Binary files /dev/null and b/tests/references/aura-glow-close-gnome-xsession-41.png differ
diff --git a/tests/references/aura-glow-open-gnome-xsession-39.png b/tests/references/aura-glow-open-gnome-xsession-39.png
new file mode 100755
index 0000000..926316a
Binary files /dev/null and b/tests/references/aura-glow-open-gnome-xsession-39.png differ
diff --git a/tests/references/aura-glow-open-gnome-xsession-40.png b/tests/references/aura-glow-open-gnome-xsession-40.png
new file mode 100755
index 0000000..c97782c
Binary files /dev/null and b/tests/references/aura-glow-open-gnome-xsession-40.png differ
diff --git a/tests/references/aura-glow-open-gnome-xsession-41.png b/tests/references/aura-glow-open-gnome-xsession-41.png
new file mode 100755
index 0000000..7131664
Binary files /dev/null and b/tests/references/aura-glow-open-gnome-xsession-41.png differ
diff --git a/tests/references/broken-glass-close-gnome-xsession-39.png b/tests/references/broken-glass-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 25cdc53..3c949b5
Binary files a/tests/references/broken-glass-close-gnome-xsession-39.png and b/tests/references/broken-glass-close-gnome-xsession-39.png differ
diff --git a/tests/references/broken-glass-close-gnome-xsession-40.png b/tests/references/broken-glass-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index baadd56..10235dd
Binary files a/tests/references/broken-glass-close-gnome-xsession-40.png and b/tests/references/broken-glass-close-gnome-xsession-40.png differ
diff --git a/tests/references/broken-glass-close-gnome-xsession-41.png b/tests/references/broken-glass-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 85ac616..4f6334b
Binary files a/tests/references/broken-glass-close-gnome-xsession-41.png and b/tests/references/broken-glass-close-gnome-xsession-41.png differ
diff --git a/tests/references/broken-glass-open-gnome-xsession-39.png b/tests/references/broken-glass-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 3e0ba4f..fa5bd12
Binary files a/tests/references/broken-glass-open-gnome-xsession-39.png and b/tests/references/broken-glass-open-gnome-xsession-39.png differ
diff --git a/tests/references/broken-glass-open-gnome-xsession-40.png b/tests/references/broken-glass-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 55ed3db..ff5dd40
Binary files a/tests/references/broken-glass-open-gnome-xsession-40.png and b/tests/references/broken-glass-open-gnome-xsession-40.png differ
diff --git a/tests/references/broken-glass-open-gnome-xsession-41.png b/tests/references/broken-glass-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 278f81c..4d530ee
Binary files a/tests/references/broken-glass-open-gnome-xsession-41.png and b/tests/references/broken-glass-open-gnome-xsession-41.png differ
diff --git a/tests/references/doom-close-gnome-xsession-39.png b/tests/references/doom-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 9433dd5..acd1095
Binary files a/tests/references/doom-close-gnome-xsession-39.png and b/tests/references/doom-close-gnome-xsession-39.png differ
diff --git a/tests/references/doom-close-gnome-xsession-40.png b/tests/references/doom-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 820831a..b6a7fca
Binary files a/tests/references/doom-close-gnome-xsession-40.png and b/tests/references/doom-close-gnome-xsession-40.png differ
diff --git a/tests/references/doom-close-gnome-xsession-41.png b/tests/references/doom-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index f547817..7653fe7
Binary files a/tests/references/doom-close-gnome-xsession-41.png and b/tests/references/doom-close-gnome-xsession-41.png differ
diff --git a/tests/references/doom-open-gnome-xsession-39.png b/tests/references/doom-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 1384c88..37dd7f8
Binary files a/tests/references/doom-open-gnome-xsession-39.png and b/tests/references/doom-open-gnome-xsession-39.png differ
diff --git a/tests/references/doom-open-gnome-xsession-40.png b/tests/references/doom-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 1ec6ac4..ea3f64c
Binary files a/tests/references/doom-open-gnome-xsession-40.png and b/tests/references/doom-open-gnome-xsession-40.png differ
diff --git a/tests/references/doom-open-gnome-xsession-41.png b/tests/references/doom-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 8e0239e..16c8b14
Binary files a/tests/references/doom-open-gnome-xsession-41.png and b/tests/references/doom-open-gnome-xsession-41.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-39.png b/tests/references/energize-a-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 9c3bb6e..28a2607
Binary files a/tests/references/energize-a-close-gnome-xsession-39.png and b/tests/references/energize-a-close-gnome-xsession-39.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-40.png b/tests/references/energize-a-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 03d4d13..e4a7e5e
Binary files a/tests/references/energize-a-close-gnome-xsession-40.png and b/tests/references/energize-a-close-gnome-xsession-40.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-41.png b/tests/references/energize-a-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 8786e9e..4352bee
Binary files a/tests/references/energize-a-close-gnome-xsession-41.png and b/tests/references/energize-a-close-gnome-xsession-41.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-39.png b/tests/references/energize-a-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 03fb888..c2ee9ff
Binary files a/tests/references/energize-a-open-gnome-xsession-39.png and b/tests/references/energize-a-open-gnome-xsession-39.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-40.png b/tests/references/energize-a-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 5fb34c0..e7780c2
Binary files a/tests/references/energize-a-open-gnome-xsession-40.png and b/tests/references/energize-a-open-gnome-xsession-40.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-41.png b/tests/references/energize-a-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index d308360..95ab914
Binary files a/tests/references/energize-a-open-gnome-xsession-41.png and b/tests/references/energize-a-open-gnome-xsession-41.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-39.png b/tests/references/energize-b-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 2ba1ae8..ea9d520
Binary files a/tests/references/energize-b-close-gnome-xsession-39.png and b/tests/references/energize-b-close-gnome-xsession-39.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-40.png b/tests/references/energize-b-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 8c2f044..6b42bf7
Binary files a/tests/references/energize-b-close-gnome-xsession-40.png and b/tests/references/energize-b-close-gnome-xsession-40.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-41.png b/tests/references/energize-b-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index f3241b6..8f23200
Binary files a/tests/references/energize-b-close-gnome-xsession-41.png and b/tests/references/energize-b-close-gnome-xsession-41.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-39.png b/tests/references/energize-b-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index e20344b..c32043c
Binary files a/tests/references/energize-b-open-gnome-xsession-39.png and b/tests/references/energize-b-open-gnome-xsession-39.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-40.png b/tests/references/energize-b-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 941a3ca..0668a60
Binary files a/tests/references/energize-b-open-gnome-xsession-40.png and b/tests/references/energize-b-open-gnome-xsession-40.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-41.png b/tests/references/energize-b-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 16f791f..5c7dd48
Binary files a/tests/references/energize-b-open-gnome-xsession-41.png and b/tests/references/energize-b-open-gnome-xsession-41.png differ
diff --git a/tests/references/fire-close-gnome-xsession-39.png b/tests/references/fire-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 4689f68..782bdd9
Binary files a/tests/references/fire-close-gnome-xsession-39.png and b/tests/references/fire-close-gnome-xsession-39.png differ
diff --git a/tests/references/fire-close-gnome-xsession-40.png b/tests/references/fire-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index fc34a25..444294c
Binary files a/tests/references/fire-close-gnome-xsession-40.png and b/tests/references/fire-close-gnome-xsession-40.png differ
diff --git a/tests/references/fire-close-gnome-xsession-41.png b/tests/references/fire-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 69247d3..ead9d3b
Binary files a/tests/references/fire-close-gnome-xsession-41.png and b/tests/references/fire-close-gnome-xsession-41.png differ
diff --git a/tests/references/fire-open-gnome-xsession-39.png b/tests/references/fire-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index e144055..2e5d101
Binary files a/tests/references/fire-open-gnome-xsession-39.png and b/tests/references/fire-open-gnome-xsession-39.png differ
diff --git a/tests/references/fire-open-gnome-xsession-40.png b/tests/references/fire-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index f589f99..c55b5a1
Binary files a/tests/references/fire-open-gnome-xsession-40.png and b/tests/references/fire-open-gnome-xsession-40.png differ
diff --git a/tests/references/fire-open-gnome-xsession-41.png b/tests/references/fire-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index c527beb..d54591f
Binary files a/tests/references/fire-open-gnome-xsession-41.png and b/tests/references/fire-open-gnome-xsession-41.png differ
diff --git a/tests/references/focus-close-gnome-xsession-39.png b/tests/references/focus-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index fed18eb..bcd9ddc
Binary files a/tests/references/focus-close-gnome-xsession-39.png and b/tests/references/focus-close-gnome-xsession-39.png differ
diff --git a/tests/references/focus-close-gnome-xsession-40.png b/tests/references/focus-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 6c50f15..dea8ece
Binary files a/tests/references/focus-close-gnome-xsession-40.png and b/tests/references/focus-close-gnome-xsession-40.png differ
diff --git a/tests/references/focus-close-gnome-xsession-41.png b/tests/references/focus-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index f136664..0ac1b06
Binary files a/tests/references/focus-close-gnome-xsession-41.png and b/tests/references/focus-close-gnome-xsession-41.png differ
diff --git a/tests/references/focus-open-gnome-xsession-39.png b/tests/references/focus-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 94caf9b..ee4ac33
Binary files a/tests/references/focus-open-gnome-xsession-39.png and b/tests/references/focus-open-gnome-xsession-39.png differ
diff --git a/tests/references/focus-open-gnome-xsession-40.png b/tests/references/focus-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 37d8dd6..98c1037
Binary files a/tests/references/focus-open-gnome-xsession-40.png and b/tests/references/focus-open-gnome-xsession-40.png differ
diff --git a/tests/references/focus-open-gnome-xsession-41.png b/tests/references/focus-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 78b4725..f5f6daa
Binary files a/tests/references/focus-open-gnome-xsession-41.png and b/tests/references/focus-open-gnome-xsession-41.png differ
diff --git a/tests/references/glide-close-gnome-xsession-39.png b/tests/references/glide-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 3a42061..62d1c84
Binary files a/tests/references/glide-close-gnome-xsession-39.png and b/tests/references/glide-close-gnome-xsession-39.png differ
diff --git a/tests/references/glide-close-gnome-xsession-40.png b/tests/references/glide-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 5d0ac42..35ef6d0
Binary files a/tests/references/glide-close-gnome-xsession-40.png and b/tests/references/glide-close-gnome-xsession-40.png differ
diff --git a/tests/references/glide-close-gnome-xsession-41.png b/tests/references/glide-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index c1a85dc..8350061
Binary files a/tests/references/glide-close-gnome-xsession-41.png and b/tests/references/glide-close-gnome-xsession-41.png differ
diff --git a/tests/references/glide-open-gnome-xsession-39.png b/tests/references/glide-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index f627db6..6b1d8ac
Binary files a/tests/references/glide-open-gnome-xsession-39.png and b/tests/references/glide-open-gnome-xsession-39.png differ
diff --git a/tests/references/glide-open-gnome-xsession-40.png b/tests/references/glide-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index c6d1f90..e87ab8f
Binary files a/tests/references/glide-open-gnome-xsession-40.png and b/tests/references/glide-open-gnome-xsession-40.png differ
diff --git a/tests/references/glide-open-gnome-xsession-41.png b/tests/references/glide-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index ee41c0e..be523ed
Binary files a/tests/references/glide-open-gnome-xsession-41.png and b/tests/references/glide-open-gnome-xsession-41.png differ
diff --git a/tests/references/glitch-close-gnome-xsession-39.png b/tests/references/glitch-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 8b75ac7..1bbbdbd
Binary files a/tests/references/glitch-close-gnome-xsession-39.png and b/tests/references/glitch-close-gnome-xsession-39.png differ
diff --git a/tests/references/glitch-close-gnome-xsession-40.png b/tests/references/glitch-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 99edaaf..bff4eda
Binary files a/tests/references/glitch-close-gnome-xsession-40.png and b/tests/references/glitch-close-gnome-xsession-40.png differ
diff --git a/tests/references/glitch-close-gnome-xsession-41.png b/tests/references/glitch-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index f1dd175..f5a4554
Binary files a/tests/references/glitch-close-gnome-xsession-41.png and b/tests/references/glitch-close-gnome-xsession-41.png differ
diff --git a/tests/references/glitch-open-gnome-xsession-39.png b/tests/references/glitch-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index adf5491..00afef1
Binary files a/tests/references/glitch-open-gnome-xsession-39.png and b/tests/references/glitch-open-gnome-xsession-39.png differ
diff --git a/tests/references/glitch-open-gnome-xsession-40.png b/tests/references/glitch-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index b480c43..ce90c16
Binary files a/tests/references/glitch-open-gnome-xsession-40.png and b/tests/references/glitch-open-gnome-xsession-40.png differ
diff --git a/tests/references/glitch-open-gnome-xsession-41.png b/tests/references/glitch-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index bd84c93..af907ed
Binary files a/tests/references/glitch-open-gnome-xsession-41.png and b/tests/references/glitch-open-gnome-xsession-41.png differ
diff --git a/tests/references/hexagon-close-gnome-xsession-39.png b/tests/references/hexagon-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index abf1717..60bc721
Binary files a/tests/references/hexagon-close-gnome-xsession-39.png and b/tests/references/hexagon-close-gnome-xsession-39.png differ
diff --git a/tests/references/hexagon-close-gnome-xsession-40.png b/tests/references/hexagon-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 795f3fa..a1e3afa
Binary files a/tests/references/hexagon-close-gnome-xsession-40.png and b/tests/references/hexagon-close-gnome-xsession-40.png differ
diff --git a/tests/references/hexagon-close-gnome-xsession-41.png b/tests/references/hexagon-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 285b6e3..6613bc7
Binary files a/tests/references/hexagon-close-gnome-xsession-41.png and b/tests/references/hexagon-close-gnome-xsession-41.png differ
diff --git a/tests/references/hexagon-open-gnome-xsession-39.png b/tests/references/hexagon-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 5fe891d..7d4fee8
Binary files a/tests/references/hexagon-open-gnome-xsession-39.png and b/tests/references/hexagon-open-gnome-xsession-39.png differ
diff --git a/tests/references/hexagon-open-gnome-xsession-40.png b/tests/references/hexagon-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 2effb92..84c967d
Binary files a/tests/references/hexagon-open-gnome-xsession-40.png and b/tests/references/hexagon-open-gnome-xsession-40.png differ
diff --git a/tests/references/hexagon-open-gnome-xsession-41.png b/tests/references/hexagon-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 8229c41..82387c2
Binary files a/tests/references/hexagon-open-gnome-xsession-41.png and b/tests/references/hexagon-open-gnome-xsession-41.png differ
diff --git a/tests/references/incinerate-close-gnome-xsession-39.png b/tests/references/incinerate-close-gnome-xsession-39.png
index e81a046..59b7341 100755
Binary files a/tests/references/incinerate-close-gnome-xsession-39.png and b/tests/references/incinerate-close-gnome-xsession-39.png differ
diff --git a/tests/references/incinerate-close-gnome-xsession-40.png b/tests/references/incinerate-close-gnome-xsession-40.png
index 17a43dc..31ede52 100755
Binary files a/tests/references/incinerate-close-gnome-xsession-40.png and b/tests/references/incinerate-close-gnome-xsession-40.png differ
diff --git a/tests/references/incinerate-close-gnome-xsession-41.png b/tests/references/incinerate-close-gnome-xsession-41.png
index 14ef204..94e2e8b 100755
Binary files a/tests/references/incinerate-close-gnome-xsession-41.png and b/tests/references/incinerate-close-gnome-xsession-41.png differ
diff --git a/tests/references/incinerate-open-gnome-xsession-39.png b/tests/references/incinerate-open-gnome-xsession-39.png
index 6b99c26..652a868 100755
Binary files a/tests/references/incinerate-open-gnome-xsession-39.png and b/tests/references/incinerate-open-gnome-xsession-39.png differ
diff --git a/tests/references/incinerate-open-gnome-xsession-40.png b/tests/references/incinerate-open-gnome-xsession-40.png
index be62864..6c49945 100755
Binary files a/tests/references/incinerate-open-gnome-xsession-40.png and b/tests/references/incinerate-open-gnome-xsession-40.png differ
diff --git a/tests/references/incinerate-open-gnome-xsession-41.png b/tests/references/incinerate-open-gnome-xsession-41.png
index 42db041..ce177d1 100755
Binary files a/tests/references/incinerate-open-gnome-xsession-41.png and b/tests/references/incinerate-open-gnome-xsession-41.png differ
diff --git a/tests/references/matrix-close-gnome-xsession-39.png b/tests/references/matrix-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 68719ce..3020923
Binary files a/tests/references/matrix-close-gnome-xsession-39.png and b/tests/references/matrix-close-gnome-xsession-39.png differ
diff --git a/tests/references/matrix-close-gnome-xsession-40.png b/tests/references/matrix-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 5d6cca4..5a311c5
Binary files a/tests/references/matrix-close-gnome-xsession-40.png and b/tests/references/matrix-close-gnome-xsession-40.png differ
diff --git a/tests/references/matrix-close-gnome-xsession-41.png b/tests/references/matrix-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 9cbc2fa..f060e29
Binary files a/tests/references/matrix-close-gnome-xsession-41.png and b/tests/references/matrix-close-gnome-xsession-41.png differ
diff --git a/tests/references/matrix-open-gnome-xsession-39.png b/tests/references/matrix-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 42ab142..2b3e99b
Binary files a/tests/references/matrix-open-gnome-xsession-39.png and b/tests/references/matrix-open-gnome-xsession-39.png differ
diff --git a/tests/references/matrix-open-gnome-xsession-40.png b/tests/references/matrix-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 36bd6f6..66f709e
Binary files a/tests/references/matrix-open-gnome-xsession-40.png and b/tests/references/matrix-open-gnome-xsession-40.png differ
diff --git a/tests/references/matrix-open-gnome-xsession-41.png b/tests/references/matrix-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 0c8cdf9..359f576
Binary files a/tests/references/matrix-open-gnome-xsession-41.png and b/tests/references/matrix-open-gnome-xsession-41.png differ
diff --git a/tests/references/pixel-wheel-close-gnome-xsession-39.png b/tests/references/pixel-wheel-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 57b5a40..9d4fca8
Binary files a/tests/references/pixel-wheel-close-gnome-xsession-39.png and b/tests/references/pixel-wheel-close-gnome-xsession-39.png differ
diff --git a/tests/references/pixel-wheel-close-gnome-xsession-40.png b/tests/references/pixel-wheel-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 849fe39..45b1f0b
Binary files a/tests/references/pixel-wheel-close-gnome-xsession-40.png and b/tests/references/pixel-wheel-close-gnome-xsession-40.png differ
diff --git a/tests/references/pixel-wheel-close-gnome-xsession-41.png b/tests/references/pixel-wheel-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 42cbfff..2cdeb95
Binary files a/tests/references/pixel-wheel-close-gnome-xsession-41.png and b/tests/references/pixel-wheel-close-gnome-xsession-41.png differ
diff --git a/tests/references/pixel-wheel-open-gnome-xsession-39.png b/tests/references/pixel-wheel-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index a6b4406..00cf067
Binary files a/tests/references/pixel-wheel-open-gnome-xsession-39.png and b/tests/references/pixel-wheel-open-gnome-xsession-39.png differ
diff --git a/tests/references/pixel-wheel-open-gnome-xsession-40.png b/tests/references/pixel-wheel-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 6b59583..75073c4
Binary files a/tests/references/pixel-wheel-open-gnome-xsession-40.png and b/tests/references/pixel-wheel-open-gnome-xsession-40.png differ
diff --git a/tests/references/pixel-wheel-open-gnome-xsession-41.png b/tests/references/pixel-wheel-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 5474392..e614f6a
Binary files a/tests/references/pixel-wheel-open-gnome-xsession-41.png and b/tests/references/pixel-wheel-open-gnome-xsession-41.png differ
diff --git a/tests/references/pixel-wipe-close-gnome-xsession-39.png b/tests/references/pixel-wipe-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 382b47f..da7ca0a
Binary files a/tests/references/pixel-wipe-close-gnome-xsession-39.png and b/tests/references/pixel-wipe-close-gnome-xsession-39.png differ
diff --git a/tests/references/pixel-wipe-close-gnome-xsession-40.png b/tests/references/pixel-wipe-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index ab14175..9d073ba
Binary files a/tests/references/pixel-wipe-close-gnome-xsession-40.png and b/tests/references/pixel-wipe-close-gnome-xsession-40.png differ
diff --git a/tests/references/pixel-wipe-close-gnome-xsession-41.png b/tests/references/pixel-wipe-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 2ec8e17..5123667
Binary files a/tests/references/pixel-wipe-close-gnome-xsession-41.png and b/tests/references/pixel-wipe-close-gnome-xsession-41.png differ
diff --git a/tests/references/pixel-wipe-open-gnome-xsession-39.png b/tests/references/pixel-wipe-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index a41b8d8..463367b
Binary files a/tests/references/pixel-wipe-open-gnome-xsession-39.png and b/tests/references/pixel-wipe-open-gnome-xsession-39.png differ
diff --git a/tests/references/pixel-wipe-open-gnome-xsession-40.png b/tests/references/pixel-wipe-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 2e1014f..73897c9
Binary files a/tests/references/pixel-wipe-open-gnome-xsession-40.png and b/tests/references/pixel-wipe-open-gnome-xsession-40.png differ
diff --git a/tests/references/pixel-wipe-open-gnome-xsession-41.png b/tests/references/pixel-wipe-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 65f1f03..148adb7
Binary files a/tests/references/pixel-wipe-open-gnome-xsession-41.png and b/tests/references/pixel-wipe-open-gnome-xsession-41.png differ
diff --git a/tests/references/pixelate-close-gnome-xsession-39.png b/tests/references/pixelate-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 3618997..027002d
Binary files a/tests/references/pixelate-close-gnome-xsession-39.png and b/tests/references/pixelate-close-gnome-xsession-39.png differ
diff --git a/tests/references/pixelate-close-gnome-xsession-40.png b/tests/references/pixelate-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 428b649..86b8ce8
Binary files a/tests/references/pixelate-close-gnome-xsession-40.png and b/tests/references/pixelate-close-gnome-xsession-40.png differ
diff --git a/tests/references/pixelate-close-gnome-xsession-41.png b/tests/references/pixelate-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 096fab3..31c84d8
Binary files a/tests/references/pixelate-close-gnome-xsession-41.png and b/tests/references/pixelate-close-gnome-xsession-41.png differ
diff --git a/tests/references/pixelate-open-gnome-xsession-39.png b/tests/references/pixelate-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index b8a6ad3..202416e
Binary files a/tests/references/pixelate-open-gnome-xsession-39.png and b/tests/references/pixelate-open-gnome-xsession-39.png differ
diff --git a/tests/references/pixelate-open-gnome-xsession-40.png b/tests/references/pixelate-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 9e6712e..e3c1f0a
Binary files a/tests/references/pixelate-open-gnome-xsession-40.png and b/tests/references/pixelate-open-gnome-xsession-40.png differ
diff --git a/tests/references/pixelate-open-gnome-xsession-41.png b/tests/references/pixelate-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 22269dd..80678a7
Binary files a/tests/references/pixelate-open-gnome-xsession-41.png and b/tests/references/pixelate-open-gnome-xsession-41.png differ
diff --git a/tests/references/portal-close-gnome-xsession-39.png b/tests/references/portal-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 099627c..2d974db
Binary files a/tests/references/portal-close-gnome-xsession-39.png and b/tests/references/portal-close-gnome-xsession-39.png differ
diff --git a/tests/references/portal-close-gnome-xsession-40.png b/tests/references/portal-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 005e079..0e9ccb3
Binary files a/tests/references/portal-close-gnome-xsession-40.png and b/tests/references/portal-close-gnome-xsession-40.png differ
diff --git a/tests/references/portal-close-gnome-xsession-41.png b/tests/references/portal-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 99deee4..e662a07
Binary files a/tests/references/portal-close-gnome-xsession-41.png and b/tests/references/portal-close-gnome-xsession-41.png differ
diff --git a/tests/references/portal-open-gnome-xsession-39.png b/tests/references/portal-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index ccf25f5..cae74f6
Binary files a/tests/references/portal-open-gnome-xsession-39.png and b/tests/references/portal-open-gnome-xsession-39.png differ
diff --git a/tests/references/portal-open-gnome-xsession-40.png b/tests/references/portal-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index bf51d80..34f91de
Binary files a/tests/references/portal-open-gnome-xsession-40.png and b/tests/references/portal-open-gnome-xsession-40.png differ
diff --git a/tests/references/portal-open-gnome-xsession-41.png b/tests/references/portal-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 25d42db..6db064b
Binary files a/tests/references/portal-open-gnome-xsession-41.png and b/tests/references/portal-open-gnome-xsession-41.png differ
diff --git a/tests/references/preferences-gnome-xsession-39.png b/tests/references/preferences-gnome-xsession-39.png
old mode 100644
new mode 100755
index 2219870..a317085
Binary files a/tests/references/preferences-gnome-xsession-39.png and b/tests/references/preferences-gnome-xsession-39.png differ
diff --git a/tests/references/preferences-gnome-xsession-40.png b/tests/references/preferences-gnome-xsession-40.png
old mode 100644
new mode 100755
index f28115a..628d62b
Binary files a/tests/references/preferences-gnome-xsession-40.png and b/tests/references/preferences-gnome-xsession-40.png differ
diff --git a/tests/references/preferences-gnome-xsession-41.png b/tests/references/preferences-gnome-xsession-41.png
old mode 100644
new mode 100755
index fd9bbcc..0e7607e
Binary files a/tests/references/preferences-gnome-xsession-41.png and b/tests/references/preferences-gnome-xsession-41.png differ
diff --git a/tests/references/rgb-warp-close-gnome-xsession-39.png b/tests/references/rgb-warp-close-gnome-xsession-39.png
new file mode 100755
index 0000000..d526f5c
Binary files /dev/null and b/tests/references/rgb-warp-close-gnome-xsession-39.png differ
diff --git a/tests/references/rgb-warp-close-gnome-xsession-40.png b/tests/references/rgb-warp-close-gnome-xsession-40.png
new file mode 100755
index 0000000..99a4980
Binary files /dev/null and b/tests/references/rgb-warp-close-gnome-xsession-40.png differ
diff --git a/tests/references/rgb-warp-close-gnome-xsession-41.png b/tests/references/rgb-warp-close-gnome-xsession-41.png
new file mode 100755
index 0000000..a743e00
Binary files /dev/null and b/tests/references/rgb-warp-close-gnome-xsession-41.png differ
diff --git a/tests/references/rgb-warp-open-gnome-xsession-39.png b/tests/references/rgb-warp-open-gnome-xsession-39.png
new file mode 100755
index 0000000..b6bf789
Binary files /dev/null and b/tests/references/rgb-warp-open-gnome-xsession-39.png differ
diff --git a/tests/references/rgb-warp-open-gnome-xsession-40.png b/tests/references/rgb-warp-open-gnome-xsession-40.png
new file mode 100755
index 0000000..9d29740
Binary files /dev/null and b/tests/references/rgb-warp-open-gnome-xsession-40.png differ
diff --git a/tests/references/rgb-warp-open-gnome-xsession-41.png b/tests/references/rgb-warp-open-gnome-xsession-41.png
new file mode 100755
index 0000000..5429e23
Binary files /dev/null and b/tests/references/rgb-warp-open-gnome-xsession-41.png differ
diff --git a/tests/references/snap-close-gnome-xsession-39.png b/tests/references/snap-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 0757998..1a5cdb9
Binary files a/tests/references/snap-close-gnome-xsession-39.png and b/tests/references/snap-close-gnome-xsession-39.png differ
diff --git a/tests/references/snap-close-gnome-xsession-40.png b/tests/references/snap-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 565c8db..ad0f386
Binary files a/tests/references/snap-close-gnome-xsession-40.png and b/tests/references/snap-close-gnome-xsession-40.png differ
diff --git a/tests/references/snap-close-gnome-xsession-41.png b/tests/references/snap-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 953d396..082a11a
Binary files a/tests/references/snap-close-gnome-xsession-41.png and b/tests/references/snap-close-gnome-xsession-41.png differ
diff --git a/tests/references/snap-open-gnome-xsession-39.png b/tests/references/snap-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index e49770a..291bdf5
Binary files a/tests/references/snap-open-gnome-xsession-39.png and b/tests/references/snap-open-gnome-xsession-39.png differ
diff --git a/tests/references/snap-open-gnome-xsession-40.png b/tests/references/snap-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 13db331..9218a0c
Binary files a/tests/references/snap-open-gnome-xsession-40.png and b/tests/references/snap-open-gnome-xsession-40.png differ
diff --git a/tests/references/snap-open-gnome-xsession-41.png b/tests/references/snap-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index e06de47..b4b4851
Binary files a/tests/references/snap-open-gnome-xsession-41.png and b/tests/references/snap-open-gnome-xsession-41.png differ
diff --git a/tests/references/team-rocket-close-gnome-xsession-39.png b/tests/references/team-rocket-close-gnome-xsession-39.png
new file mode 100755
index 0000000..75a395b
Binary files /dev/null and b/tests/references/team-rocket-close-gnome-xsession-39.png differ
diff --git a/tests/references/team-rocket-close-gnome-xsession-40.png b/tests/references/team-rocket-close-gnome-xsession-40.png
new file mode 100755
index 0000000..aaf9782
Binary files /dev/null and b/tests/references/team-rocket-close-gnome-xsession-40.png differ
diff --git a/tests/references/team-rocket-close-gnome-xsession-41.png b/tests/references/team-rocket-close-gnome-xsession-41.png
new file mode 100755
index 0000000..89019ea
Binary files /dev/null and b/tests/references/team-rocket-close-gnome-xsession-41.png differ
diff --git a/tests/references/team-rocket-open-gnome-xsession-39.png b/tests/references/team-rocket-open-gnome-xsession-39.png
new file mode 100755
index 0000000..63ad50e
Binary files /dev/null and b/tests/references/team-rocket-open-gnome-xsession-39.png differ
diff --git a/tests/references/team-rocket-open-gnome-xsession-40.png b/tests/references/team-rocket-open-gnome-xsession-40.png
new file mode 100755
index 0000000..e8ea58f
Binary files /dev/null and b/tests/references/team-rocket-open-gnome-xsession-40.png differ
diff --git a/tests/references/team-rocket-open-gnome-xsession-41.png b/tests/references/team-rocket-open-gnome-xsession-41.png
new file mode 100755
index 0000000..332aceb
Binary files /dev/null and b/tests/references/team-rocket-open-gnome-xsession-41.png differ
diff --git a/tests/references/trex-close-gnome-xsession-39.png b/tests/references/trex-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 1269aa8..9cb353c
Binary files a/tests/references/trex-close-gnome-xsession-39.png and b/tests/references/trex-close-gnome-xsession-39.png differ
diff --git a/tests/references/trex-close-gnome-xsession-40.png b/tests/references/trex-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 6b53f38..7a96864
Binary files a/tests/references/trex-close-gnome-xsession-40.png and b/tests/references/trex-close-gnome-xsession-40.png differ
diff --git a/tests/references/trex-close-gnome-xsession-41.png b/tests/references/trex-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 0369aec..1c5cdd4
Binary files a/tests/references/trex-close-gnome-xsession-41.png and b/tests/references/trex-close-gnome-xsession-41.png differ
diff --git a/tests/references/trex-open-gnome-xsession-39.png b/tests/references/trex-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 2f9cb42..f01a61a
Binary files a/tests/references/trex-open-gnome-xsession-39.png and b/tests/references/trex-open-gnome-xsession-39.png differ
diff --git a/tests/references/trex-open-gnome-xsession-40.png b/tests/references/trex-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index a39e8c5..3fabfcf
Binary files a/tests/references/trex-open-gnome-xsession-40.png and b/tests/references/trex-open-gnome-xsession-40.png differ
diff --git a/tests/references/trex-open-gnome-xsession-41.png b/tests/references/trex-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index bce71da..3b05dd0
Binary files a/tests/references/trex-open-gnome-xsession-41.png and b/tests/references/trex-open-gnome-xsession-41.png differ
diff --git a/tests/references/tv-close-gnome-xsession-39.png b/tests/references/tv-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index cb45033..6b4c84e
Binary files a/tests/references/tv-close-gnome-xsession-39.png and b/tests/references/tv-close-gnome-xsession-39.png differ
diff --git a/tests/references/tv-close-gnome-xsession-40.png b/tests/references/tv-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 57ce5c1..43a1e5c
Binary files a/tests/references/tv-close-gnome-xsession-40.png and b/tests/references/tv-close-gnome-xsession-40.png differ
diff --git a/tests/references/tv-close-gnome-xsession-41.png b/tests/references/tv-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 279fb83..4786d1a
Binary files a/tests/references/tv-close-gnome-xsession-41.png and b/tests/references/tv-close-gnome-xsession-41.png differ
diff --git a/tests/references/tv-glitch-close-gnome-xsession-39.png b/tests/references/tv-glitch-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index f1586a5..a2063f8
Binary files a/tests/references/tv-glitch-close-gnome-xsession-39.png and b/tests/references/tv-glitch-close-gnome-xsession-39.png differ
diff --git a/tests/references/tv-glitch-close-gnome-xsession-40.png b/tests/references/tv-glitch-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index d20c80a..61dd9f0
Binary files a/tests/references/tv-glitch-close-gnome-xsession-40.png and b/tests/references/tv-glitch-close-gnome-xsession-40.png differ
diff --git a/tests/references/tv-glitch-close-gnome-xsession-41.png b/tests/references/tv-glitch-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 88c73c4..42cc8c9
Binary files a/tests/references/tv-glitch-close-gnome-xsession-41.png and b/tests/references/tv-glitch-close-gnome-xsession-41.png differ
diff --git a/tests/references/tv-glitch-open-gnome-xsession-39.png b/tests/references/tv-glitch-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 94dce8e..cdd6c1b
Binary files a/tests/references/tv-glitch-open-gnome-xsession-39.png and b/tests/references/tv-glitch-open-gnome-xsession-39.png differ
diff --git a/tests/references/tv-glitch-open-gnome-xsession-40.png b/tests/references/tv-glitch-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index c627862..74e964a
Binary files a/tests/references/tv-glitch-open-gnome-xsession-40.png and b/tests/references/tv-glitch-open-gnome-xsession-40.png differ
diff --git a/tests/references/tv-glitch-open-gnome-xsession-41.png b/tests/references/tv-glitch-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 77bded7..c2b40e0
Binary files a/tests/references/tv-glitch-open-gnome-xsession-41.png and b/tests/references/tv-glitch-open-gnome-xsession-41.png differ
diff --git a/tests/references/tv-open-gnome-xsession-39.png b/tests/references/tv-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index a8f95ad..2be024a
Binary files a/tests/references/tv-open-gnome-xsession-39.png and b/tests/references/tv-open-gnome-xsession-39.png differ
diff --git a/tests/references/tv-open-gnome-xsession-40.png b/tests/references/tv-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index b06ed91..e021cb4
Binary files a/tests/references/tv-open-gnome-xsession-40.png and b/tests/references/tv-open-gnome-xsession-40.png differ
diff --git a/tests/references/tv-open-gnome-xsession-41.png b/tests/references/tv-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index 49577d9..40a7671
Binary files a/tests/references/tv-open-gnome-xsession-41.png and b/tests/references/tv-open-gnome-xsession-41.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-39.png b/tests/references/wisps-close-gnome-xsession-39.png
old mode 100644
new mode 100755
index 61287b6..164df0e
Binary files a/tests/references/wisps-close-gnome-xsession-39.png and b/tests/references/wisps-close-gnome-xsession-39.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-40.png b/tests/references/wisps-close-gnome-xsession-40.png
old mode 100644
new mode 100755
index 60cd197..f85b3bc
Binary files a/tests/references/wisps-close-gnome-xsession-40.png and b/tests/references/wisps-close-gnome-xsession-40.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-41.png b/tests/references/wisps-close-gnome-xsession-41.png
old mode 100644
new mode 100755
index 7413837..c21e3e0
Binary files a/tests/references/wisps-close-gnome-xsession-41.png and b/tests/references/wisps-close-gnome-xsession-41.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-39.png b/tests/references/wisps-open-gnome-xsession-39.png
old mode 100644
new mode 100755
index 30ab410..fc6b65d
Binary files a/tests/references/wisps-open-gnome-xsession-39.png and b/tests/references/wisps-open-gnome-xsession-39.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-40.png b/tests/references/wisps-open-gnome-xsession-40.png
old mode 100644
new mode 100755
index 4ffdc08..7812394
Binary files a/tests/references/wisps-open-gnome-xsession-40.png and b/tests/references/wisps-open-gnome-xsession-40.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-41.png b/tests/references/wisps-open-gnome-xsession-41.png
old mode 100644
new mode 100755
index b0020ef..e7b0f88
Binary files a/tests/references/wisps-open-gnome-xsession-41.png and b/tests/references/wisps-open-gnome-xsession-41.png differ
diff --git a/tests/run-test.sh b/tests/run-test.sh
index 872397b..fd8dc37 100755
--- a/tests/run-test.sh
+++ b/tests/run-test.sh
@@ -203,6 +203,10 @@ send_keystroke "Alt+F4"
echo "Entering test mode."
set_setting "test-mode" true
+test_effect "apparition"
+test_effect "broken-glass"
+test_effect "aura-glow"
+test_effect "doom"
test_effect "energize-a"
test_effect "energize-b"
test_effect "fire"
@@ -211,24 +215,17 @@ test_effect "glide"
test_effect "glitch"
test_effect "hexagon"
test_effect "incinerate"
+test_effect "matrix"
test_effect "pixelate"
test_effect "pixel-wheel"
test_effect "pixel-wipe"
test_effect "portal"
+test_effect "rgb-warp"
+test_effect "snap"
+test_effect "team-rocket"
+test_effect "trex"
test_effect "tv"
test_effect "tv-glitch"
test_effect "wisps"
-if [[ "${FEDORA_VERSION}" -gt 32 ]] || [[ "${FEDORA_VERSION}" == "rawhide" ]]; then
- test_effect "apparition"
- test_effect "doom"
-fi
-
-if [[ "${FEDORA_VERSION}" -gt 33 ]] || [[ "${FEDORA_VERSION}" == "rawhide" ]]; then
- test_effect "trex"
- test_effect "broken-glass"
- test_effect "matrix"
- test_effect "snap"
-fi
-
echo "All tests executed successfully."