summaryrefslogtreecommitdiff
path: root/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects
diff options
context:
space:
mode:
authorNippy <nippy@rp1.hu>2026-06-01 18:57:29 +0200
committerNippy <nippy@rp1.hu>2026-06-01 18:57:29 +0200
commit2e5a7d93476c0819b5a23f5740e4c843eaedc73a (patch)
tree84279c63b84126eb8f6d9d94a42c44aabbe22336 /raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects
parente1f0fac166056bb106284be4a3fec0c558525927 (diff)
downloadRaveOS-PKGBUILD-2e5a7d93476c0819b5a23f5740e4c843eaedc73a.tar.gz
RaveOS-PKGBUILD-2e5a7d93476c0819b5a23f5740e4c843eaedc73a.zip
Raveos gnome update
Diffstat (limited to 'raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects')
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Apparition.js103
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/AuraGlow.js163
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/BrokenGlass.js155
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Doom.js112
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeA.js95
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeB.js96
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Fire.js277
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Focus.js99
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glide.js101
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glitch.js103
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Hexagon.js107
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Incinerate.js149
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Matrix.js125
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Mushroom.js384
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PaintBrush.js115
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWheel.js95
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWipe.js120
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Pixelate.js95
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Portal.js105
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/RGBWarp.js100
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/SnapOfDisintegration.js126
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TRexAttack.js128
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVEffect.js93
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVGlitch.js104
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TeamRocket.js114
-rw-r--r--raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Wisps.js120
26 files changed, 3384 insertions, 0 deletions
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Apparition.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Apparition.js
new file mode 100644
index 0000000..f770e71
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Apparition.js
@@ -0,0 +1,103 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// 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 hides the actor by violently sucking it into the void of magic. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uSeed = shader.get_uniform_location('uSeed');
+ shader._uShake = shader.get_uniform_location('uShake');
+ shader._uTwirl = shader.get_uniform_location('uTwirl');
+ shader._uSuction = shader.get_uniform_location('uSuction');
+ shader._uRandomness = shader.get_uniform_location('uRandomness');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uShake, 1, [settings.get_double('apparition-shake-intensity')]);
+ shader.set_uniform_float(shader._uTwirl, 1, [settings.get_double('apparition-twirl-intensity')]);
+ shader.set_uniform_float(shader._uSuction, 1, [settings.get_double('apparition-suction-intensity')]);
+ shader.set_uniform_float(shader._uRandomness, 1, [settings.get_double('apparition-randomness')]);
+ // clang-format on
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // The effect is not available on GNOME Shell 3.36 as it requires scaling of the window
+ // actor.
+ static getMinShellVersion() {
+ return [3, 38];
+ }
+
+ // 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').
+ static getNick() {
+ return 'apparition';
+ }
+
+ // 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 _('Apparition');
+ }
+
+ // -------------------------------------------------------------------- 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('apparition-randomness');
+ dialog.bindAdjustment('apparition-animation-time');
+ dialog.bindAdjustment('apparition-twirl-intensity');
+ dialog.bindAdjustment('apparition-shake-intensity');
+ dialog.bindAdjustment('apparition-suction-intensity');
+ }
+
+ // ---------------------------------------------------------------- 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: 2.0, y: 2.0};
+ }
+}
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/AuraGlow.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/AuraGlow.js
new file mode 100644
index 0000000..dd89e04
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/AuraGlow.js
@@ -0,0 +1,163 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Justin Garza <JGarza9788@gmail.com>
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// 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');
+
+// We import Gtk for the color preview in the preferences dialog. This is only available
+// and required in the preferences process.
+const Gtk = await utils.importInPrefsOnly('gi://Gtk');
+
+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/<nick>.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._uSpeed = shader.get_uniform_location('uSpeed');
+ shader._uRandomColor = shader.get_uniform_location('uRandomColor');
+ shader._uStartHue = shader.get_uniform_location('uStartHue');
+ shader._uSaturation = shader.get_uniform_location('uSaturation');
+ 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._uSpeed, 1, [settings.get_double('aura-glow-speed')]);
+ shader.set_uniform_float(shader._uRandomColor, 1, [settings.get_boolean('aura-glow-random-color')]);
+ shader.set_uniform_float(shader._uStartHue, 1, [settings.get_double('aura-glow-start-hue')]);
+ shader.set_uniform_float(shader._uSaturation, 1, [settings.get_double('aura-glow-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-speed');
+ dialog.bindSwitch('aura-glow-random-color');
+ dialog.bindAdjustment('aura-glow-start-hue');
+ dialog.bindAdjustment('aura-glow-saturation');
+ dialog.bindAdjustment('aura-glow-edge-size');
+ dialog.bindAdjustment('aura-glow-edge-hardness');
+ dialog.bindAdjustment('aura-glow-blur');
+
+ dialog.getBuilder()
+ .get_object('aura-glow-hue-preview')
+ .set_draw_func((area, cairo) => {
+ const hueScale = dialog.getBuilder().get_object('aura-glow-start-hue-slider');
+ const satScale = dialog.getBuilder().get_object('aura-glow-saturation-slider');
+ const [r, g, b] = Gtk.hsv_to_rgb(hueScale.get_value(), satScale.get_value(), 1);
+ const height = area.get_allocated_height();
+ const width = area.get_allocated_width();
+ cairo.setSourceRGB(r, g, b);
+ cairo.arc(width / 2, height / 2, width / 2, 0.0, 2 * Math.PI);
+ cairo.fill();
+ });
+
+ function redrawHuePreview() {
+ dialog.getBuilder().get_object('aura-glow-hue-preview').queue_draw();
+ }
+
+ dialog.getBuilder()
+ .get_object('aura-glow-start-hue-slider')
+ .connect('value-changed', redrawHuePreview);
+
+ dialog.getBuilder()
+ .get_object('aura-glow-saturation-slider')
+ .connect('value-changed', redrawHuePreview);
+
+ // enable and disable the one slider
+ function enableDisablePref(dialog, state) {
+ dialog.getBuilder().get_object('aura-glow-start-hue-slider').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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/BrokenGlass.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/BrokenGlass.js
new file mode 100644
index 0000000..94f7bc3
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/BrokenGlass.js
@@ -0,0 +1,155 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect shatters the window into pieces. For an explanation how this works, look //
+// further down in this file into the documentation of the Shader class. This effect is //
+// not available on GNOME 3.3x, due to the limitation described in the documentation //
+// of vfunc_paint_target further down in this file. //
+// This shader creates a complex-looking effect with rather simple means. Here is how //
+// it works: The window is drawn five times on top of each other (see the SHARD_LAYERS //
+// constant in the GLSL code). Each layer only draws some of the shards, all layers //
+// combined make up the entire window. The layers are then scaled, rotated, and moved //
+// independently from each other - this creates the impression that all shards are //
+// moving independently. In reality, there are only five groups of shards! Which shard //
+// belongs to which layer is defined by the green channel of the texture //
+// resources/img/shards.png. The red channel of the texture contains the distance to //
+// the shard edges. This information is used to fade out the shards. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Create the texture in the first call.
+ if (!this._shardTexture) {
+ this._shardTexture = utils.getImageResource('/img/shards.png');
+ }
+
+ // Store all uniform locations.
+ shader._uShardTexture = shader.get_uniform_location('uShardTexture');
+ shader._uSeed = shader.get_uniform_location('uSeed');
+ shader._uEpicenter = shader.get_uniform_location('uEpicenter');
+ shader._uShardScale = shader.get_uniform_location('uShardScale');
+ shader._uBlowForce = shader.get_uniform_location('uBlowForce');
+ shader._uGravity = shader.get_uniform_location('uGravity');
+
+ // And update all uniforms at the start of each animation.
+ shader.connect(
+ 'begin-animation', (shader, settings, forOpening, testMode, actor) => {
+ // Usually, the shards fly away from the center of the window.
+ let epicenterX = 0.5;
+ let epicenterY = 0.5;
+
+ // However, if this option is set, we use the mouse pointer position.
+ if (!forOpening && settings.get_boolean('broken-glass-use-pointer')) {
+ const [x, y] = global.get_pointer();
+ const [ok, localX, localY] = actor.transform_stage_point(x, y);
+
+ if (ok) {
+ epicenterX = localX / actor.width;
+ epicenterY = localY / actor.height;
+ }
+ }
+
+ // clang-format off
+ shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uEpicenter, 2, [epicenterX, epicenterY]);
+ shader.set_uniform_float(shader._uShardScale, 1, [settings.get_double('broken-glass-scale')]);
+ shader.set_uniform_float(shader._uBlowForce, 1, [settings.get_double('broken-glass-blow-force')]);
+ shader.set_uniform_float(shader._uGravity, 1, [settings.get_double('broken-glass-gravity')]);
+ // clang-format on
+ });
+
+ // This is required to bind the shard texture for drawing. Sadly, this seems to be
+ // impossible under GNOME 3.3x as this.get_pipeline() is not available. It was
+ // called get_target() back then but this is not wrapped in GJS.
+ // https://gitlab.gnome.org/GNOME/mutter/-/blob/gnome-3-36/clutter/clutter/clutter-offscreen-effect.c#L598
+ shader.connect('update-animation', (shader) => {
+ const pipeline = shader.get_pipeline();
+
+ // Use linear filtering for the window texture.
+ pipeline.set_layer_filters(0, Cogl.PipelineFilter.LINEAR,
+ Cogl.PipelineFilter.LINEAR);
+
+ // Bind the shard texture.
+ pipeline.set_layer_texture(1, this._shardTexture.get_texture());
+ pipeline.set_layer_wrap_mode(1, Cogl.PipelineWrapMode.REPEAT);
+ pipeline.set_uniform_1i(shader._uShardTexture, 1);
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // This effect is only available on GNOME Shell 40+.
+ static getMinShellVersion() {
+ return [40, 0];
+ }
+
+ // 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 'broken-glass';
+ }
+
+ // 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 _('Broken Glass');
+ }
+
+ // -------------------------------------------------------------------- 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('broken-glass-animation-time');
+ dialog.bindAdjustment('broken-glass-scale');
+ dialog.bindAdjustment('broken-glass-gravity');
+ dialog.bindAdjustment('broken-glass-blow-force');
+ dialog.bindSwitch('broken-glass-use-pointer');
+ }
+
+ // ---------------------------------------------------------------- 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: 2.0, y: 2.0};
+ }
+}
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Doom.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Doom.js
new file mode 100644
index 0000000..7afa97c
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Doom.js
@@ -0,0 +1,112 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// 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 melts your windows. Inspired by the legendary screen transitions of the //
+// original Doom. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uActorScale = shader.get_uniform_location('uActorScale');
+ shader._uHorizontalScale = shader.get_uniform_location('uHorizontalScale');
+ shader._uVerticalScale = shader.get_uniform_location('uVerticalScale');
+ shader._uPixelSize = shader.get_uniform_location('uPixelSize');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect(
+ 'begin-animation', (shader, settings, forOpening, testMode, actor) => {
+ // For this effect, we scale the actor vertically so that it covers the entire
+ // screen. This ensures that the melted window will not be cut off.
+ let actorScale = 2.0 * Math.max(1.0, global.stage.height / actor.height);
+
+ // If we are currently performing integration test, nothing will be visible in
+ // the test images as the animation has passed the center of the window already.
+ // To fix this, we set the actor scale to a fixed low value when performing
+ // tests.
+ // clang-format off
+ shader.set_uniform_float(shader._uActorScale, 1, [testMode ? 1.0 : actorScale]);
+ shader.set_uniform_float(shader._uHorizontalScale, 1, [testMode ? 50.0 :settings.get_double('doom-horizontal-scale')]);
+ shader.set_uniform_float(shader._uVerticalScale, 1, [testMode ? 150.0 : settings.get_double('doom-vertical-scale')]);
+ shader.set_uniform_float(shader._uPixelSize, 1, [settings.get_int('doom-pixel-size')]);
+ // clang-format on
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // The effect is not available on GNOME Shell 3.36 as it requires scaling of the window
+ // actor.
+ static getMinShellVersion() {
+ return [3, 38];
+ }
+
+ // 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').
+ static getNick() {
+ return 'doom';
+ }
+
+ // 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 _('Doom');
+ }
+
+ // -------------------------------------------------------------------- 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('doom-animation-time');
+ dialog.bindAdjustment('doom-horizontal-scale');
+ dialog.bindAdjustment('doom-vertical-scale');
+ dialog.bindAdjustment('doom-pixel-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+.
+ // For this effect, we scale the actor vertically so that it covers the entire screen.
+ // This ensures that the melted window will not be cut off.
+ static getActorScale(settings, forOpening, actor) {
+ let actorScale = 2.0 * Math.max(1.0, global.stage.height / actor.height);
+ return {x: 1.0, y: actorScale};
+ }
+}
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeA.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeA.js
new file mode 100644
index 0000000..3b1b84b
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeA.js
@@ -0,0 +1,95 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect looks a bit like the transporter effect from TOS. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uColor = shader.get_uniform_location('uColor');
+ shader._uScale = shader.get_uniform_location('uScale');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uColor, 3, utils.parseColor(settings.get_string('energize-a-color')));
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('energize-a-scale')]);
+ // 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').
+ static getNick() {
+ return 'energize-a';
+ }
+
+ // 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 _('Energize A');
+ }
+
+ // -------------------------------------------------------------------- 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('energize-a-animation-time');
+ dialog.bindAdjustment('energize-a-scale');
+ dialog.bindColorButton('energize-a-color');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeB.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeB.js
new file mode 100644
index 0000000..610a81c
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/EnergizeB.js
@@ -0,0 +1,96 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect looks a bit like the transporter effect from TNG. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uColor = shader.get_uniform_location('uColor');
+ shader._uScale = shader.get_uniform_location('uScale');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uColor, 3, utils.parseColor(settings.get_string('energize-b-color')));
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('energize-b-scale')]);
+ // 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').
+ static getNick() {
+ return 'energize-b';
+ }
+
+ // 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 _('Energize B');
+ }
+
+ // -------------------------------------------------------------------- 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('energize-b-animation-time');
+ dialog.bindAdjustment('energize-b-scale');
+ dialog.bindColorButton('energize-b-color');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Fire.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Fire.js
new file mode 100644
index 0000000..07f2c2d
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Fire.js
@@ -0,0 +1,277 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// modified by Justin Garza <JGarza9788@gmail.com>
+
+'use strict';
+
+import Gio from 'gi://Gio';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect is a homage to the good old Compiz days. However, it is implemented //
+// quite differently. While Compiz used a particle system, this effect uses a noise //
+// shader. The noise is moved vertically over time and mapped to a configurable color //
+// gradient. It is faded to transparency towards the edges of the window. In addition, //
+// there are a couple of moving gradients which fade-in or fade-out the fire 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/<nick>.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Store all uniform locations.
+ shader._uGradient = [
+ shader.get_uniform_location('uGradient1'),
+ shader.get_uniform_location('uGradient2'),
+ shader.get_uniform_location('uGradient3'),
+ shader.get_uniform_location('uGradient4'),
+ shader.get_uniform_location('uGradient5'),
+ ];
+
+ shader._u3DNoise = shader.get_uniform_location('u3DNoise');
+ shader._uScale = shader.get_uniform_location('uScale');
+ shader._uMovementSpeed = shader.get_uniform_location('uMovementSpeed');
+
+ shader._uRandomColor = shader.get_uniform_location('uRandomColor');
+ 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 = 1; i <= 5; i++) {
+ shader.set_uniform_float(
+ shader._uGradient[i - 1], 4,
+ utils.parseColor(settings.get_string('fire-color-' + i)));
+ }
+
+ // clang-format off
+ shader.set_uniform_float(shader._u3DNoise, 1, [settings.get_boolean('fire-3d-noise')]);
+ shader.set_uniform_float(shader._uRandomColor, 1, [settings.get_boolean('fire-random-color')]);
+ shader.set_uniform_float(shader._uSeed, 1, [Math.random()]);
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('fire-scale')]);
+ shader.set_uniform_float(shader._uMovementSpeed, 1, [settings.get_double('fire-movement-speed')]);
+ // 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').
+ static getNick() {
+ return 'fire';
+ }
+
+ // 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 _('Fire');
+ }
+
+ // -------------------------------------------------------------------- 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) {
+
+ // Bind all properties.
+ dialog.bindAdjustment('fire-animation-time');
+ dialog.bindAdjustment('fire-movement-speed');
+ dialog.bindAdjustment('fire-scale');
+ dialog.bindSwitch('fire-3d-noise');
+ dialog.bindSwitch('fire-random-color');
+ dialog.bindColorButton('fire-color-1');
+ dialog.bindColorButton('fire-color-2');
+ dialog.bindColorButton('fire-color-3');
+ dialog.bindColorButton('fire-color-4');
+ dialog.bindColorButton('fire-color-5');
+
+ // Connect the buttons only once. The bindPreferences can be called multiple times...
+ if (!Effect._isConnected) {
+ Effect._isConnected = true;
+
+ // The fire-gradient-reset button needs to be bound explicitly.
+ dialog.getBuilder().get_object('reset-fire-colors').connect('clicked', () => {
+ dialog.getProfileSettings().reset('fire-color-1');
+ dialog.getProfileSettings().reset('fire-color-2');
+ dialog.getProfileSettings().reset('fire-color-3');
+ dialog.getProfileSettings().reset('fire-color-4');
+ dialog.getProfileSettings().reset('fire-color-5');
+ });
+
+ // Initialize the fire-preset dropdown.
+ Effect._createFirePresets(dialog);
+ }
+
+ // enables and disables the color buttons
+ function enableDisableColorButtons(dialog, state) {
+
+ for (let i = 1; i <= 5; i++) {
+ dialog.getBuilder().get_object('fire-color-' + i).set_sensitive(!state);
+ }
+ }
+
+ const switchWidget = dialog.getBuilder().get_object('fire-random-color');
+ if (switchWidget) {
+ // Connect to the "state-set" signal to update preferences dynamically based on
+ // the switch state.
+ switchWidget.connect('state-set', (widget, state) => {
+ enableDisableColorButtons(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.
+ enableDisableColorButtons(dialog, initialState);
+ } else {
+ // Log an error if the switch widget is not found in the UI.
+ log('Error: \'fire-random-color\' switch widget not found.');
+ }
+ }
+
+ // ---------------------------------------------------------------- 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};
+ }
+
+ // ----------------------------------------------------------------------- private stuff
+
+ // This populates the preset dropdown menu for the fire options.
+ static _createFirePresets(dialog) {
+ dialog.getBuilder().get_object('fire-prefs').connect('realize', (widget) => {
+ const presets = [
+ {
+ name: _('Default Fire'),
+ scale: 1.0,
+ speed: 0.5,
+ color1: 'rgba(76, 51, 25, 0.0)',
+ color2: 'rgba(180, 55, 30, 0.7)',
+ color3: 'rgba(255, 76, 38, 0.9)',
+ color4: 'rgba(255, 166, 25, 1)',
+ color5: 'rgba(255, 255, 255, 1)'
+ },
+ {
+ name: _('Hell Fire'),
+ scale: 1.5,
+ speed: 0.2,
+ color1: 'rgba(0,0,0,0)',
+ color2: 'rgba(103,7,80,0.5)',
+ color3: 'rgba(150,0,24,0.9)',
+ color4: 'rgb(255,200,0)',
+ color5: 'rgba(255, 255, 255, 1)'
+ },
+ {
+ name: _('Dark and Smutty'),
+ scale: 1.0,
+ speed: 0.5,
+ color1: 'rgba(0,0,0,0)',
+ color2: 'rgba(36,3,0,0.5)',
+ color3: 'rgba(150,0,24,0.9)',
+ color4: 'rgb(255,177,21)',
+ color5: 'rgb(255,238,166)'
+ },
+ {
+ name: _('Cold Breeze'),
+ scale: 1.5,
+ speed: -0.1,
+ color1: 'rgba(0,110,255,0)',
+ color2: 'rgba(30,111,180,0.24)',
+ color3: 'rgba(38,181,255,0.54)',
+ color4: 'rgba(34,162,255,0.84)',
+ color5: 'rgb(97,189,255)'
+ },
+ {
+ name: _('Santa is Coming'),
+ scale: 0.4,
+ speed: -0.5,
+ color1: 'rgba(0,110,255,0)',
+ color2: 'rgba(208,233,255,0.24)',
+ 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)'
+ }
+ ];
+
+ const menu = Gio.Menu.new();
+ const group = Gio.SimpleActionGroup.new();
+ const groupName = 'fire-presets';
+
+ // Add all presets.
+ presets.forEach((preset, i) => {
+ const actionName = 'fire' + i;
+ menu.append(preset.name, groupName + '.' + actionName);
+ let action = Gio.SimpleAction.new(actionName, null);
+
+ // Load the preset on activation.
+ action.connect('activate', () => {
+ dialog.getProfileSettings().set_double('fire-movement-speed', preset.speed);
+ dialog.getProfileSettings().set_double('fire-scale', preset.scale);
+ dialog.getProfileSettings().set_string('fire-color-1', preset.color1);
+ dialog.getProfileSettings().set_string('fire-color-2', preset.color2);
+ dialog.getProfileSettings().set_string('fire-color-3', preset.color3);
+ dialog.getProfileSettings().set_string('fire-color-4', preset.color4);
+ dialog.getProfileSettings().set_string('fire-color-5', preset.color5);
+ });
+
+ group.add_action(action);
+ });
+
+ dialog.getBuilder().get_object('fire-preset-button').set_menu_model(menu);
+
+ const root = widget.get_root();
+ root.insert_action_group(groupName, group);
+ });
+ }
+}
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Focus.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Focus.js
new file mode 100644
index 0000000..7e18fd8
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Focus.js
@@ -0,0 +1,99 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ 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 uses a blur effect to allow the window to focus in and out of view. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uBlurAmount = shader.get_uniform_location('uBlurAmount');
+ shader._uBlurQuality = shader.get_uniform_location('uBlurQuality');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ shader.set_uniform_float(shader._uBlurAmount, 1, [
+ settings.get_int('focus-blur-amount'),
+ ]);
+
+ shader.set_uniform_float(shader._uBlurQuality, 1, [
+ settings.get_int('focus-blur-quality'),
+ ]);
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- 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 'focus';
+ }
+
+ // 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 _('Focus');
+ }
+
+ // -------------------------------------------------------------------- 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) {
+ // These connect the settings to the UI elements. Have a look at prefs.js
+ // on how to bind other types of UI elements.
+ dialog.bindAdjustment('focus-animation-time');
+ dialog.bindAdjustment('focus-blur-amount');
+ dialog.bindAdjustment('focus-blur-quality');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glide.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glide.js
new file mode 100644
index 0000000..7aee968
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glide.js
@@ -0,0 +1,101 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// 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 very simple effect fades the window to transparency with subtle 3D effects. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uScale = shader.get_uniform_location('uScale');
+ shader._uSquish = shader.get_uniform_location('uSquish');
+ shader._uTilt = shader.get_uniform_location('uTilt');
+ shader._uShift = shader.get_uniform_location('uShift');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('glide-scale')]);
+ shader.set_uniform_float(shader._uSquish, 1, [settings.get_double('glide-squish')]);
+ shader.set_uniform_float(shader._uTilt, 1, [settings.get_double('glide-tilt')]);
+ shader.set_uniform_float(shader._uShift, 1, [settings.get_double('glide-shift')]);
+ // 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').
+ static getNick() {
+ return 'glide';
+ }
+
+ // 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 _('Glide');
+ }
+
+ // -------------------------------------------------------------------- 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('glide-animation-time');
+ dialog.bindAdjustment('glide-scale');
+ dialog.bindAdjustment('glide-squish');
+ dialog.bindAdjustment('glide-tilt');
+ dialog.bindAdjustment('glide-shift');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glitch.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glitch.js
new file mode 100644
index 0000000..492d6e1
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Glitch.js
@@ -0,0 +1,103 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect applies some intentional graphics issues to your windows. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uSeed = shader.get_uniform_location('uSeed');
+ shader._uColor = shader.get_uniform_location('uColor');
+ shader._uScale = shader.get_uniform_location('uScale');
+ shader._uStrength = shader.get_uniform_location('uStrength');
+ shader._uSpeed = shader.get_uniform_location('uSpeed');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uSeed, 1, [testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uColor, 4, utils.parseColor(settings.get_string('glitch-color')));
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('glitch-scale')]);
+ shader.set_uniform_float(shader._uStrength, 1, [settings.get_double('glitch-strength')]);
+ shader.set_uniform_float(shader._uSpeed, 1, [settings.get_double('glitch-speed')]);
+ // 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').
+ static getNick() {
+ return 'glitch';
+ }
+
+ // 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 _('Glitch');
+ }
+
+ // -------------------------------------------------------------------- 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('glitch-animation-time');
+ dialog.bindAdjustment('glitch-scale');
+ dialog.bindAdjustment('glitch-speed');
+ dialog.bindAdjustment('glitch-strength');
+ dialog.bindColorButton('glitch-color');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Hexagon.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Hexagon.js
new file mode 100644
index 0000000..5adb59c
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Hexagon.js
@@ -0,0 +1,107 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect overlays a glowing hexagonal grid over the window. The grid cells then //
+// gradually shrink until the window is fully dissolved. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uAdditiveBlending = shader.get_uniform_location('uAdditiveBlending');
+ shader._uSeed = shader.get_uniform_location('uSeed');
+ shader._uScale = shader.get_uniform_location('uScale');
+ shader._uLineWidth = shader.get_uniform_location('uLineWidth');
+ shader._uGlowColor = shader.get_uniform_location('uGlowColor');
+ shader._uLineColor = shader.get_uniform_location('uLineColor');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uAdditiveBlending, 1, [settings.get_boolean('hexagon-additive-blending')]);
+ shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('hexagon-scale')]);
+ shader.set_uniform_float(shader._uLineWidth, 1, [settings.get_double('hexagon-line-width')]);
+ shader.set_uniform_float(shader._uGlowColor, 4, utils.parseColor(settings.get_string('hexagon-glow-color')));
+ shader.set_uniform_float(shader._uLineColor, 4, utils.parseColor(settings.get_string('hexagon-line-color')));
+ // 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').
+ static getNick() {
+ return 'hexagon';
+ }
+
+ // 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 _('Hexagon');
+ }
+
+ // -------------------------------------------------------------------- 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('hexagon-animation-time');
+ dialog.bindAdjustment('hexagon-scale');
+ dialog.bindAdjustment('hexagon-line-width');
+ dialog.bindColorButton('hexagon-line-color');
+ dialog.bindColorButton('hexagon-glow-color');
+ dialog.bindSwitch('hexagon-additive-blending');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Incinerate.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Incinerate.js
new file mode 100644
index 0000000..beb1e06
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Incinerate.js
@@ -0,0 +1,149 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect burns windows to ashes. The fire starts at a random position at the //
+// window's boundary and then burns through the window in a circular shape. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uSeed = shader.get_uniform_location('uSeed');
+ shader._uColor = shader.get_uniform_location('uColor');
+ shader._uScale = shader.get_uniform_location('uScale');
+ shader._uTurbulence = shader.get_uniform_location('uTurbulence');
+ shader._uStartPos = shader.get_uniform_location('uStartPos');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect(
+ 'begin-animation', (shader, settings, forOpening, testMode, actor) => {
+ // If we are currently performing integration test, the animation uses a fixed
+ // seed.
+ let seed = [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()];
+
+ // If this option is set, we use the mouse pointer position. Because the actor
+ // position may change after the begin-animation signal is called, we set the
+ // uStartPos uniform during the update callback.
+ if (settings.get_boolean('incinerate-use-pointer')) {
+ shader._startPointerPos = global.get_pointer();
+ shader._actor = actor;
+
+ } else {
+ // Else, a random position along the window boundary is used as start position
+ // for the incinerate effect.
+ let startPos = seed[0] > seed[1] ? [seed[0], Math.floor(seed[1] + 0.5)] :
+ [Math.floor(seed[0] + 0.5), seed[1]];
+
+ shader.set_uniform_float(shader._uStartPos, 2, startPos);
+
+ shader._startPointerPos = null;
+ }
+
+ // clang-format off
+ shader.set_uniform_float(shader._uSeed, 2, seed);
+ shader.set_uniform_float(shader._uColor, 3, utils.parseColor(settings.get_string('incinerate-color')));
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('incinerate-scale')]);
+ shader.set_uniform_float(shader._uTurbulence, 1, [settings.get_double('incinerate-turbulence')]);
+ // clang-format on
+ });
+
+ // If the mouse pointer position is used as start position, we set the uStartPos
+ // uniform during the update callback as the actor position may not be set up
+ // properly before the begin animation callback.
+ shader.connect('update-animation', (shader) => {
+ if (shader._startPointerPos) {
+ const [x, y] = shader._startPointerPos;
+ const [ok, localX, localY] = shader._actor.transform_stage_point(x, y);
+
+ if (ok) {
+ let startPos = [
+ Math.max(0.0, Math.min(1.0, localX / shader._actor.width)),
+ Math.max(0.0, Math.min(1.0, localY / shader._actor.height))
+ ];
+ shader.set_uniform_float(shader._uStartPos, 2, startPos);
+ }
+ }
+ });
+
+ // Make sure to drop the reference to the actor.
+ shader.connect('end-animation', (shader) => {
+ shader._actor = null;
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // This effect is available on all supported GNOME Shell versions.
+ 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').
+ static getNick() {
+ return 'incinerate';
+ }
+
+ // 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 _('Incinerate');
+ }
+
+ // -------------------------------------------------------------------- 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('incinerate-animation-time');
+ dialog.bindAdjustment('incinerate-scale');
+ dialog.bindAdjustment('incinerate-turbulence');
+ dialog.bindSwitch('incinerate-use-pointer');
+ dialog.bindColorButton('incinerate-color');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Matrix.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Matrix.js
new file mode 100644
index 0000000..45065ec
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Matrix.js
@@ -0,0 +1,125 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// The Matrix shader multiplies a grid of random letters with some gradients which are //
+// moving from top to bottom. The speed of the moving gradients is chosen randomly. //
+// Also, there is a random delay making the gradients not drop all at the same time. //
+// This effect is not available on GNOME 3.3x, due to the limitation described in the //
+// documentation of vfunc_paint_target further down in this file. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Create the texture in the first call.
+ if (!this._fontTexture) {
+ this._fontTexture = utils.getImageResource('/img/matrixFont.png');
+ }
+
+ // Store uniform locations of newly created shaders.
+ shader._uFontTexture = shader.get_uniform_location('uFontTexture');
+ shader._uTrailColor = shader.get_uniform_location('uTrailColor');
+ shader._uTipColor = shader.get_uniform_location('uTipColor');
+ shader._uLetterSize = shader.get_uniform_location('uLetterSize');
+ shader._uRandomness = shader.get_uniform_location('uRandomness');
+ shader._uOverShoot = shader.get_uniform_location('uOverShoot');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uTrailColor, 3, utils.parseColor(settings.get_string('matrix-trail-color')));
+ shader.set_uniform_float(shader._uTipColor, 3, utils.parseColor(settings.get_string('matrix-tip-color')));
+ shader.set_uniform_float(shader._uLetterSize, 1, [settings.get_int('matrix-scale')]);
+ shader.set_uniform_float(shader._uRandomness, 1, [settings.get_double('matrix-randomness')]);
+ shader.set_uniform_float(shader._uOverShoot, 1, [settings.get_double('matrix-overshoot')]);
+ // clang-format on
+ });
+
+ // This is required to bind the font texture for drawing. Sadly, this seems to be
+ // impossible under GNOME 3.3x as this.get_pipeline() is not available. It was
+ // called get_target() back then but this is not wrapped in GJS.
+ // https://gitlab.gnome.org/GNOME/mutter/-/blob/gnome-3-36/clutter/clutter/clutter-offscreen-effect.c#L598
+ shader.connect('update-animation', (shader) => {
+ const pipeline = shader.get_pipeline();
+
+ // Bind the font texture.
+ pipeline.set_layer_texture(1, this._fontTexture.get_texture());
+ pipeline.set_uniform_1i(shader._uFontTexture, 1);
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // This effect is only available on GNOME Shell 40+.
+ static getMinShellVersion() {
+ return [40, 0];
+ }
+
+ // 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').
+ static getNick() {
+ return 'matrix';
+ }
+
+ // 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 _('Matrix');
+ }
+
+ // -------------------------------------------------------------------- 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('matrix-animation-time');
+ dialog.bindAdjustment('matrix-scale');
+ dialog.bindAdjustment('matrix-randomness');
+ dialog.bindAdjustment('matrix-overshoot');
+ dialog.bindColorButton('matrix-trail-color');
+ dialog.bindColorButton('matrix-tip-color');
+ }
+
+ // ---------------------------------------------------------------- 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 + settings.get_double('matrix-overshoot')};
+ }
+}
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Mushroom.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Mushroom.js
new file mode 100644
index 0000000..a7ee166
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Mushroom.js
@@ -0,0 +1,384 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ 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/<nick>.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 = 'mushroom-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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PaintBrush.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PaintBrush.js
new file mode 100644
index 0000000..d352833
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PaintBrush.js
@@ -0,0 +1,115 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect paints your windows with a thick paint brush. //
+// This effect is not available on GNOME 3.3x, due to the limitation described in the //
+// documentation of vfunc_paint_target further down in this file. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Create the texture in the first call.
+ if (!this._brushTexture) {
+ this._brushTexture = utils.getImageResource('/img/brush.png', true);
+ }
+
+ // Store uniform locations of newly created shaders.
+ shader._uBrushTexture = shader.get_uniform_location('uBrushTexture');
+ shader._uBrushSize = shader.get_uniform_location('uBrushSize');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ shader.set_uniform_float(shader._uBrushSize, 1,
+ [settings.get_int('paint-brush-size')]);
+ });
+
+ // This is required to bind the brush texture for drawing. Sadly, this seems to be
+ // impossible under GNOME 3.3x as this.get_pipeline() is not available. It was
+ // called get_target() back then but this is not wrapped in GJS.
+ // https://gitlab.gnome.org/GNOME/mutter/-/blob/gnome-3-36/clutter/clutter/clutter-offscreen-effect.c#L598
+ shader.connect('update-animation', (shader) => {
+ const pipeline = shader.get_pipeline();
+
+ // Use linear filtering for the window texture.
+ pipeline.set_layer_filters(0, Cogl.PipelineFilter.LINEAR,
+ Cogl.PipelineFilter.LINEAR);
+
+ // Bind the brush texture.
+ pipeline.set_layer_texture(1, this._brushTexture.get_texture());
+ pipeline.set_uniform_1i(shader._uBrushTexture, 1);
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // This effect is only available on GNOME Shell 40+.
+ static getMinShellVersion() {
+ return [40, 0];
+ }
+
+ // 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').
+ static getNick() {
+ return 'paint-brush';
+ }
+
+ // 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 _('Paint Brush');
+ }
+
+ // -------------------------------------------------------------------- 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('paint-brush-animation-time');
+ dialog.bindAdjustment('paint-brush-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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWheel.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWheel.js
new file mode 100644
index 0000000..af74c72
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWheel.js
@@ -0,0 +1,95 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// 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 simple effect pixelates the window texture and hides the pixels in a wheel-like //
+// fashion. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uPixelSize = shader.get_uniform_location('uPixelSize');
+ shader._uSpokeCount = shader.get_uniform_location('uSpokeCount');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uPixelSize, 1, [settings.get_double('pixel-wheel-pixel-size')]);
+ shader.set_uniform_float(shader._uSpokeCount, 1, [settings.get_int('pixel-wheel-spoke-count')]);
+ // 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').
+ static getNick() {
+ return 'pixel-wheel';
+ }
+
+ // 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 _('Pixel Wheel');
+ }
+
+ // -------------------------------------------------------------------- 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('pixel-wheel-animation-time');
+ dialog.bindAdjustment('pixel-wheel-pixel-size');
+ dialog.bindAdjustment('pixel-wheel-spoke-count');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWipe.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWipe.js
new file mode 100644
index 0000000..6f9a3bc
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/PixelWipe.js
@@ -0,0 +1,120 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// 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 pixelates the window texture and hides the pixels radially, starting //
+// from the pointer position. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uPixelSize = shader.get_uniform_location('uPixelSize');
+ shader._uStartPos = shader.get_uniform_location('uStartPos');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect(
+ 'begin-animation', (shader, settings, forOpening, testMode, actor) => {
+ // Because the actor position may change after the begin-animation signal is
+ // called, we set the uStartPos uniform during the update callback.
+ shader._startPointerPos = global.get_pointer();
+ shader._actor = actor;
+
+ shader.set_uniform_float(shader._uPixelSize, 1,
+ [settings.get_int('pixel-wipe-pixel-size')]);
+ });
+
+ // We set the uStartPos uniform during the update callback as the actor position
+ // may not be set up properly before the begin animation callback.
+ shader.connect('update-animation', (shader) => {
+ if (shader._startPointerPos) {
+ const [x, y] = shader._startPointerPos;
+ const [ok, localX, localY] = shader._actor.transform_stage_point(x, y);
+
+ if (ok) {
+ let startPos = [
+ Math.max(0.0, Math.min(1.0, localX / shader._actor.width)),
+ Math.max(0.0, Math.min(1.0, localY / shader._actor.height))
+ ];
+ shader.set_uniform_float(shader._uStartPos, 2, startPos);
+ }
+ }
+ });
+
+ // Make sure to drop the reference to the actor.
+ shader.connect('end-animation', (shader) => {
+ shader._actor = null;
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- 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').
+ static getNick() {
+ return 'pixel-wipe';
+ }
+
+ // 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 _('Pixel Wipe');
+ }
+
+ // -------------------------------------------------------------------- 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('pixel-wipe-animation-time');
+ dialog.bindAdjustment('pixel-wipe-pixel-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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Pixelate.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Pixelate.js
new file mode 100644
index 0000000..1730b59
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Pixelate.js
@@ -0,0 +1,95 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// 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 very simple effect pixelates the window texture and randomly hides pixels until //
+// the entire window is gone. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uNoise = shader.get_uniform_location('uNoise');
+ shader._uPixelSize = shader.get_uniform_location('uPixelSize');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uNoise, 1, [settings.get_double('pixelate-noise')]);
+ shader.set_uniform_float(shader._uPixelSize, 1, [settings.get_int('pixelate-pixel-size')]);
+ // 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').
+ static getNick() {
+ return 'pixelate';
+ }
+
+ // 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 _('Pixelate');
+ }
+
+ // -------------------------------------------------------------------- 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('pixelate-animation-time');
+ dialog.bindAdjustment('pixelate-noise');
+ dialog.bindAdjustment('pixelate-pixel-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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Portal.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Portal.js
new file mode 100644
index 0000000..21f7a4e
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Portal.js
@@ -0,0 +1,105 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This ridiculous effect teleports your windows from and to alternative dimensions. //
+// It may resemble the portal from a well-known cartoon series... //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uSeed = shader.get_uniform_location('uSeed');
+ shader._uColor = shader.get_uniform_location('uColor');
+ shader._uDetails = shader.get_uniform_location('uDetails');
+ shader._uRotationSpeed = shader.get_uniform_location('uRotationSpeed');
+ shader._uWhirling = shader.get_uniform_location('uWhirling');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uColor, 3, utils.parseColor(settings.get_string('portal-color')));
+ shader.set_uniform_float(shader._uDetails, 1, [settings.get_double('portal-details')]);
+ shader.set_uniform_float(shader._uRotationSpeed, 1, [settings.get_double('portal-rotation-speed')]);
+ shader.set_uniform_float(shader._uWhirling, 1, [settings.get_double('portal-whirling')]);
+ // 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').
+ static getNick() {
+ return 'portal';
+ }
+
+ // 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 _('Portal');
+ }
+
+ // -------------------------------------------------------------------- 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('portal-animation-time');
+ dialog.bindAdjustment('portal-rotation-speed');
+ dialog.bindAdjustment('portal-whirling');
+ dialog.bindAdjustment('portal-details');
+ dialog.bindColorButton('portal-color');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/RGBWarp.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/RGBWarp.js
new file mode 100644
index 0000000..e8ab802
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/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/<nick>.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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/SnapOfDisintegration.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/SnapOfDisintegration.js
new file mode 100644
index 0000000..3bb4417
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/SnapOfDisintegration.js
@@ -0,0 +1,126 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effects dissolves your windows into a cloud of dust. For this, it uses an //
+// approach similar to the Broken Glass effect. A dust texture is used to segment the //
+// window texture into a set of layers. Each layer is then moved, sheared and scaled //
+// randomly. Just a few layers are sufficient to create the illusion of many individual //
+// dust particles. //
+// This effect is not available on GNOME 3.3x, due to the limitation described in the //
+// documentation of vfunc_paint_target further down in this file. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Create the texture in the first call.
+ if (!this._dustTexture) {
+ this._dustTexture = utils.getImageResource('/img/dust.png');
+ }
+
+ // Store uniform locations of newly created shaders.
+ shader._uDustTexture = shader.get_uniform_location('uDustTexture');
+ shader._uDustColor = shader.get_uniform_location('uDustColor');
+ shader._uSeed = shader.get_uniform_location('uSeed');
+ shader._uDustScale = shader.get_uniform_location('uDustScale');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uDustColor, 4, utils.parseColor(settings.get_string('snap-color')));
+ shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uDustScale, 1, [settings.get_double('snap-scale')]);
+ // clang-format on
+ });
+
+ // This is required to bind the dust texture for drawing. Sadly, this seems to be
+ // impossible under GNOME 3.3x as this.get_pipeline() is not available. It was
+ // called get_target() back then but this is not wrapped in GJS.
+ // https://gitlab.gnome.org/GNOME/mutter/-/blob/gnome-3-36/clutter/clutter/clutter-offscreen-effect.c#L598
+ shader.connect('update-animation', (shader) => {
+ const pipeline = shader.get_pipeline();
+
+ // Use linear filtering for the window texture.
+ pipeline.set_layer_filters(0, Cogl.PipelineFilter.LINEAR,
+ Cogl.PipelineFilter.LINEAR);
+
+ // Bind the dust texture.
+ pipeline.set_layer_texture(1, this._dustTexture.get_texture());
+ pipeline.set_layer_wrap_mode(1, Cogl.PipelineWrapMode.REPEAT);
+ pipeline.set_uniform_1i(shader._uDustTexture, 1);
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // This effect is only available on GNOME Shell 40+.
+ static getMinShellVersion() {
+ return [40, 0];
+ }
+
+ // 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').
+ static getNick() {
+ return 'snap';
+ }
+
+ // 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 _('Snap of Disintegration');
+ }
+
+ // -------------------------------------------------------------------- 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('snap-animation-time');
+ dialog.bindAdjustment('snap-scale');
+ dialog.bindColorButton('snap-color');
+ }
+
+ // ---------------------------------------------------------------- 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.2, y: 1.2};
+ }
+}
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TRexAttack.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TRexAttack.js
new file mode 100644
index 0000000..3c7f278
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TRexAttack.js
@@ -0,0 +1,128 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect tears your windows apart with a series of violent scratches! //
+// This effect is not available on GNOME 3.3x, due to the limitation described in the //
+// documentation of vfunc_paint_target further down in this file. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.glsl. The callback will be called for each
+ // newly created shader instance.
+ constructor() {
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
+ // Create the texture in the first call.
+ if (!this._clawTexture) {
+ this._clawTexture = utils.getImageResource('/img/claws.png');
+ }
+
+ // Store uniform locations of newly created shaders.
+ shader._uClawTexture = shader.get_uniform_location('uClawTexture');
+ shader._uFlashColor = shader.get_uniform_location('uFlashColor');
+ shader._uSeed = shader.get_uniform_location('uSeed');
+ shader._uClawSize = shader.get_uniform_location('uClawSize');
+ shader._uNumClaws = shader.get_uniform_location('uNumClaws');
+ shader._uWarpIntensity = shader.get_uniform_location('uWarpIntensity');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uFlashColor, 4, utils.parseColor(settings.get_string('trex-scratch-color')));
+ shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uClawSize, 1, [settings.get_double('trex-scratch-scale')]);
+ shader.set_uniform_float(shader._uNumClaws, 1, [settings.get_int('trex-scratch-count')]);
+ shader.set_uniform_float(shader._uWarpIntensity, 1, [settings.get_double('trex-scratch-warp')]);
+ // clang-format on
+ });
+
+ // This is required to bind the claw texture for drawing. Sadly, this seems to be
+ // impossible under GNOME 3.3x as this.get_pipeline() is not available. It was
+ // called get_target() back then but this is not wrapped in GJS.
+ // https://gitlab.gnome.org/GNOME/mutter/-/blob/gnome-3-36/clutter/clutter/clutter-offscreen-effect.c#L598
+ shader.connect('update-animation', (shader) => {
+ const pipeline = shader.get_pipeline();
+
+ // Use linear filtering for the window texture.
+ pipeline.set_layer_filters(0, Cogl.PipelineFilter.LINEAR,
+ Cogl.PipelineFilter.LINEAR);
+
+ // Bind the claw texture.
+ pipeline.set_layer_texture(1, this._clawTexture.get_texture());
+ pipeline.set_uniform_1i(shader._uClawTexture, 1);
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- metadata
+
+ // This effect is only available on GNOME Shell 40+.
+ static getMinShellVersion() {
+ return [40, 0];
+ }
+
+ // 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').
+ static getNick() {
+ return 'trex';
+ }
+
+ // 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 _('T-Rex Attack');
+ }
+
+ // -------------------------------------------------------------------- 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('trex-animation-time');
+ dialog.bindColorButton('trex-scratch-color');
+ dialog.bindAdjustment('trex-scratch-scale');
+ dialog.bindAdjustment('trex-scratch-count');
+ dialog.bindAdjustment('trex-scratch-warp');
+ }
+
+ // ---------------------------------------------------------------- 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) {
+ const scale = 1.0 + 0.5 * settings.get_double('trex-scratch-warp');
+ return {x: scale, y: scale};
+ }
+}
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVEffect.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVEffect.js
new file mode 100644
index 0000000..f551f6f
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVEffect.js
@@ -0,0 +1,93 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect hides the actor by making it first transparent from top and bottom //
+// towards the middle and then hiding the resulting line from left and right towards //
+// the center. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uColor = shader.get_uniform_location('uColor');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings) => {
+ shader.set_uniform_float(
+ shader._uColor, 4, utils.parseColor(settings.get_string('tv-effect-color')));
+ });
+ });
+ }
+
+ // ---------------------------------------------------------------------------- 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').
+ static getNick() {
+ return 'tv';
+ }
+
+ // 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 _('TV Effect');
+ }
+
+ // -------------------------------------------------------------------- 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('tv-animation-time');
+ dialog.bindColorButton('tv-effect-color');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVGlitch.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVGlitch.js
new file mode 100644
index 0000000..b50fa8d
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TVGlitch.js
@@ -0,0 +1,104 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect combines the Glitch and the TV Effect. Credits go to Kurt Wilson //
+// (https://github.com/Kurtoid) for this idea! //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uSeed = shader.get_uniform_location('uSeed');
+ shader._uColor = shader.get_uniform_location('uColor');
+ shader._uScale = shader.get_uniform_location('uScale');
+ shader._uStrength = shader.get_uniform_location('uStrength');
+ shader._uSpeed = shader.get_uniform_location('uSpeed');
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ // clang-format off
+ shader.set_uniform_float(shader._uSeed, 1, [testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uColor, 4, utils.parseColor(settings.get_string('tv-glitch-color')));
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('tv-glitch-scale')]);
+ shader.set_uniform_float(shader._uStrength, 1, [settings.get_double('tv-glitch-strength')]);
+ shader.set_uniform_float(shader._uSpeed, 1, [settings.get_double('tv-glitch-speed')]);
+ // 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. '*-close-effect'), and its animation time
+ // (e.g. '*-animation-time').
+ static getNick() {
+ return 'tv-glitch';
+ }
+
+ // 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 _('TV Glitch');
+ }
+
+ // -------------------------------------------------------------------- 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('tv-glitch-animation-time');
+ dialog.bindAdjustment('tv-glitch-scale');
+ dialog.bindAdjustment('tv-glitch-speed');
+ dialog.bindAdjustment('tv-glitch-strength');
+ dialog.bindColorButton('tv-glitch-color');
+ }
+
+ // ---------------------------------------------------------------- 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TeamRocket.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/TeamRocket.js
new file mode 100644
index 0000000..c1d54d8
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/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/<nick>.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._uAnimationSplit = shader.get_uniform_location('uAnimationSplit');
+ shader._uHorizontalSparklePosition =
+ shader.get_uniform_location('uHorizontalSparklePosition');
+ shader._uVerticalSparklePosition =
+ shader.get_uniform_location('uVerticalSparklePosition');
+ shader._uWindowRotation = shader.get_uniform_location('uWindowRotation');
+ 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._uAnimationSplit, 1, [settings.get_double('team-rocket-animation-split')]);
+ shader.set_uniform_float(shader._uHorizontalSparklePosition, 1, [settings.get_double('team-rocket-horizontal-sparkle-position')]);
+ shader.set_uniform_float(shader._uVerticalSparklePosition, 1, [settings.get_double('team-rocket-vertical-sparkle-position')]);
+ shader.set_uniform_float(shader._uWindowRotation, 1, [settings.get_boolean('team-rocket-window-rotation')]);
+ 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-animation-split');
+ dialog.bindAdjustment('team-rocket-horizontal-sparkle-position');
+ dialog.bindAdjustment('team-rocket-vertical-sparkle-position');
+ dialog.bindSwitch('team-rocket-window-rotation');
+ 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/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Wisps.js b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Wisps.js
new file mode 100644
index 0000000..aa8482c
--- /dev/null
+++ b/raveos-gnome-theme/theme-data/extensions/installed/burn-my-windows@schneegans.github.com/src/effects/Wisps.js
@@ -0,0 +1,120 @@
+//////////////////////////////////////////////////////////////////////////////////////////
+// ) ( //
+// ( /( ( ( ) ( ( ( ( )\ ) ( ( //
+// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( //
+// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ //
+// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) //
+// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< //
+// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ //
+// |__/ //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// SPDX-FileCopyrightText: Simon Schneegans <code@simonschneegans.de>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+'use strict';
+
+import * as utils from '../utils.js';
+
+// We import some modules only in the Shell process as they are not available in the
+// preferences process. They are used only in the creator function of the ShaderFactory
+// which is only called within GNOME Shell's process.
+const ShaderFactory = await utils.importInShellOnly('./ShaderFactory.js');
+const Clutter = await utils.importInShellOnly('gi://Clutter');
+
+const _ = await utils.importGettext();
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// This effect lets your windows be carried to the realm of dreams by some little //
+// fairies. It's implemented with several overlaid grids of randomly moving points. //
+//////////////////////////////////////////////////////////////////////////////////////////
+
+// 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/<nick>.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._uSeed = shader.get_uniform_location('uSeed');
+ shader._uScale = shader.get_uniform_location('uScale');
+ shader._uColor = [
+ shader.get_uniform_location('uColor1'),
+ shader.get_uniform_location('uColor2'),
+ shader.get_uniform_location('uColor3'),
+ ];
+
+ // Write all uniform values at the start of each animation.
+ shader.connect('begin-animation', (shader, settings, forOpening, testMode) => {
+ for (let i = 1; i <= 3; i++) {
+ shader.set_uniform_float(
+ shader._uColor[i - 1], 3,
+ utils.parseColor(settings.get_string('wisps-color-' + i)));
+ }
+
+ // clang-format off
+ shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
+ shader.set_uniform_float(shader._uScale, 1, [settings.get_double('wisps-scale')]);
+ // 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. the '*-enable-effect').
+ static getNick() {
+ return 'wisps';
+ }
+
+ // 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 _('Wisps');
+ }
+
+ // -------------------------------------------------------------------- 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('wisps-animation-time');
+ dialog.bindAdjustment('wisps-scale');
+ dialog.bindColorButton('wisps-color-1');
+ dialog.bindColorButton('wisps-color-2');
+ dialog.bindColorButton('wisps-color-3');
+
+ // Connect the buttons only once. The bindPreferences can be called multiple times...
+ if (!this._isConnected) {
+ this._isConnected = true;
+
+ // The wisps-color-reset button needs to be bound explicitly.
+ dialog.getBuilder().get_object('reset-wisps-colors').connect('clicked', () => {
+ dialog.getProfileSettings().reset('wisps-color-1');
+ dialog.getProfileSettings().reset('wisps-color-2');
+ dialog.getProfileSettings().reset('wisps-color-3');
+ });
+ }
+ }
+
+ // ---------------------------------------------------------------- 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};
+ }
+}