diff --git a/CinnamonBurnMyWindows@klangman/CHANGELOG.md b/CinnamonBurnMyWindows@klangman/CHANGELOG.md index 20cfdd78..f3aba9fd 100644 --- a/CinnamonBurnMyWindows@klangman/CHANGELOG.md +++ b/CinnamonBurnMyWindows@klangman/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.9.5 + +* Added a new "Focus" effect by Justin Garza + ## 0.9.4 * Fixed an issue that could interfere with other Cinnamon effects by returning true from Cinnamon's _shouldAnimate(). Some effects like Restore and Manximize might occur even when they were disabled in the Cinnamon Effects setting application. Also some BurnMyWindows effect could happen on events other than window open/close events (but I didn't ever see this occur myself). diff --git a/CinnamonBurnMyWindows@klangman/README.md b/CinnamonBurnMyWindows@klangman/README.md index 86f04d02..30f58c31 100644 --- a/CinnamonBurnMyWindows@klangman/README.md +++ b/CinnamonBurnMyWindows@klangman/README.md @@ -35,6 +35,7 @@ The window shadows are not part of the animation and therefore they suddenly app - Doom - Energize A - Energize B +- Focus - Glide - Glitch - Hexagon diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/effects/Focus.js b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/effects/Focus.js new file mode 100644 index 00000000..599305b4 --- /dev/null +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/effects/Focus.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(); +const {ShaderFactory} = require('./ShaderFactory.js'); + +const Gettext = imports.gettext; +const GLib = imports.gi.GLib; +const UUID = "CinnamonBurnMyWindows@klangman"; + +Gettext.bindtextdomain(UUID, GLib.get_home_dir() + "/.local/share/locale"); + +function _(text) { + let locText = Gettext.dgettext(UUID, text); + if (locText == text) { + locText = window._(text); + } + return locText; +} + +////////////////////////////////////////////////////////////////////////////////////////// +// 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. +var Effect = class Effect { + // The constructor creates a ShaderFactory which will be used by extension.js to create + // shader instances for this effect. The shaders will be automagically created using the + // GLSL file in resources/shaders/.glsl. The callback will be called for each + // newly created shader instance. + constructor() { + this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => { + // Store uniform locations of newly created shaders. + shader._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.getValue('focus-blur-amount'), + ]); + + shader.set_uniform_float(shader._uBlurQuality, 1, [ + settings.getValue('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/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/extension.js b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/extension.js index 995c1200..adb648a8 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/extension.js +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/extension.js @@ -22,6 +22,7 @@ const Doom = require('./effects/Doom.js'); const EnergizeA = require('./effects/EnergizeA.js'); const EnergizeB = require('./effects/EnergizeB.js'); const Fire = require('./effects/Fire.js'); +const Focus = require('./effects/Focus.js'); const Glide = require('./effects/Glide.js'); const Glitch = require('./effects/Glitch.js'); const Hexagon = require('./effects/Hexagon.js'); @@ -58,6 +59,7 @@ const Effect = { EnergizeA: 3, EnergizeB: 4, Fire: 5, + Focus: 21, Glide: 6, Glitch: 7, Hexagon: 8, @@ -108,7 +110,9 @@ class BurnMyWindows { // This function could be called after the extension is enabled, which could be done // from GNOME Tweaks, when you log in or when the screen is unlocked. enable() { - // New effects must be registered here and in prefs.js. + // Effects in this array must be ordered by effect number as defined by the setting-schema.json. + // New effects will be added in alphabetical order in the UI list, but the effect number, and + // therefore the order in this array, might not be alphabetical. this._ALL_EFFECTS = [ new Apparition.Effect(), new BrokenGlass.Effect(), @@ -131,6 +135,7 @@ class BurnMyWindows { new TVEffect.Effect(), new TVGlitch.Effect(), new Wisps.Effect(), + new Focus.Effect(), ]; // Store a reference to the settings object. @@ -275,6 +280,8 @@ class BurnMyWindows { effectOptions.push(Effect.EnergizeB); //if (this._settings.getValue("file-random-include" + append)) // effectOptions.push(Effect.Fire); + if (this._settings.getValue("focus-random-include" + append)) + effectOptions.push(Effect.Focus); if (this._settings.getValue("glide-random-include" + append)) effectOptions.push(Effect.Glide); if (this._settings.getValue("glitch-random-include" + append)) diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/settings-schema.json b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/settings-schema.json index 7402cf70..efed3fd7 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/settings-schema.json +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/6.2/settings-schema.json @@ -43,6 +43,7 @@ "doom-horizontal-scale", "doom-vertical-scale", "doom-pixel-size", "doom-animation-time", "energize-a-scale", "energize-a-color", "energize-a-animation-time", "energize-b-scale", "energize-b-color", "energize-b-animation-time", + "focus-blur-amount", "focus-blur-quality", "focus-animation-time", "glide-scale", "glide-squish", "glide-tilt", "glide-shift", "glide-animation-time", "glitch-scale", "glitch-strength", "glitch-speed", "glitch-color", "glitch-animation-time", "hexagon-scale", "hexagon-line-width", "hexagon-line-color", "hexagon-glow-color", "hexagon-additive-blending", "hexagon-animation-time", @@ -58,7 +59,7 @@ "random-section" : { "type" : "section", "title" : "Effects included in the randomized sets:", - "keys" : ["random-title", "apparition-random-include", "doom-random-include", "energize-a-random-include", "energize-b-random-include", "glide-random-include", "glitch-random-include", "hexagon-random-include", "incinerate-random-include", "pixelate-random-include", "pixel-wheel-random-include", "pixel-wipe-random-include", "portal-random-include", "tv-effect-random-include", "tv-glitch-random-include", "wisps-random-include"] + "keys" : ["random-title", "apparition-random-include", "doom-random-include", "energize-a-random-include", "energize-b-random-include", "focus-random-include", "glide-random-include", "glitch-random-include", "hexagon-random-include", "incinerate-random-include", "pixelate-random-include", "pixel-wheel-random-include", "pixel-wipe-random-include", "portal-random-include", "tv-effect-random-include", "tv-glitch-random-include", "wisps-random-include"] } }, @@ -72,6 +73,7 @@ "Doom": 2, "Energize A": 3, "Energize B": 4, + "Focus": 21, "Glide": 6, "Glitch": 7, "Hexagon": 8, @@ -92,6 +94,7 @@ "Doom": 2, "Energize A": 3, "Energize B": 4, + "Focus": 21, "Glide": 6, "Glitch": 7, "Hexagon": 8, @@ -160,6 +163,14 @@ "open" : "energize-b-random-include-open", "close" : "energize-b-random-include-close" }, + "focus-random-include": { + "type" : "custom", + "file" : "CustomWidgets.py", + "widget" : "TwoCheckButtonsWidget", + "description" : "Focus", + "open" : "focus-random-include-open", + "close" : "focus-random-include-close" + }, "glide-random-include": { "type" : "custom", "file" : "CustomWidgets.py", @@ -253,6 +264,7 @@ "doom-random-include-open" : { "type": "generic", "default": true }, "energize-a-random-include-open" : { "type": "generic", "default": true }, "energize-b-random-include-open" : { "type": "generic", "default": true }, + "focus-random-include-open" : { "type": "generic", "default": true }, "glide-random-include-open" : { "type": "generic", "default": true }, "glitch-random-include-open" : { "type": "generic", "default": true }, "hexagon-random-include-open" : { "type": "generic", "default": true }, @@ -269,6 +281,7 @@ "doom-random-include-close" : { "type": "generic", "default": true }, "energize-a-random-include-close" : { "type": "generic", "default": true }, "energize-b-random-include-close" : { "type": "generic", "default": true }, + "focus-random-include-close" : { "type": "generic", "default": true }, "glide-random-include-close" : { "type": "generic", "default": true }, "glitch-random-include-close" : { "type": "generic", "default": true }, "hexagon-random-include-close" : { "type": "generic", "default": true }, @@ -289,6 +302,7 @@ "Doom": 2, "Energize A": 3, "Energize B": 4, + "Focus": 21, "Glide": 6, "Glitch": 7, "Hexagon": 8, @@ -312,6 +326,7 @@ "Doom": 2, "Energize A": 3, "Energize B": 4, + "Focus": 21, "Glide": 6, "Glitch": 7, "Hexagon": 8, @@ -337,6 +352,7 @@ "Doom": 2, "Energize A": 3, "Energize B": 4, + "Focus": 21, "Glide": 6, "Glitch": 7, "Hexagon": 8, @@ -498,6 +514,37 @@ "default": 1000 }, + "focus-blur-amount": { + "type": "scale", + "description" : "Blur Amount", + "min" : 0, + "max" : 100, + "step" : 1, + "dependency" : "effect-selector=21", + "default": 50 + }, + + "focus-blur-quality": { + "type": "scale", + "description" : "Blur Quality", + "min" : 1, + "max" : 10, + "step" : 1, + "dependency" : "effect-selector=21", + "tooltip": "The Quality of the Blur (Setting this too high may increase GPU load and affect performance)", + "default": 3 + }, + + "focus-animation-time": { + "type": "scale", + "description" : "Effect Duration (milliseconds)", + "min" : 100, + "max" : 5000, + "step" : 10, + "dependency" : "effect-selector=21", + "default": 500 + }, + "glide-scale": { "type": "scale", "description" : "Scale", diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/metadata.json b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/metadata.json index 98066a29..29ffa6c9 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/metadata.json +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/metadata.json @@ -1,7 +1,7 @@ { "uuid": "CinnamonBurnMyWindows@klangman", "name": "Burn My Windows", - "version": "0.9.4", + "version": "0.9.5", "description": "Window open/close effects based on the Burn-My-Windows Gnome extension by Schneegans", "url": "https://github.com/klangman/CinnamonBurnMyWindows", "website": "https://github.com/klangman/CinnamonBurnMyWindows", diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/CinnamonBurnMyWindows@klangman.pot b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/CinnamonBurnMyWindows@klangman.pot index 350a70c4..ddcf9aad 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/CinnamonBurnMyWindows@klangman.pot +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/CinnamonBurnMyWindows@klangman.pot @@ -5,10 +5,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.3\n" +"Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.5\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-" "extensions/issues\n" -"POT-Creation-Date: 2024-09-17 22:20-0400\n" +"POT-Creation-Date: 2024-10-29 21:27-0400\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -17,23 +17,23 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. 6.2/extension.js:207 6.2/extension.js:436 +#. 6.2/extension.js:212 6.2/extension.js:443 msgid "Error" msgstr "" -#. 6.2/extension.js:207 +#. 6.2/extension.js:212 msgid "was NOT enabled" msgstr "" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "The existing extension" msgstr "" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "conflicts with this extension." msgstr "" -#. 6.2/extension.js:437 +#. 6.2/extension.js:444 msgid "" "The previously focused window is not backed by an application and therefore " "application specific effects can not be applied to that window" @@ -99,6 +99,14 @@ msgstr "" msgid "Santa is Coming" msgstr "" +#. 6.2->settings-schema.json->focus-random-include->description +#. 6.2->settings-schema.json->effect-selector->options +#. 6.2->settings-schema.json->open-window-effect->options +#. 6.2->settings-schema.json->close-window-effect->options +#. 6.2/effects/Focus.js:91 +msgid "Focus" +msgstr "" + #. 6.2->settings-schema.json->glide-random-include->description #. 6.2->settings-schema.json->effect-selector->options #. 6.2->settings-schema.json->open-window-effect->options @@ -325,6 +333,7 @@ msgstr "" #. 6.2->settings-schema.json->doom-animation-time->description #. 6.2->settings-schema.json->energize-a-animation-time->description #. 6.2->settings-schema.json->energize-b-animation-time->description +#. 6.2->settings-schema.json->focus-animation-time->description #. 6.2->settings-schema.json->glide-animation-time->description #. 6.2->settings-schema.json->glitch-animation-time->description #. 6.2->settings-schema.json->hexagon-animation-time->description @@ -375,6 +384,20 @@ msgstr "" msgid "Color" msgstr "" +#. 6.2->settings-schema.json->focus-blur-amount->description +msgid "Blur Amount" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->description +msgid "Blur Quality" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->tooltip +msgid "" +"The Quality of the Blur (Setting this too high may increase GPU load and " +"affect performance)" +msgstr "" + #. 6.2->settings-schema.json->glide-squish->description msgid "Squish" msgstr "" diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/ca.po b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/ca.po index 81c64c37..684f78b7 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/ca.po +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/ca.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-" "extensions/issues\n" -"POT-Creation-Date: 2024-09-17 22:20-0400\n" +"POT-Creation-Date: 2024-10-29 21:27-0400\n" "PO-Revision-Date: \n" "Last-Translator: Odyssey \n" "Language-Team: \n" @@ -18,23 +18,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. 6.2/extension.js:207 6.2/extension.js:436 +#. 6.2/extension.js:212 6.2/extension.js:443 msgid "Error" msgstr "Error" -#. 6.2/extension.js:207 +#. 6.2/extension.js:212 msgid "was NOT enabled" msgstr "no s'ha activat" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "The existing extension" msgstr "L'extensió existent" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "conflicts with this extension." msgstr "conflictivitza amb aquesta extensió." -#. 6.2/extension.js:437 +#. 6.2/extension.js:444 msgid "" "The previously focused window is not backed by an application and therefore " "application specific effects can not be applied to that window" @@ -102,6 +102,14 @@ msgstr "Brisa freda" msgid "Santa is Coming" msgstr "Ja arriba el Pare Noel" +#. 6.2->settings-schema.json->focus-random-include->description +#. 6.2->settings-schema.json->effect-selector->options +#. 6.2->settings-schema.json->open-window-effect->options +#. 6.2->settings-schema.json->close-window-effect->options +#. 6.2/effects/Focus.js:91 +msgid "Focus" +msgstr "" + #. 6.2->settings-schema.json->glide-random-include->description #. 6.2->settings-schema.json->effect-selector->options #. 6.2->settings-schema.json->open-window-effect->options @@ -332,6 +340,7 @@ msgstr "Aleatorietat" #. 6.2->settings-schema.json->doom-animation-time->description #. 6.2->settings-schema.json->energize-a-animation-time->description #. 6.2->settings-schema.json->energize-b-animation-time->description +#. 6.2->settings-schema.json->focus-animation-time->description #. 6.2->settings-schema.json->glide-animation-time->description #. 6.2->settings-schema.json->glitch-animation-time->description #. 6.2->settings-schema.json->hexagon-animation-time->description @@ -382,6 +391,20 @@ msgstr "Escala" msgid "Color" msgstr "Color" +#. 6.2->settings-schema.json->focus-blur-amount->description +msgid "Blur Amount" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->description +msgid "Blur Quality" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->tooltip +msgid "" +"The Quality of the Blur (Setting this too high may increase GPU load and " +"affect performance)" +msgstr "" + #. 6.2->settings-schema.json->glide-squish->description msgid "Squish" msgstr "Esclafament" diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/es.po b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/es.po index a46dea65..a6dbaa54 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/es.po +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/es.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.1\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-" "extensions/issues\n" -"POT-Creation-Date: 2024-09-17 22:20-0400\n" +"POT-Creation-Date: 2024-10-29 21:27-0400\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -17,23 +17,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.4\n" -#. 6.2/extension.js:207 6.2/extension.js:436 +#. 6.2/extension.js:212 6.2/extension.js:443 msgid "Error" msgstr "Error" -#. 6.2/extension.js:207 +#. 6.2/extension.js:212 msgid "was NOT enabled" msgstr "no estaba habilitado" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "The existing extension" msgstr "La extensión existente" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "conflicts with this extension." msgstr "entra en conflicto con esta extensión." -#. 6.2/extension.js:437 +#. 6.2/extension.js:444 msgid "" "The previously focused window is not backed by an application and therefore " "application specific effects can not be applied to that window" @@ -102,6 +102,14 @@ msgstr "Brisa fría" msgid "Santa is Coming" msgstr "Papá Noel ya viene" +#. 6.2->settings-schema.json->focus-random-include->description +#. 6.2->settings-schema.json->effect-selector->options +#. 6.2->settings-schema.json->open-window-effect->options +#. 6.2->settings-schema.json->close-window-effect->options +#. 6.2/effects/Focus.js:91 +msgid "Focus" +msgstr "" + #. 6.2->settings-schema.json->glide-random-include->description #. 6.2->settings-schema.json->effect-selector->options #. 6.2->settings-schema.json->open-window-effect->options @@ -333,6 +341,7 @@ msgstr "Aleatoriedad" #. 6.2->settings-schema.json->doom-animation-time->description #. 6.2->settings-schema.json->energize-a-animation-time->description #. 6.2->settings-schema.json->energize-b-animation-time->description +#. 6.2->settings-schema.json->focus-animation-time->description #. 6.2->settings-schema.json->glide-animation-time->description #. 6.2->settings-schema.json->glitch-animation-time->description #. 6.2->settings-schema.json->hexagon-animation-time->description @@ -383,6 +392,20 @@ msgstr "Escala" msgid "Color" msgstr "Color" +#. 6.2->settings-schema.json->focus-blur-amount->description +msgid "Blur Amount" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->description +msgid "Blur Quality" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->tooltip +msgid "" +"The Quality of the Blur (Setting this too high may increase GPU load and " +"affect performance)" +msgstr "" + #. 6.2->settings-schema.json->glide-squish->description msgid "Squish" msgstr "Aplastamiento" diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/fr.po b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/fr.po index 1005fdcb..25a762ee 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/fr.po +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.2\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-" "extensions/issues\n" -"POT-Creation-Date: 2024-09-17 22:20-0400\n" +"POT-Creation-Date: 2024-10-29 21:27-0400\n" "PO-Revision-Date: \n" "Last-Translator: Claudiux \n" "Language-Team: \n" @@ -18,23 +18,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. 6.2/extension.js:207 6.2/extension.js:436 +#. 6.2/extension.js:212 6.2/extension.js:443 msgid "Error" msgstr "Erreur" -#. 6.2/extension.js:207 +#. 6.2/extension.js:212 msgid "was NOT enabled" msgstr "n'a PAS été activée" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "The existing extension" msgstr "L'extension existante" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "conflicts with this extension." msgstr "est en conflit avec cette extension." -#. 6.2/extension.js:437 +#. 6.2/extension.js:444 msgid "" "The previously focused window is not backed by an application and therefore " "application specific effects can not be applied to that window" @@ -103,6 +103,14 @@ msgstr "Cold Breeze (Brise fraîche)" msgid "Santa is Coming" msgstr "Santa is Coming (Le Père Noël arrive)" +#. 6.2->settings-schema.json->focus-random-include->description +#. 6.2->settings-schema.json->effect-selector->options +#. 6.2->settings-schema.json->open-window-effect->options +#. 6.2->settings-schema.json->close-window-effect->options +#. 6.2/effects/Focus.js:91 +msgid "Focus" +msgstr "" + #. 6.2->settings-schema.json->glide-random-include->description #. 6.2->settings-schema.json->effect-selector->options #. 6.2->settings-schema.json->open-window-effect->options @@ -335,6 +343,7 @@ msgstr "Aléatoire" #. 6.2->settings-schema.json->doom-animation-time->description #. 6.2->settings-schema.json->energize-a-animation-time->description #. 6.2->settings-schema.json->energize-b-animation-time->description +#. 6.2->settings-schema.json->focus-animation-time->description #. 6.2->settings-schema.json->glide-animation-time->description #. 6.2->settings-schema.json->glitch-animation-time->description #. 6.2->settings-schema.json->hexagon-animation-time->description @@ -385,6 +394,20 @@ msgstr "Échelle" msgid "Color" msgstr "Couleur" +#. 6.2->settings-schema.json->focus-blur-amount->description +msgid "Blur Amount" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->description +msgid "Blur Quality" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->tooltip +msgid "" +"The Quality of the Blur (Setting this too high may increase GPU load and " +"affect performance)" +msgstr "" + #. 6.2->settings-schema.json->glide-squish->description msgid "Squish" msgstr "Squish (Écrasement)" diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/hu.po b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/hu.po index 9bd47373..a8461b1a 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/hu.po +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/hu.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.3\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-" "extensions/issues\n" -"POT-Creation-Date: 2024-09-17 22:20-0400\n" +"POT-Creation-Date: 2024-10-29 21:27-0400\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,23 +18,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.2\n" -#. 6.2/extension.js:207 6.2/extension.js:436 +#. 6.2/extension.js:212 6.2/extension.js:443 msgid "Error" msgstr "Hiba" -#. 6.2/extension.js:207 +#. 6.2/extension.js:212 msgid "was NOT enabled" msgstr "NEM volt engedélyezve" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "The existing extension" msgstr "A meglévő bővítmény" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "conflicts with this extension." msgstr "ütközik ezzel a bővitménnyel." -#. 6.2/extension.js:437 +#. 6.2/extension.js:444 msgid "" "The previously focused window is not backed by an application and therefore " "application specific effects can not be applied to that window" @@ -102,6 +102,14 @@ msgstr "Hideg szellő" msgid "Santa is Coming" msgstr "Jön a Mikulás" +#. 6.2->settings-schema.json->focus-random-include->description +#. 6.2->settings-schema.json->effect-selector->options +#. 6.2->settings-schema.json->open-window-effect->options +#. 6.2->settings-schema.json->close-window-effect->options +#. 6.2/effects/Focus.js:91 +msgid "Focus" +msgstr "" + #. 6.2->settings-schema.json->glide-random-include->description #. 6.2->settings-schema.json->effect-selector->options #. 6.2->settings-schema.json->open-window-effect->options @@ -215,8 +223,8 @@ msgid "" "Window open/close effects based on the Burn-My-Windows Gnome extension by " "Schneegans" msgstr "" -"A Schneegans által készített Burn-My-Windows Gnome bővítményen alapuló " -"ablak nyitási/zárási effektek" +"A Schneegans által készített Burn-My-Windows Gnome bővítményen alapuló ablak " +"nyitási/zárási effektek" #. 6.2->settings-schema.json->general-page->title msgid "General" @@ -333,6 +341,7 @@ msgstr "Véletlenszerűség" #. 6.2->settings-schema.json->doom-animation-time->description #. 6.2->settings-schema.json->energize-a-animation-time->description #. 6.2->settings-schema.json->energize-b-animation-time->description +#. 6.2->settings-schema.json->focus-animation-time->description #. 6.2->settings-schema.json->glide-animation-time->description #. 6.2->settings-schema.json->glitch-animation-time->description #. 6.2->settings-schema.json->hexagon-animation-time->description @@ -383,6 +392,20 @@ msgstr "Skála" msgid "Color" msgstr "Szín" +#. 6.2->settings-schema.json->focus-blur-amount->description +msgid "Blur Amount" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->description +msgid "Blur Quality" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->tooltip +msgid "" +"The Quality of the Blur (Setting this too high may increase GPU load and " +"affect performance)" +msgstr "" + #. 6.2->settings-schema.json->glide-squish->description msgid "Squish" msgstr "Összenyom" diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/nl.po b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/nl.po index 2e7a42e6..2bb044ff 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/nl.po +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/nl.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.2\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-" "extensions/issues\n" -"POT-Creation-Date: 2024-09-17 22:20-0400\n" +"POT-Creation-Date: 2024-10-29 21:27-0400\n" "PO-Revision-Date: 2024-09-11 11:19+0200\n" "Last-Translator: qadzek\n" "Language-Team: \n" @@ -16,23 +16,23 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. 6.2/extension.js:207 6.2/extension.js:436 +#. 6.2/extension.js:212 6.2/extension.js:443 msgid "Error" msgstr "Fout" -#. 6.2/extension.js:207 +#. 6.2/extension.js:212 msgid "was NOT enabled" msgstr "was NIET ingeschakeld" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "The existing extension" msgstr "De bestaande extensie" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "conflicts with this extension." msgstr "conflicteert met deze extensie." -#. 6.2/extension.js:437 +#. 6.2/extension.js:444 msgid "" "The previously focused window is not backed by an application and therefore " "application specific effects can not be applied to that window" @@ -101,6 +101,14 @@ msgstr "Koude Bries" msgid "Santa is Coming" msgstr "Kerstman komt eraan" +#. 6.2->settings-schema.json->focus-random-include->description +#. 6.2->settings-schema.json->effect-selector->options +#. 6.2->settings-schema.json->open-window-effect->options +#. 6.2->settings-schema.json->close-window-effect->options +#. 6.2/effects/Focus.js:91 +msgid "Focus" +msgstr "" + #. 6.2->settings-schema.json->glide-random-include->description #. 6.2->settings-schema.json->effect-selector->options #. 6.2->settings-schema.json->open-window-effect->options @@ -332,6 +340,7 @@ msgstr "Willekeurigheid" #. 6.2->settings-schema.json->doom-animation-time->description #. 6.2->settings-schema.json->energize-a-animation-time->description #. 6.2->settings-schema.json->energize-b-animation-time->description +#. 6.2->settings-schema.json->focus-animation-time->description #. 6.2->settings-schema.json->glide-animation-time->description #. 6.2->settings-schema.json->glitch-animation-time->description #. 6.2->settings-schema.json->hexagon-animation-time->description @@ -382,6 +391,20 @@ msgstr "Schaal" msgid "Color" msgstr "Kleur" +#. 6.2->settings-schema.json->focus-blur-amount->description +msgid "Blur Amount" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->description +msgid "Blur Quality" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->tooltip +msgid "" +"The Quality of the Blur (Setting this too high may increase GPU load and " +"affect performance)" +msgstr "" + #. 6.2->settings-schema.json->glide-squish->description msgid "Squish" msgstr "Pletten" diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/pt.po b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/pt.po index 47c02324..de56670e 100644 --- a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/pt.po +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/po/pt.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: CinnamonBurnMyWindows@klangman 0.9.3\n" "Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-" "extensions/issues\n" -"POT-Creation-Date: 2024-09-17 22:20-0400\n" +"POT-Creation-Date: 2024-10-29 21:27-0400\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,23 +18,23 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.4.4\n" -#. 6.2/extension.js:207 6.2/extension.js:436 +#. 6.2/extension.js:212 6.2/extension.js:443 msgid "Error" msgstr "Erro" -#. 6.2/extension.js:207 +#. 6.2/extension.js:212 msgid "was NOT enabled" msgstr "não foi ativo" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "The existing extension" msgstr "A extensão existente" -#. 6.2/extension.js:208 +#. 6.2/extension.js:213 msgid "conflicts with this extension." msgstr "conflita com esta extensão." -#. 6.2/extension.js:437 +#. 6.2/extension.js:444 msgid "" "The previously focused window is not backed by an application and therefore " "application specific effects can not be applied to that window" @@ -103,6 +103,14 @@ msgstr "Briza Fria" msgid "Santa is Coming" msgstr "O Pai Natal está Vindo" +#. 6.2->settings-schema.json->focus-random-include->description +#. 6.2->settings-schema.json->effect-selector->options +#. 6.2->settings-schema.json->open-window-effect->options +#. 6.2->settings-schema.json->close-window-effect->options +#. 6.2/effects/Focus.js:91 +msgid "Focus" +msgstr "" + #. 6.2->settings-schema.json->glide-random-include->description #. 6.2->settings-schema.json->effect-selector->options #. 6.2->settings-schema.json->open-window-effect->options @@ -333,6 +341,7 @@ msgstr "Aleatoriedade" #. 6.2->settings-schema.json->doom-animation-time->description #. 6.2->settings-schema.json->energize-a-animation-time->description #. 6.2->settings-schema.json->energize-b-animation-time->description +#. 6.2->settings-schema.json->focus-animation-time->description #. 6.2->settings-schema.json->glide-animation-time->description #. 6.2->settings-schema.json->glitch-animation-time->description #. 6.2->settings-schema.json->hexagon-animation-time->description @@ -383,6 +392,20 @@ msgstr "Escala" msgid "Color" msgstr "Cor" +#. 6.2->settings-schema.json->focus-blur-amount->description +msgid "Blur Amount" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->description +msgid "Blur Quality" +msgstr "" + +#. 6.2->settings-schema.json->focus-blur-quality->tooltip +msgid "" +"The Quality of the Blur (Setting this too high may increase GPU load and " +"affect performance)" +msgstr "" + #. 6.2->settings-schema.json->glide-squish->description msgid "Squish" msgstr "Esmagadura" diff --git a/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/resources/shaders/focus.frag b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/resources/shaders/focus.frag new file mode 100644 index 00000000..50824993 --- /dev/null +++ b/CinnamonBurnMyWindows@klangman/files/CinnamonBurnMyWindows@klangman/resources/shaders/focus.frag @@ -0,0 +1,86 @@ +////////////////////////////////////////////////////////////////////////////////////////// +// ) ( // +// ( /( ( ( ) ( ( ( ( )\ ) ( ( // +// )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( // +// ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ // +// | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) // +// | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< // +// |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ // +// |__/ // +////////////////////////////////////////////////////////////////////////////////////////// + +// SPDX-FileCopyrightText: Justin Garza JGarza9788@gmail.com +// SPDX-License-Identifier: GPL-3.0-or-later + +// The content from common.glsl is automatically prepended to each shader effect. This +// provides the standard input: + +// vec2 iTexCoord: Texture coordinates for retrieving the window input color. +// bool uIsFullscreen: True if the window is maximized or in fullscreen mode. +// bool uForOpening: True if a window-open animation is ongoing, false otherwise. +// float uProgress: A value which transitions from 0 to 1 during the animation. +// float uDuration: The duration of the current animation in seconds. +// vec2 uSize: The size of uTexture in pixels. +// float uPadding: The empty area around the actual window (e.g. where the shadow +// is drawn). For now, this will only be set on GNOME. + +// Furthermore, there are two global methods for reading the window input color and +// setting the shader output color. Both methods assume straight alpha: + +// vec4 getInputColor(vec2 coords) +// void setOutputColor(vec4 outColor) + + +// Ease-in-out cubic for alpha +float easeInOutCubic(float x) { + return x < 0.5 ? 4.0 * x * x * x : 1.0 - pow(-2.0 * x + 2.0, 3.0) / 2.0; +} + +// Ease-in-out sine for blur +float easeInOutSine(float x) { + return -(cos(3.14159265 * x) - 1.0) / 2.0; +} + +// A simple blur function +vec4 blur(vec2 uv, float radius, float samples) { + vec4 color = vec4(0.0); + + const float tau = 6.28318530718; + const float directions = 15.0; + + for (float d = 0.0; d < tau; d += tau / directions) { + for (float s = 0.0; s < 1.0; s += 1.0 / samples) { + vec2 offset = vec2(cos(d), sin(d)) * radius * (1.0 - s) / uSize; + color += getInputColor(uv + offset); + } + } + + return color / samples / directions; +} + + +// The width of the fading effect is loaded from the settings. +uniform float uBlurAmount; +uniform float uBlurQuality; + +void main() { + + float progl = uForOpening ? uProgress : 1.0 - uProgress; + + float easedProgressBlur = easeInOutSine(progl); // Blur easing + float easedProgressAlpha = easeInOutCubic(progl); // Alpha easing + + // Control blur amount using easedProgressBlur + float blurAmount = mix(uBlurAmount, 0.0, easedProgressBlur); + + // Apply blur + vec4 texColor = blur( iTexCoord.st, blurAmount, uBlurQuality); + + // Control alpha using easedProgressAlpha + float alpha = easedProgressAlpha; + + // Set final color with alpha transition + texColor.a *= alpha; + + setOutputColor(texColor); +} \ No newline at end of file