diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 98267e9..78e2670 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -110,13 +110,7 @@ jobs:
fail-fast: false
matrix:
version:
- - "32"
- - "33"
- - "34"
- - "35"
- - "36"
- - "37"
- - "38"
+ - "rawhide"
session:
- "gnome-xsession"
- "gnome-wayland-nested"
diff --git a/Makefile b/Makefile
index 180af17..a0c6a2b 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ LOCALES_MO = $(patsubst po/%.po,locale/%/LC_MESSAGES/$(NAME).mo,$(LOCALES_PO
ZIP_CONTENT = $(JS_FILES) $(LOCALES_MO) resources/$(NAME).gresource \
schemas/org.gnome.shell.extensions.$(NAME).gschema.xml \
schemas/org.gnome.shell.extensions.$(NAME)-profile.gschema.xml \
- schemas/gschemas.compiled metadata.json LICENSE
+ metadata.json LICENSE
# These seven recipes can be invoked by the user.
.PHONY: zip install uninstall pot clean test references
@@ -48,7 +48,7 @@ pot: $(JS_FILES) $(UI_FILES)
# This runs several tests in containerized versions of GNOME Shell.
test:
- @ for version in 32 33 34 35 36 37 38 ; do \
+ @ for version in "rawhide" ; do \
for session in "gnome-xsession" "gnome-wayland-nested" ; do \
echo ; \
echo "Running Tests on Fedora $$version ($$session)." ; \
@@ -59,7 +59,7 @@ test:
# This re-generates all reference images required by the tests.
references:
- @ for version in 32 33 34 35 36 37 38 ; do \
+ @ for version in "rawhide" ; do \
for session in "gnome-xsession" "gnome-wayland-nested" ; do \
echo ; \
echo "Generating References for Fedora $$version ($$session)." ; \
@@ -92,11 +92,6 @@ $(ZIP_NAME): $(ZIP_CONTENT)
exit 1; \
fi
-# Compiles the gschemas.compiled file from the gschema.xml file.
-schemas/gschemas.compiled: schemas/org.gnome.shell.extensions.$(NAME).gschema.xml schemas/org.gnome.shell.extensions.$(NAME)-profile.gschema.xml
- @echo "Compiling schemas..."
- @glib-compile-schemas schemas
-
# Compiles the gresource file from the gresources.xml.
resources/$(NAME).gresource: resources/$(NAME).gresource.xml
@echo "Compiling resources..."
diff --git a/README.md b/README.md
index 0a560a2..c05f60e 100644
--- a/README.md
+++ b/README.md
@@ -24,30 +24,30 @@ This extension is not only more useless than the cube, but it is also much more
**🖼️ The wallpapers used in the previews below were all generated using AI and are available in [this GitHub repository](https://github.com/Schneegans/ai-wallpapers).**
-Effect | Preview
------|--------
-**Apparition**
This effect hides your windows by violently sucking them into the void of magic! |
-**Broken Glass**
Shatter your windows into a shower sharp shards! This effect can be configured so that the shards fly away from your mouse pointer position!|
-**Doom**
Melt your windows. Inspired by the legendary screen transitions of the original Doom. |
-**Energize A**
Beam your windows away! |
-**Energize B**
Using different transporter technology results in an alternative visual effect. |
-**Fire**
The classic effect inspired by Compiz. However, this is implemented using a GLSL shader and not with a particle system like in the old days. |
-**Glide**
This very simple effect fades the window to transparency with subtle 3D effects. |
-**Glitch**
This effect applies some intentional graphics issues to your windows. |
-**Hexagon**
With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi. |
-**Incinerate**
A less snappy but definitely more fancy take on the fire effect. |
-**Matrix**
Turn your windows into a shower of green letters! The color is actually configurable.|
-**Paint Brush**
Paint or erase your windows with a thick paint brush. |
-**Pixelate**
Pixelate your windows and randomly hide pixels until the entire window is gone.|
-**Pixel Wheel**
This simple effect pixelates the window and hides the pixels in a wheel-like fashion.|
-**Pixel Wipe**
This effect pixelates the window and hides the pixels radially, starting from the pointer position.|
-**Portal**
This ridiculous effect teleports your windows from and to alternative dimensions. It may resemble the portal from a well-known cartoon series... |
-**Snap of Disintegration**
Dissolve your windows into a cloud of dust.|
-**T-Rex Attack**
Destroy your windows with a series of violent slashes!|
-**TV Effect**
This is a very simple effect to demonstrate that this extension could also be used in a more professional environment. |
-**TV Glitch**
This effect combines the Glitch and the TV Effect. |
-**Wisps**
Let your windows be carried away to the realm of dreams by these little fairies! |
-**Your Effect!**
The extension is very modular and with a bit of creativity and GLSL knowledge, [you can easily create your own effects](docs/how-to-create-new-effects.md). | [](docs/how-to-create-new-effects.md)
+| Effect | Preview |
+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
+| **Apparition**
This effect hides your windows by violently sucking them into the void of magic! |
|
+| **Broken Glass**
Shatter your windows into a shower sharp shards! This effect can be configured so that the shards fly away from your mouse pointer position! |
|
+| **Doom**
Melt your windows. Inspired by the legendary screen transitions of the original Doom. |
|
+| **Energize A**
Beam your windows away! |
|
+| **Energize B**
Using different transporter technology results in an alternative visual effect. |
|
+| **Fire**
The classic effect inspired by Compiz. However, this is implemented using a GLSL shader and not with a particle system like in the old days. |
|
+| **Glide**
This very simple effect fades the window to transparency with subtle 3D effects. |
|
+| **Glitch**
This effect applies some intentional graphics issues to your windows. |
|
+| **Hexagon**
With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi. |
|
+| **Incinerate**
A less snappy but definitely more fancy take on the fire effect. |
|
+| **Matrix**
Turn your windows into a shower of green letters! The color is actually configurable. |
|
+| **Paint Brush**
Paint or erase your windows with a thick paint brush. |
|
+| **Pixelate**
Pixelate your windows and randomly hide pixels until the entire window is gone. |
|
+| **Pixel Wheel**
This simple effect pixelates the window and hides the pixels in a wheel-like fashion. |
|
+| **Pixel Wipe**
This effect pixelates the window and hides the pixels radially, starting from the pointer position. |
|
+| **Portal**
This ridiculous effect teleports your windows from and to alternative dimensions. It may resemble the portal from a well-known cartoon series... |
|
+| **Snap of Disintegration**
Dissolve your windows into a cloud of dust. |
|
+| **T-Rex Attack**
Destroy your windows with a series of violent slashes! |
|
+| **TV Effect**
This is a very simple effect to demonstrate that this extension could also be used in a more professional environment. |
|
+| **TV Glitch**
This effect combines the Glitch and the TV Effect. |
|
+| **Wisps**
Let your windows be carried away to the realm of dreams by these little fairies! |
|
+| **Your Effect!**
The extension is very modular and with a bit of creativity and GLSL knowledge, [you can easily create your own effects](docs/how-to-create-new-effects.md). | [](docs/how-to-create-new-effects.md) |
## ✅ Supported Versions
@@ -84,7 +84,6 @@ Below is a table which summarizes the current availability for all effects.
-SPDX-License-Identifier: CC0-1.0
-*/
-
-row {
- padding: 8px;
-}
-
-.effect-row {
- padding: 0;
-}
-
-.effect-row-header,
-.effect-row list {
- padding: 8px;
- border: 0 solid @borders;
- border-bottom-width: 1px;
-}
-
-.revealer-arrow {
- margin-right: 6px;
-}
\ No newline at end of file
diff --git a/resources/css/gtk4.css b/resources/css/gtk4.css
deleted file mode 100644
index dece072..0000000
--- a/resources/css/gtk4.css
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-SPDX-FileCopyrightText: Simon Schneegans
-SPDX-License-Identifier: CC0-1.0
-*/
-
-/* These are only used if not using libadwaita */
-
-.effect-row {
- padding: 0;
-}
-
-.effect-row-header,
-.effect-row list {
- padding: 8px;
- border: 0 solid @borders;
- border-bottom-width: 1px;
-}
-
-.revealer-arrow {
- margin-right: 6px;
- transition: transform 250ms;
-}
-
-.revealer-arrow.revealed {
- transform: rotate(180deg);
-}
\ No newline at end of file
diff --git a/resources/ui/gtk3/apparition.ui b/resources/ui/gtk3/apparition.ui
deleted file mode 100644
index d217042..0000000
--- a/resources/ui/gtk3/apparition.ui
+++ /dev/null
@@ -1,281 +0,0 @@
-
-
-
-
-
-
-
- 2000
- 100
- 10
- 100
-
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
- 10
- -10
- 0.1
- 1
-
-
-
- 10
- 0
- 0.1
- 1
-
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- apparition-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Randomness
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- apparition-randomness
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Twirl Intensity
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
- apparition-twirl-intensity
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Shake Intensity
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
- apparition-shake-intensity
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Suction Intensity
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- apparition-suction-intensity
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/doom.ui b/resources/ui/gtk3/doom.ui
deleted file mode 100644
index 2bf8fc3..0000000
--- a/resources/ui/gtk3/doom.ui
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 50
- 1
- 1
- 10
-
-
-
- 50
- 1
- 1
- 10
-
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- doom-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Horizontal Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- doom-horizontal-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Vertical Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- doom-vertical-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- doom-pixel-size
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/energize-a.ui b/resources/ui/gtk3/energize-a.ui
deleted file mode 100644
index 10ffe58..0000000
--- a/resources/ui/gtk3/energize-a.ui
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- energize-a-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- energize-a-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/energize-b.ui b/resources/ui/gtk3/energize-b.ui
deleted file mode 100644
index 8e8709f..0000000
--- a/resources/ui/gtk3/energize-b.ui
+++ /dev/null
@@ -1,168 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- energize-b-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- energize-b-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/fire.ui b/resources/ui/gtk3/fire.ui
deleted file mode 100644
index 010fb6a..0000000
--- a/resources/ui/gtk3/fire.ui
+++ /dev/null
@@ -1,337 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 3
- 0.1
- 0.01
- 0.1
-
-
-
- 2.0
- -2.0
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Presets
- 0
- start
- center
- 1
-
-
-
-
-
-
- 8
-
-
- Choose a Preset
-
-
-
-
- pan-down-symbolic
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- fire-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- fire-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- fire-movement-speed
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- 3D Noise
- 0
- start
- center
- 1
-
-
-
-
- Creates a more dynamic fire but requires more GPU power.
- 0
- start
- center
- 1
-
-
-
-
-
-
-
- end
- center
- 8
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Gradient
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/glide.ui b/resources/ui/gtk3/glide.ui
deleted file mode 100644
index 57a259c..0000000
--- a/resources/ui/gtk3/glide.ui
+++ /dev/null
@@ -1,281 +0,0 @@
-
-
-
-
-
-
-
- 2000
- 100
- 1
- 100
-
-
-
- 1
- 0.1
- 0.01
- 0.1
-
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
- 1
- -1
- 0.01
- 0.1
-
-
-
- 1
- -1
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- glide-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- glide-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Squish
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- glide-squish
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Tilt
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- glide-tilt
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Shift
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- glide-shift
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/glitch.ui b/resources/ui/gtk3/glitch.ui
deleted file mode 100644
index a8c45c3..0000000
--- a/resources/ui/gtk3/glitch.ui
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-
-
-
-
-
- 2000
- 100
- 1
- 100
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- glitch-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- glitch-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Strength
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- glitch-strength
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- glitch-speed
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/hexagon.ui b/resources/ui/gtk3/hexagon.ui
deleted file mode 100644
index 5b4bd68..0000000
--- a/resources/ui/gtk3/hexagon.ui
+++ /dev/null
@@ -1,320 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
- 10
- 0
- 0.1
- 1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- hexagon-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- hexagon-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Mesh Line Width
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
- hexagon-line-width
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Line Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Glow Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- Additive Blending
- 0
- start
- center
- 1
-
-
-
-
- You may want to enable this for dark window themes.
- 0
- start
- center
- 1
-
-
-
-
-
-
-
- end
- center
- 8
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/incinerate.ui b/resources/ui/gtk3/incinerate.ui
deleted file mode 100644
index c31d869..0000000
--- a/resources/ui/gtk3/incinerate.ui
+++ /dev/null
@@ -1,278 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- incinerate-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- incinerate-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Turbulence
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- incinerate-turbulence
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- Start at Pointer
- 0
- start
- center
- 1
-
-
-
-
- If disabled, a random location will be chosen.
- 0
- start
- center
- 1
-
-
-
-
-
-
-
- end
- center
- 8
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/pixel-wheel.ui b/resources/ui/gtk3/pixel-wheel.ui
deleted file mode 100644
index 90866dc..0000000
--- a/resources/ui/gtk3/pixel-wheel.ui
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
-
-
- 2000
- 100
- 1
- 100
-
-
-
- 50
- 1
- 1
- 10
-
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixel-wheel-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Spoke Count
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixel-wheel-spoke-count
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixel-wheel-pixel-size
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/pixel-wipe.ui b/resources/ui/gtk3/pixel-wipe.ui
deleted file mode 100644
index 297fbe5..0000000
--- a/resources/ui/gtk3/pixel-wipe.ui
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-
-
-
-
-
- 5000
- 100
- 1
- 100
-
-
-
- 360
- 0
- 1
- 10
-
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixel-wipe-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixel-wipe-pixel-size
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/pixelate.ui b/resources/ui/gtk3/pixelate.ui
deleted file mode 100644
index 1deacb5..0000000
--- a/resources/ui/gtk3/pixelate.ui
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 100
- 1
- 1
- 10
-
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixelate-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Noise
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixelate-noise
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- pixelate-pixel-size
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/portal.ui b/resources/ui/gtk3/portal.ui
deleted file mode 100644
index 128347f..0000000
--- a/resources/ui/gtk3/portal.ui
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-
-
-
-
-
- 5000
- 500
- 1
- 100
-
-
-
- 2
- -2
- 0.1
- 1
-
-
-
- 2
- -2
- 0.1
- 1
-
-
-
- 100
- 1
- 1
- 10
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- portal-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Rotation Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- portal-rotation-speed
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Whirling
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- portal-whirling
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Details
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
- portal-details
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/prefs.ui b/resources/ui/gtk3/prefs.ui
deleted file mode 100644
index d7d1654..0000000
--- a/resources/ui/gtk3/prefs.ui
+++ /dev/null
@@ -1,519 +0,0 @@
-
-
-
-
-
-
-
-
-
- main-menu
- 1
-
-
- heart-filled-symbolic
- 1
- 1
-
-
-
-
-
-
- center
- 1
-
-
- profile-menu
- 1
-
-
- 1
- 6
-
-
- 1
-
-
-
-
- pan-down-symbolic
- 1
- 1
-
-
-
-
-
-
-
-
- center
- 1
-
-
- bmw-edit-profile-symbolic
- 1
- 1
-
-
-
-
-
-
-
-
- over-down-up
-
-
-
- vertical
-
-
-
- info
- false
- true
-
-
-
-
- Burn-My-Windows has been updated!
- 6
-
-
-
-
-
-
-
-
- View Changelog
- prefs.changelog
-
-
-
-
-
- update-info-button
-
-
-
-
-
-
- never
- true
-
-
-
- vertical
- 20
- 20
- 20
- 20
- 5
-
-
-
-
-
-
- vertical
- 5
- true
-
-
-
- Effect Selection
- start
-
-
-
-
-
-
- If multiple are selected, one is chosen randomly.
- start
-
-
-
-
-
-
-
-
- center
-
-
-
-
- All
-
-
-
-
-
- None
-
-
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- vertical
- 20
- 20
- 20
- 20
- 5
-
-
-
-
- Effect Profile Constraints
- start
-
-
-
-
-
-
- Define when the current effect settings should be used.
- start
-
-
-
-
-
- 5
- 15
-
-
- none
-
-
-
-
-
- 0
-
-
-
-
- Application
- 0
- start
- center
- 1
-
-
-
-
-
- center
-
-
-
-
- 300
- Any
-
-
-
-
-
- center
-
-
- bmw-select-app-symbolic
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Animation Type
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Opening Windows
- - Closing Windows
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Window Type
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Normal Windows
- - Dialog Windows
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color Scheme
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Default Color Scheme
- - Dark Color Scheme
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Power Mode
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - On Battery
- - Plugged In
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Power Profile
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Power-Saver Mode
- - Balanced Mode
- - Performance Mode
- - Power Saver or Balanced
- - Balanced or Performance
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Advanced Profile Options
- start
-
-
-
-
-
-
- 5
- 15
-
-
- none
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- High Priority
- 0
- start
- center
- 1
-
-
-
-
- Use this profile even if there are better matching profiles.
- 0
- start
- center
- 1
- end
-
-
-
-
-
-
-
- center
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- prefs.profile-delete
- Delete this Profile...
- start
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/tv-glitch.ui b/resources/ui/gtk3/tv-glitch.ui
deleted file mode 100644
index c2a8518..0000000
--- a/resources/ui/gtk3/tv-glitch.ui
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-
-
-
-
-
- 2000
- 100
- 1
- 100
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- tv-glitch-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- tv-glitch-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Strength
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- tv-glitch-strength
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- tv-glitch-speed
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/tv.ui b/resources/ui/gtk3/tv.ui
deleted file mode 100644
index 66edc99..0000000
--- a/resources/ui/gtk3/tv.ui
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- tv-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk3/wisps.ui b/resources/ui/gtk3/wisps.ui
deleted file mode 100644
index ad25765..0000000
--- a/resources/ui/gtk3/wisps.ui
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
-
-
- 10000
- 100
- 1
- 100
-
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
- 8
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
- wisps-animation-time
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
- wisps-scale
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 8
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
-
-
-
-
- 1
-
-
-
-
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- 1
-
-
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/apparition.ui b/resources/ui/gtk4/apparition.ui
deleted file mode 100644
index 87da821..0000000
--- a/resources/ui/gtk4/apparition.ui
+++ /dev/null
@@ -1,249 +0,0 @@
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 2000
- 100
- 10
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Randomness
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Twirl Intensity
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
-
-
- 10
- -10
- 0.1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Shake Intensity
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
-
-
- 10
- 0
- 0.1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Suction Intensity
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/broken-glass.ui b/resources/ui/gtk4/broken-glass.ui
deleted file mode 100644
index ab57fa4..0000000
--- a/resources/ui/gtk4/broken-glass.ui
+++ /dev/null
@@ -1,259 +0,0 @@
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 5
- 0.2
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Gravity
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 2.0
- -2.0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Blow Force
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 2.0
- -2.0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- Shatter From Pointer Location
- 0
- start
- center
- 1
-
-
-
-
- The shards will fly away from where your mouse pointer was when closing the window.
- 0
- start
- center
- 1
- 1
-
-
-
-
-
-
-
- end
- center
- 8
- 8
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/doom.ui b/resources/ui/gtk4/doom.ui
deleted file mode 100644
index eca1717..0000000
--- a/resources/ui/gtk4/doom.ui
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Horizontal Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Vertical Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/energize-a.ui b/resources/ui/gtk4/energize-a.ui
deleted file mode 100644
index 19e1ee6..0000000
--- a/resources/ui/gtk4/energize-a.ui
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/energize-b.ui b/resources/ui/gtk4/energize-b.ui
deleted file mode 100644
index ae77456..0000000
--- a/resources/ui/gtk4/energize-b.ui
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/fire.ui b/resources/ui/gtk4/fire.ui
deleted file mode 100644
index ddfced4..0000000
--- a/resources/ui/gtk4/fire.ui
+++ /dev/null
@@ -1,295 +0,0 @@
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Presets
- 0
- start
- center
- 1
-
-
-
-
- Choose a Preset
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 3
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 2.0
- -2.0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- 3D Noise
- 0
- start
- center
- 1
-
-
-
-
- Creates a more dynamic fire but requires more GPU power.
- 0
- start
- center
- 1
-
-
-
-
-
-
-
- end
- center
- 8
- 8
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Gradient
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
-
-
-
-
- 1
- 1
- 8
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/glide.ui b/resources/ui/gtk4/glide.ui
deleted file mode 100644
index 24d998e..0000000
--- a/resources/ui/gtk4/glide.ui
+++ /dev/null
@@ -1,252 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 2000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Squish
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Tilt
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- -1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Shift
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- -1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/glitch.ui b/resources/ui/gtk4/glitch.ui
deleted file mode 100644
index 7701849..0000000
--- a/resources/ui/gtk4/glitch.ui
+++ /dev/null
@@ -1,242 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 2000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Strength
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/hexagon.ui b/resources/ui/gtk4/hexagon.ui
deleted file mode 100644
index 8469298..0000000
--- a/resources/ui/gtk4/hexagon.ui
+++ /dev/null
@@ -1,288 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Mesh Line Width
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
-
-
- 10
- 0
- 0.1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Line Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Glow Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- Additive Blending
- 0
- start
- center
- 1
-
-
-
-
- You may want to enable this for dark window themes.
- 0
- start
- center
- 1
-
-
-
-
-
-
-
- end
- center
- 8
- 8
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/incinerate.ui b/resources/ui/gtk4/incinerate.ui
deleted file mode 100644
index 88a6136..0000000
--- a/resources/ui/gtk4/incinerate.ui
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Turbulence
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- Start at Pointer
- 0
- start
- center
- 1
-
-
-
-
- If disabled, a random location will be chosen.
- 0
- start
- center
- 1
-
-
-
-
-
-
-
- end
- center
- 8
- 8
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/matrix.ui b/resources/ui/gtk4/matrix.ui
deleted file mode 100644
index f441d5e..0000000
--- a/resources/ui/gtk4/matrix.ui
+++ /dev/null
@@ -1,279 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 50
- 5
- 1
- 5
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Randomness
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1.0
- 0.0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Vertical Overshooting
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1.0
- 0.0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Trail Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Tip Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/paint-brush.ui b/resources/ui/gtk4/paint-brush.ui
deleted file mode 100644
index 206f457..0000000
--- a/resources/ui/gtk4/paint-brush.ui
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Brush Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 4
- 1
- 1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/pixel-wheel.ui b/resources/ui/gtk4/pixel-wheel.ui
deleted file mode 100644
index 4dcdd4a..0000000
--- a/resources/ui/gtk4/pixel-wheel.ui
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 2000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Spoke Count
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/pixel-wipe.ui b/resources/ui/gtk4/pixel-wipe.ui
deleted file mode 100644
index 67549cc..0000000
--- a/resources/ui/gtk4/pixel-wipe.ui
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 5000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/pixelate.ui b/resources/ui/gtk4/pixelate.ui
deleted file mode 100644
index 6dc5d58..0000000
--- a/resources/ui/gtk4/pixelate.ui
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Noise
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 100
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Pixel Size
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/portal.ui b/resources/ui/gtk4/portal.ui
deleted file mode 100644
index f339557..0000000
--- a/resources/ui/gtk4/portal.ui
+++ /dev/null
@@ -1,242 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 5000
- 500
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Whirling
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 2
- -2
- 0.1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Rotation Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 2
- -2
- 0.1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Details
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
-
-
- 100
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 0
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/prefs.ui b/resources/ui/gtk4/prefs.ui
deleted file mode 100644
index 393c8d4..0000000
--- a/resources/ui/gtk4/prefs.ui
+++ /dev/null
@@ -1,475 +0,0 @@
-
-
-
-
-
-
-
-
-
- main-menu
- heart-filled-symbolic
-
-
-
-
- center
-
-
- profile-menu
-
-
-
-
- bmw-edit-profile-symbolic
- center
-
-
-
-
-
-
- over-down-up
-
-
-
- vertical
-
-
-
- info
- false
- true
-
-
- Burn-My-Windows has been updated!
- 6
-
-
-
-
- View Changelog
- prefs.changelog
-
-
-
- update-info-button
-
-
-
-
-
-
- never
- true
-
-
-
- vertical
- 20
- 20
- 20
- 20
- 5
-
-
-
-
-
-
- vertical
- 5
- true
-
-
-
- Effect Selection
- start
-
-
-
-
-
-
- If multiple are selected, one is chosen randomly.
- start
-
-
-
-
-
-
-
-
- center
-
-
-
-
- All
-
-
-
-
-
- None
-
-
-
-
-
-
-
-
-
-
- 6
-
-
- none
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- vertical
- 20
- 20
- 20
- 20
- 5
-
-
-
-
- Effect Profile Constraints
- start
-
-
-
-
-
-
- Define when the current effect settings should be used.
- start
-
-
-
-
-
- 5
- 15
-
-
- none
- 1
-
-
-
-
- 0
-
-
-
-
- Application
- 0
- start
- center
- 1
-
-
-
-
-
- center
-
-
-
-
- 300
- Any
-
-
-
-
-
- bmw-select-app-symbolic
- center
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Animation Type
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Opening Windows
- - Closing Windows
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Window Type
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Normal Windows
- - Dialog Windows
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color Scheme
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Default Color Scheme
- - Dark Color Scheme
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Power Mode
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - On Battery
- - Plugged In
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Power Profile
- 0
- start
- center
- 1
-
-
-
-
- 200
-
- - Any
- - Power-Saver Mode
- - Balanced Mode
- - Performance Mode
- - Power Saver or Balanced
- - Balanced or Performance
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Advanced Profile Options
- start
-
-
-
-
-
-
- 5
- 15
-
-
- none
- 1
-
-
-
-
- 0
-
-
-
-
- vertical
- 3
-
-
- High Priority
- 0
- start
- center
- 1
-
-
-
-
- Use this profile even if there are better matching profiles.
- 0
- start
- center
- 1
- end
-
-
-
-
-
-
-
- center
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- prefs.profile-delete
- Delete this Profile...
- start
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/snap.ui b/resources/ui/gtk4/snap.ui
deleted file mode 100644
index 60017c2..0000000
--- a/resources/ui/gtk4/snap.ui
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 500
- 10
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 20
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/trex.ui b/resources/ui/gtk4/trex.ui
deleted file mode 100644
index c90903d..0000000
--- a/resources/ui/gtk4/trex.ui
+++ /dev/null
@@ -1,242 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Claw Scratch Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 1
- left
- 300
-
-
- 10
- 0.1
- 0.1
- 1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Claw Scratch Count
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 50
- 1
- 1
- 10
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Warp Effect
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 1
- 0
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Flash Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/tv-glitch.ui b/resources/ui/gtk4/tv-glitch.ui
deleted file mode 100644
index 858bec1..0000000
--- a/resources/ui/gtk4/tv-glitch.ui
+++ /dev/null
@@ -1,242 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 2000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Strength
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Speed
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/tv.ui b/resources/ui/gtk4/tv.ui
deleted file mode 100644
index f345a4a..0000000
--- a/resources/ui/gtk4/tv.ui
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
- 1
- 8
- 8
- 250
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/resources/ui/gtk4/wisps.ui b/resources/ui/gtk4/wisps.ui
deleted file mode 100644
index a9bd50c..0000000
--- a/resources/ui/gtk4/wisps.ui
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- none
-
-
-
- 0
-
-
-
-
- Animation Time [ms]
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 0
- left
- 300
-
-
- 10000
- 100
- 1
- 100
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Scale
- 0
- start
- center
- 1
-
-
-
-
- end
- center
- 1
- 2
- left
- 300
-
-
- 10
- 0.1
- 0.01
- 0.1
-
-
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
- Color
- 0
- start
- center
- 1
-
-
-
-
- 1
-
-
-
-
- 1
-
-
-
-
- 1
-
-
-
-
- edit-clear-symbolic
- Reset to Default Value
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/ProfileManager.js b/src/ProfileManager.js
index 4de9aba..91233be 100644
--- a/src/ProfileManager.js
+++ b/src/ProfileManager.js
@@ -14,13 +14,8 @@
'use strict';
-const {Gio, GLib, GObject} = imports.gi;
-
-const _ = imports.gettext.domain('burn-my-windows').gettext;
-
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
+import Gio from 'gi://Gio';
+import GLib from 'gi://GLib';
//////////////////////////////////////////////////////////////////////////////////////////
// Burn-My-Windows allows applying different sets of effect settings under specific //
@@ -31,10 +26,12 @@ const utils = Me.imports.src.utils;
// via Gio.Settings objects. //
//////////////////////////////////////////////////////////////////////////////////////////
-var ProfileManager = class {
+export class ProfileManager {
// ------------------------------------------------------------------------- constructor
- constructor() {
+ constructor(metadata) {
+ this._metadata = metadata;
+
this._makeProfilesDir();
this.reloadProfiles();
}
@@ -151,58 +148,6 @@ var ProfileManager = class {
return priority;
}
- // Profiles are named according to their configuration. This method returns a localized
- // string describing the settings of the profile.
- getProfileName(settings) {
- let items = [];
-
- // If an app is configured, use it as first component for the profile's name.
- const app = settings.get_string('profile-app');
- if (app != '') {
- items.push(app);
- }
-
- // Now add components to the name for each non-default profile option. Make sure that
- // these are the same strings as used in the UI files!
- const addComponent = (settingsKey, options) => {
- const option = settings.get_int(settingsKey);
- if (option > 0) {
- items.push(options[option - 1]);
- }
- };
-
- // clang-format off
- addComponent('profile-animation-type', [_('Opening Windows'),
- _('Closing Windows')]);
- addComponent('profile-window-type', [_('Normal Windows'),
- _('Dialog Windows')]);
- addComponent('profile-color-scheme', [_('Default Color Scheme'),
- _('Dark Color Scheme')]);
- addComponent('profile-power-mode', [_('On Battery'),
- _('Plugged In')]);
- addComponent('profile-power-profile', [_('Power-Saver Mode'),
- _('Balanced Mode'),
- _('Performance Mode'),
- _('Power Saver or Balanced'),
- _('Balanced or Performance')]);
- // clang-format on
-
- // If the profile is a high-priority profile, also add this..
- if (settings.get_boolean('profile-high-priority')) {
- items.push(_('High Priority'));
- }
-
- let name = '';
-
- if (items.length == 0) {
- name = _('Standard Profile');
- } else {
- name = items.join(' · ');
- }
-
- return name;
- }
-
// ----------------------------------------------------------------------- private stuff
// Creates the directory ~/.config/burn-my-windows/profiles if it does not yet exist.
@@ -221,7 +166,7 @@ var ProfileManager = class {
// Expect USER extensions to have a schemas/ subfolder, otherwise assume a
// SYSTEM extension that has been installed in the same prefix as the shell
- const schemaDir = Me.dir.get_child('schemas');
+ const schemaDir = this._metadata.dir.get_child('schemas');
let source;
if (schemaDir.query_exists(null)) {
source = Gio.SettingsSchemaSource.new_from_directory(
diff --git a/src/Shader.js b/src/Shader.js
index ad48c68..2d53afe 100644
--- a/src/Shader.js
+++ b/src/Shader.js
@@ -14,13 +14,13 @@
'use strict';
-const {Gio, Shell, GObject, Clutter, Meta} = imports.gi;
-const ByteArray = imports.byteArray;
+import Gio from 'gi://Gio';
+import Shell from 'gi://Shell';
+import GObject from 'gi://GObject';
+import Clutter from 'gi://Clutter';
+import Meta from 'gi://Meta';
-const Main = imports.ui.main;
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
+import * as utils from './utils.js';
//////////////////////////////////////////////////////////////////////////////////////////
// This is the base class for all shaders of Burn-My-Windows. It automagically loads //
@@ -47,7 +47,7 @@ const utils = Me.imports.src.utils;
// used to clean up any resources.
//////////////////////////////////////////////////////////////////////////////////////////
-var Shader = GObject.registerClass(
+export var Shader = GObject.registerClass(
{
Signals: {
'begin-animation': {
@@ -191,10 +191,8 @@ var Shader = GObject.registerClass(
// to undo this. It is a pity that we have to do this here, as it is not really
// required to be done each frame. But it's the only place where we can do it.
// https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650
- if (utils.shellVersionIsAtLeast(44, 2)) {
- this.get_pipeline().set_blend(
- 'RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))');
- }
+ this.get_pipeline().set_blend(
+ 'RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))');
this.set_uniform_float(this._uProgress, 1, [this._progress]);
super.vfunc_paint_target(...params);
@@ -202,18 +200,11 @@ var Shader = GObject.registerClass(
// --------------------------------------------------------------------- private stuff
- // This loads the file at 'path' contained in the extension's resources to a
- // JavaScript string.
- _loadStringResource(path) {
- const data = Gio.resources_lookup_data(path, 0);
- return ByteArray.toString(ByteArray.fromGBytes(data));
- }
-
// This loads a GLSL file from the extension's resources to a JavaScript string. The
// code from "common.glsl" is prepended automatically.
_loadShaderResource(path) {
- let common = this._loadStringResource('/shaders/common.glsl');
- let code = this._loadStringResource(path);
+ let common = utils.getStringResource('/shaders/common.glsl');
+ let code = utils.getStringResource(path);
// Add a trailing newline. Else the GLSL compiler complains...
return common + '\n' + code + '\n';
diff --git a/src/ShaderFactory.js b/src/ShaderFactory.js
index 003e541..c73e2fe 100644
--- a/src/ShaderFactory.js
+++ b/src/ShaderFactory.js
@@ -14,18 +14,17 @@
'use strict';
-const GObject = imports.gi.GObject;
+import GObject from 'gi://GObject';
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
+import {Shader} from './Shader.js';
//////////////////////////////////////////////////////////////////////////////////////////
-// Each effect of Burn-My-Windows owns an instance of this class. It is used to created //
+// Each effect of Burn-My-Windows owns an instance of this class. It is used to create //
// shaders whenever a new one is required. It tries to re-use old shaders as much as //
// possible in order to avoid memory leaks. //
//////////////////////////////////////////////////////////////////////////////////////////
-var ShaderFactory = class {
+export default class ShaderFactory {
// Creates a new ShaderFactory. Requires the nick of the effect and a callback function
// which will be called whenever a new shader is created.
@@ -62,8 +61,7 @@ var ShaderFactory = class {
// Only try to register the new type once.
if (GObject.type_from_name(typeName) == null) {
const outerThis = this;
- GObject.registerClass({GTypeName: typeName},
- class Shader extends Me.imports.src.Shader.Shader {
+ GObject.registerClass({GTypeName: typeName}, class ShaderImp extends Shader {
// This will actually load the GLSL source code from the resources.
_init() {
super._init(outerThis._nick);
diff --git a/src/WindowPicker.js b/src/WindowPicker.js
index ae4e861..0f9b8d3 100644
--- a/src/WindowPicker.js
+++ b/src/WindowPicker.js
@@ -15,12 +15,13 @@
'use strict';
-const {Gio, GLib} = imports.gi;
-const Main = imports.ui.main;
-const LookingGlass = imports.ui.lookingGlass;
+import Gio from 'gi://Gio';
+import GLib from 'gi://GLib';
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
+import * as Main from 'resource:///org/gnome/shell/ui/main.js';
+import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js';
+
+import * as utils from './utils.js';
//////////////////////////////////////////////////////////////////////////////////////////
// This is based on the window-picking functionality of the Blur-My-Shell extension. //
@@ -29,7 +30,7 @@ const utils = Me.imports.src.utils;
// picking. //
//////////////////////////////////////////////////////////////////////////////////////////
-var WindowPicker = class WindowPicker {
+export class WindowPicker {
// ------------------------------------------------------------------------- constructor
constructor() {
diff --git a/src/effects/Apparition.js b/src/effects/Apparition.js
index a1051fd..f770e71 100644
--- a/src/effects/Apparition.js
+++ b/src/effects/Apparition.js
@@ -14,12 +14,14 @@
'use strict';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+import * as utils from '../utils.js';
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+// 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. //
@@ -28,14 +30,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Apparition = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
+ 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');
@@ -60,7 +62,7 @@ var Apparition = class {
// The effect is not available on GNOME Shell 3.36 as it requires scaling of the window
// actor.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 38];
}
@@ -68,13 +70,13 @@ var Apparition = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Apparition');
}
@@ -82,7 +84,7 @@ var Apparition = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('apparition-randomness');
dialog.bindAdjustment('apparition-animation-time');
dialog.bindAdjustment('apparition-twirl-intensity');
@@ -95,7 +97,7 @@ var Apparition = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 2.0, y: 2.0};
}
}
diff --git a/src/effects/BrokenGlass.js b/src/effects/BrokenGlass.js
index 43c099d..f31efb7 100644
--- a/src/effects/BrokenGlass.js
+++ b/src/effects/BrokenGlass.js
@@ -14,12 +14,17 @@
'use strict';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+import * as utils from '../utils.js';
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+// 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 GdkPixbuf = await utils.importInShellOnly('gi://GdkPixbuf');
+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 //
@@ -40,18 +45,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 BrokenGlass = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import these modules in this function as they are not available in the
- // preferences process. This callback is only called within GNOME Shell's process.
- const {Clutter, GdkPixbuf, Cogl} = imports.gi;
-
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
// Create the texture in the first call.
if (!this._shardTexture) {
const shardData = GdkPixbuf.Pixbuf.new_from_resource('/img/shards.png');
@@ -118,7 +119,7 @@ var BrokenGlass = class {
// ---------------------------------------------------------------------------- metadata
// This effect is only available on GNOME Shell 40+.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [40, 0];
}
@@ -127,13 +128,13 @@ var BrokenGlass = class {
// 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.
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Broken Glass');
}
@@ -141,7 +142,7 @@ var BrokenGlass = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('broken-glass-animation-time');
dialog.bindAdjustment('broken-glass-scale');
dialog.bindAdjustment('broken-glass-gravity');
@@ -154,7 +155,7 @@ var BrokenGlass = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 2.0, y: 2.0};
}
}
diff --git a/src/effects/Doom.js b/src/effects/Doom.js
index ad77cd9..7afa97c 100644
--- a/src/effects/Doom.js
+++ b/src/effects/Doom.js
@@ -14,14 +14,14 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect melts your windows. Inspired by the legendary screen transitions of the //
@@ -31,14 +31,13 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Doom = class {
-
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
+ 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');
@@ -70,7 +69,7 @@ var Doom = class {
// The effect is not available on GNOME Shell 3.36 as it requires scaling of the window
// actor.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 38];
}
@@ -78,13 +77,13 @@ var Doom = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Doom');
}
@@ -92,7 +91,7 @@ var Doom = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('doom-animation-time');
dialog.bindAdjustment('doom-horizontal-scale');
dialog.bindAdjustment('doom-vertical-scale');
@@ -106,7 +105,7 @@ var Doom = class {
// 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.
- getActorScale(settings, forOpening, actor) {
+ 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/src/effects/EnergizeA.js b/src/effects/EnergizeA.js
index cb8c2a7..508cb95 100644
--- a/src/effects/EnergizeA.js
+++ b/src/effects/EnergizeA.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect looks a bit like the transporter effect from TOS. //
@@ -30,19 +31,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 EnergizeA = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ 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');
@@ -62,7 +58,7 @@ var EnergizeA = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -70,13 +66,13 @@ var EnergizeA = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Energize A');
}
@@ -84,7 +80,7 @@ var EnergizeA = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('energize-a-animation-time');
dialog.bindAdjustment('energize-a-scale');
dialog.bindColorButton('energize-a-color');
@@ -95,7 +91,7 @@ var EnergizeA = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
\ No newline at end of file
diff --git a/src/effects/EnergizeB.js b/src/effects/EnergizeB.js
index 2b31c3a..32748eb 100644
--- a/src/effects/EnergizeB.js
+++ b/src/effects/EnergizeB.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect looks a bit like the transporter effect from TNG. //
@@ -30,19 +31,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 EnergizeB = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ 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');
@@ -63,7 +59,7 @@ var EnergizeB = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -71,13 +67,13 @@ var EnergizeB = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Energize B');
}
@@ -85,7 +81,7 @@ var EnergizeB = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('energize-b-animation-time');
dialog.bindAdjustment('energize-b-scale');
dialog.bindColorButton('energize-b-color');
@@ -96,7 +92,7 @@ var EnergizeB = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/Fire.js b/src/effects/Fire.js
index 168ab24..cd9cadf 100644
--- a/src/effects/Fire.js
+++ b/src/effects/Fire.js
@@ -14,14 +14,17 @@
'use strict';
-const {Gio} = imports.gi;
+import Gio from 'gi://Gio';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+import * as utils from '../utils.js';
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+// 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 //
@@ -34,20 +37,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Fire = class {
-
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
// Store all uniform locations.
shader._uGradient = [
shader.get_uniform_location('uGradient1'),
@@ -82,7 +79,7 @@ var Fire = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -90,13 +87,13 @@ var Fire = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Fire');
}
@@ -104,7 +101,7 @@ var Fire = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
// Bind all properties.
dialog.bindAdjustment('fire-animation-time');
@@ -118,8 +115,8 @@ var Fire = class {
dialog.bindColorButton('fire-color-5');
// Connect the buttons only once. The bindPreferences can be called multiple times...
- if (!this._isConnected) {
- this._isConnected = true;
+ 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', () => {
@@ -131,7 +128,7 @@ var Fire = class {
});
// Initialize the fire-preset dropdown.
- this._createFirePresets(dialog);
+ Effect._createFirePresets(dialog);
}
}
@@ -140,14 +137,14 @@ var Fire = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
// ----------------------------------------------------------------------- private stuff
// This populates the preset dropdown menu for the fire options.
- _createFirePresets(dialog) {
+ static _createFirePresets(dialog) {
dialog.getBuilder().get_object('fire-prefs').connect('realize', (widget) => {
const presets = [
{
@@ -228,7 +225,7 @@ var Fire = class {
dialog.getBuilder().get_object('fire-preset-button').set_menu_model(menu);
- const root = utils.isGTK4() ? widget.get_root() : widget.get_toplevel();
+ const root = widget.get_root();
root.insert_action_group(groupName, group);
});
}
diff --git a/src/effects/Glide.js b/src/effects/Glide.js
index 14cfe4d..7aee968 100644
--- a/src/effects/Glide.js
+++ b/src/effects/Glide.js
@@ -14,14 +14,14 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This very simple effect fades the window to transparency with subtle 3D effects. //
@@ -30,14 +30,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Glide = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
+ 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');
@@ -60,7 +60,7 @@ var Glide = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -68,13 +68,13 @@ var Glide = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Glide');
}
@@ -82,7 +82,7 @@ var Glide = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('glide-animation-time');
dialog.bindAdjustment('glide-scale');
dialog.bindAdjustment('glide-squish');
@@ -95,7 +95,7 @@ var Glide = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/Glitch.js b/src/effects/Glitch.js
index 6003f80..659c350 100644
--- a/src/effects/Glitch.js
+++ b/src/effects/Glitch.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect applies some intentional graphics issues to your windows. //
@@ -30,19 +31,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Glitch = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ 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');
@@ -68,7 +64,7 @@ var Glitch = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -76,13 +72,13 @@ var Glitch = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Glitch');
}
@@ -90,7 +86,7 @@ var Glitch = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('glitch-animation-time');
dialog.bindAdjustment('glitch-scale');
dialog.bindAdjustment('glitch-speed');
@@ -103,7 +99,7 @@ var Glitch = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
\ No newline at end of file
diff --git a/src/effects/Hexagon.js b/src/effects/Hexagon.js
index 75c74d1..20b6500 100644
--- a/src/effects/Hexagon.js
+++ b/src/effects/Hexagon.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect overlays a glowing hexagonal grid over the window. The grid cells then //
@@ -31,19 +32,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Hexagon = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ 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');
@@ -76,7 +72,7 @@ var Hexagon = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -84,13 +80,13 @@ var Hexagon = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Hexagon');
}
@@ -98,7 +94,7 @@ var Hexagon = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('hexagon-animation-time');
dialog.bindAdjustment('hexagon-scale');
dialog.bindAdjustment('hexagon-line-width');
@@ -112,7 +108,7 @@ var Hexagon = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/Incinerate.js b/src/effects/Incinerate.js
index da5821e..0f5cd09 100644
--- a/src/effects/Incinerate.js
+++ b/src/effects/Incinerate.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect burns windows to ashes. The fire starts at a random position at the //
@@ -31,18 +32,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Incinerate = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import these modules in this function as they are not available in the
- // preferences process. This callback is only called within GNOME Shell's process.
- const {Clutter} = imports.gi;
-
+ 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');
@@ -113,7 +110,7 @@ var Incinerate = class {
// ---------------------------------------------------------------------------- metadata
// This effect is available on all supported GNOME Shell versions.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -121,13 +118,13 @@ var Incinerate = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Incinerate');
}
@@ -135,7 +132,7 @@ var Incinerate = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('incinerate-animation-time');
dialog.bindAdjustment('incinerate-scale');
dialog.bindAdjustment('incinerate-turbulence');
@@ -148,7 +145,7 @@ var Incinerate = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
\ No newline at end of file
diff --git a/src/effects/Matrix.js b/src/effects/Matrix.js
index 56690a3..b87a6a9 100644
--- a/src/effects/Matrix.js
+++ b/src/effects/Matrix.js
@@ -14,14 +14,17 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 GdkPixbuf = await utils.importInShellOnly('gi://GdkPixbuf');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// The Matrix shader multiplies a grid of random letters with some gradients which are //
@@ -34,18 +37,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Matrix = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import these modules in this function as they are not available in the
- // preferences process. This callback is only called within GNOME Shell's process.
- const {Clutter, GdkPixbuf, Cogl} = imports.gi;
-
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
// Create the texture in the first call.
if (!this._fontTexture) {
const fontData = GdkPixbuf.Pixbuf.new_from_resource('/img/matrixFont.png');
@@ -96,7 +95,7 @@ var Matrix = class {
// ---------------------------------------------------------------------------- metadata
// This effect is only available on GNOME Shell 40+.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [40, 0];
}
@@ -104,13 +103,13 @@ var Matrix = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Matrix');
}
@@ -118,7 +117,7 @@ var Matrix = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('matrix-animation-time');
dialog.bindAdjustment('matrix-scale');
dialog.bindAdjustment('matrix-randomness');
@@ -132,7 +131,7 @@ var Matrix = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0 + settings.get_double('matrix-overshoot')};
}
}
diff --git a/src/effects/PaintBrush.js b/src/effects/PaintBrush.js
index f818e9d..4a90729 100644
--- a/src/effects/PaintBrush.js
+++ b/src/effects/PaintBrush.js
@@ -14,14 +14,17 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 GdkPixbuf = await utils.importInShellOnly('gi://GdkPixbuf');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect paints your windows with a thick paint brush. //
@@ -32,18 +35,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 PaintBrush = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import these modules in this function as they are not available in the
- // preferences process. This callback is only called within GNOME Shell's process.
- const {Clutter, GdkPixbuf, Cogl} = imports.gi;
-
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
// Create the texture in the first call.
if (!this._brushTexture) {
const brushData = GdkPixbuf.Pixbuf.new_from_resource('/img/brush.png');
@@ -84,7 +83,7 @@ var PaintBrush = class {
// ---------------------------------------------------------------------------- metadata
// This effect is only available on GNOME Shell 40+.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [40, 0];
}
@@ -92,13 +91,13 @@ var PaintBrush = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Paint Brush');
}
@@ -106,7 +105,7 @@ var PaintBrush = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('paint-brush-animation-time');
dialog.bindAdjustment('paint-brush-size');
}
@@ -116,7 +115,7 @@ var PaintBrush = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/PixelWheel.js b/src/effects/PixelWheel.js
index 60955ec..af74c72 100644
--- a/src/effects/PixelWheel.js
+++ b/src/effects/PixelWheel.js
@@ -14,14 +14,14 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This simple effect pixelates the window texture and hides the pixels in a wheel-like //
@@ -31,14 +31,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 PixelWheel = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
+ 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');
@@ -56,7 +56,7 @@ var PixelWheel = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -64,13 +64,13 @@ var PixelWheel = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Pixel Wheel');
}
@@ -78,7 +78,7 @@ var PixelWheel = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('pixel-wheel-animation-time');
dialog.bindAdjustment('pixel-wheel-pixel-size');
dialog.bindAdjustment('pixel-wheel-spoke-count');
@@ -89,7 +89,7 @@ var PixelWheel = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/PixelWipe.js b/src/effects/PixelWipe.js
index 88fcdb9..9d33df8 100644
--- a/src/effects/PixelWipe.js
+++ b/src/effects/PixelWipe.js
@@ -14,14 +14,14 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect pixelates the window texture and hides the pixels radially, starting //
@@ -31,14 +31,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 PixelWipe = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
+ 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');
@@ -83,7 +83,7 @@ var PixelWipe = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -91,13 +91,13 @@ var PixelWipe = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Pixel Wipe');
}
@@ -105,7 +105,7 @@ var PixelWipe = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('pixel-wipe-animation-time');
dialog.bindAdjustment('pixel-wipe-pixel-size');
}
@@ -115,7 +115,7 @@ var PixelWipe = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/Pixelate.js b/src/effects/Pixelate.js
index a91285e..1730b59 100644
--- a/src/effects/Pixelate.js
+++ b/src/effects/Pixelate.js
@@ -14,14 +14,14 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This very simple effect pixelates the window texture and randomly hides pixels until //
@@ -31,14 +31,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Pixelate = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
+ 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');
@@ -56,7 +56,7 @@ var Pixelate = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -64,13 +64,13 @@ var Pixelate = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Pixelate');
}
@@ -78,7 +78,7 @@ var Pixelate = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('pixelate-animation-time');
dialog.bindAdjustment('pixelate-noise');
dialog.bindAdjustment('pixelate-pixel-size');
@@ -89,7 +89,7 @@ var Pixelate = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/Portal.js b/src/effects/Portal.js
index f17d46f..0bd643c 100644
--- a/src/effects/Portal.js
+++ b/src/effects/Portal.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This ridiculous effect teleports your windows from and to alternative dimensions. //
@@ -31,19 +32,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Portal = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ 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');
@@ -70,7 +66,7 @@ var Portal = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -78,13 +74,13 @@ var Portal = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Portal');
}
@@ -92,7 +88,7 @@ var Portal = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('portal-animation-time');
dialog.bindAdjustment('portal-rotation-speed');
dialog.bindAdjustment('portal-whirling');
@@ -105,7 +101,7 @@ var Portal = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/SnapOfDisintegration.js b/src/effects/SnapOfDisintegration.js
index 3b2b724..e9b718b 100644
--- a/src/effects/SnapOfDisintegration.js
+++ b/src/effects/SnapOfDisintegration.js
@@ -14,14 +14,17 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 GdkPixbuf = await utils.importInShellOnly('gi://GdkPixbuf');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effects dissolves your windows into a cloud of dust. For this, it uses an //
@@ -36,18 +39,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 SnapOfDisintegration = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import these modules in this function as they are not available in the
- // preferences process. This callback is only called within GNOME Shell's process.
- const {Clutter, GdkPixbuf, Cogl} = imports.gi;
-
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
// Create the texture in the first call.
if (!this._dustTexture) {
const dustData = GdkPixbuf.Pixbuf.new_from_resource('/img/dust.png');
@@ -96,7 +95,7 @@ var SnapOfDisintegration = class {
// ---------------------------------------------------------------------------- metadata
// This effect is only available on GNOME Shell 40+.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [40, 0];
}
@@ -104,13 +103,13 @@ var SnapOfDisintegration = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Snap of Disintegration');
}
@@ -118,7 +117,7 @@ var SnapOfDisintegration = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('snap-animation-time');
dialog.bindAdjustment('snap-scale');
dialog.bindColorButton('snap-color');
@@ -129,7 +128,7 @@ var SnapOfDisintegration = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.2, y: 1.2};
}
}
diff --git a/src/effects/TRexAttack.js b/src/effects/TRexAttack.js
index 30f854f..c519fc0 100644
--- a/src/effects/TRexAttack.js
+++ b/src/effects/TRexAttack.js
@@ -14,14 +14,17 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 GdkPixbuf = await utils.importInShellOnly('gi://GdkPixbuf');
+const Cogl = await utils.importInShellOnly('gi://Cogl');
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect tears your windows apart with a series of violent scratches! //
@@ -32,18 +35,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 TRexAttack = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import these modules in this function as they are not available in the
- // preferences process. This callback is only called within GNOME Shell's process.
- const {Clutter, GdkPixbuf, Cogl} = imports.gi;
-
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
// Create the texture in the first call.
if (!this._clawTexture) {
const clawData = GdkPixbuf.Pixbuf.new_from_resource('/img/claws.png');
@@ -94,7 +93,7 @@ var TRexAttack = class {
// ---------------------------------------------------------------------------- metadata
// This effect is only available on GNOME Shell 40+.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [40, 0];
}
@@ -102,13 +101,13 @@ var TRexAttack = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('T-Rex Attack');
}
@@ -116,7 +115,7 @@ var TRexAttack = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('trex-animation-time');
dialog.bindColorButton('trex-scratch-color');
dialog.bindAdjustment('trex-scratch-scale');
@@ -129,7 +128,7 @@ var TRexAttack = class {
// 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+.
- getActorScale(settings) {
+ 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/src/effects/TVEffect.js b/src/effects/TVEffect.js
index 578f9a1..b1f6cb8 100644
--- a/src/effects/TVEffect.js
+++ b/src/effects/TVEffect.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect hides the actor by making it first transparent from top and bottom //
@@ -32,19 +33,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 TVEffect = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ this.shaderFactory = new ShaderFactory(Effect.getNick(), (shader) => {
// Store uniform locations of newly created shaders.
shader._uColor = shader.get_uniform_location('uColor');
@@ -60,7 +56,7 @@ var TVEffect = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -68,13 +64,13 @@ var TVEffect = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('TV Effect');
}
@@ -82,7 +78,7 @@ var TVEffect = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('tv-animation-time');
dialog.bindColorButton('tv-effect-color');
}
@@ -92,7 +88,7 @@ var TVEffect = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/TVGlitch.js b/src/effects/TVGlitch.js
index 155f97d..e44ad4f 100644
--- a/src/effects/TVGlitch.js
+++ b/src/effects/TVGlitch.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect combines the Glitch and the TV Effect. Credits go to Kurt Wilson //
@@ -31,19 +32,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 TVGlitch = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ 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');
@@ -69,7 +65,7 @@ var TVGlitch = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ static getMinShellVersion() {
return [3, 36];
}
@@ -77,13 +73,13 @@ var TVGlitch = class {
// 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('TV Glitch');
}
@@ -91,7 +87,7 @@ var TVGlitch = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('tv-glitch-animation-time');
dialog.bindAdjustment('tv-glitch-scale');
dialog.bindAdjustment('tv-glitch-speed');
@@ -104,7 +100,7 @@ var TVGlitch = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/effects/Wisps.js b/src/effects/Wisps.js
index 4111977..1bc0dd3 100644
--- a/src/effects/Wisps.js
+++ b/src/effects/Wisps.js
@@ -14,14 +14,15 @@
'use strict';
-const GObject = imports.gi.GObject;
+import * as utils from '../utils.js';
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+// 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 ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const utils = Me.imports.src.utils;
-const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
+const _ = await utils.importGettext();
//////////////////////////////////////////////////////////////////////////////////////////
// This effect lets your windows be carried to the realm of dreams by some little //
@@ -31,19 +32,14 @@ const ShaderFactory = Me.imports.src.ShaderFactory.ShaderFactory;
// 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 Wisps = class {
+export default class Effect {
// The constructor creates a ShaderFactory which will be used by extension.js to create
// shader instances for this effect. The shaders will be automagically created using the
// GLSL file in resources/shaders/.glsl. The callback will be called for each
// newly created shader instance.
constructor() {
- this.shaderFactory = new ShaderFactory(this.getNick(), (shader) => {
- // We import Clutter in this function as it is not available in the preferences
- // process. This creator function of the ShaderFactory is only called within GNOME
- // Shell's process.
- const Clutter = imports.gi.Clutter;
-
+ 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');
@@ -72,20 +68,20 @@ var Wisps = class {
// ---------------------------------------------------------------------------- metadata
// The effect is available on all GNOME Shell versions supported by this extension.
- getMinShellVersion() {
+ 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').
- getNick() {
+ 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.
- getLabel() {
+ static getLabel() {
return _('Wisps');
}
@@ -93,7 +89,7 @@ var Wisps = class {
// 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.
- bindPreferences(dialog) {
+ static bindPreferences(dialog) {
dialog.bindAdjustment('wisps-animation-time');
dialog.bindAdjustment('wisps-scale');
dialog.bindColorButton('wisps-color-1');
@@ -118,7 +114,7 @@ var Wisps = class {
// 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+.
- getActorScale(settings) {
+ static getActorScale(settings, forOpening, actor) {
return {x: 1.0, y: 1.0};
}
}
diff --git a/src/migrate.js b/src/migrate.js
index 5814c82..6cc92b7 100644
--- a/src/migrate.js
+++ b/src/migrate.js
@@ -14,15 +14,13 @@
'use strict';
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-const ProfileManager = Me.imports.src.ProfileManager.ProfileManager;
-const utils = Me.imports.src.utils;
+import {ProfileManager} from './ProfileManager.js';
+import * as utils from './utils.js';
// Migrating from pre-27 versions is pretty involved. Before, all settings were stored in
// the standard Gio.Settings backend. Now, there are effect profiles. Depending on the
// settings one or two profiles may be required.
-async function fromVersion26() {
+export async function fromVersion26() {
return utils
.executeCommand(['dconf', 'dump', '/org/gnome/shell/extensions/burn-my-windows/'])
.catch(r => utils.debug('Failed to get old settings for effect migration: ' + r))
diff --git a/src/utils.js b/src/utils.js
index 5e9f5c9..a0c146a 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -14,101 +14,52 @@
'use strict';
-const {Gtk, Gio} = imports.gi;
-const ByteArray = imports.byteArray;
-
-// libadwaita is available starting with GNOME Shell 42.
-let Adw = null;
-try {
- Adw = imports.gi.Adw;
-} catch (e) {
- // Nothing to do.
-}
-
-// Returns the given argument, except for "alpha", "beta", and "rc". In these cases -3,
-// -2, and -1 are returned respectively.
-function toNumericVersion(x) {
- switch (x) {
- case 'alpha':
- return -3;
- case 'beta':
- return -2;
- case 'rc':
- return -1;
- }
- return x;
-}
-
-const Config = imports.misc.config;
-const [GS_MAJOR, GS_MINOR] = Config.PACKAGE_VERSION.split('.').map(toNumericVersion);
-
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = imports.misc.extensionUtils.getCurrentExtension();
-
-const _ = imports.gettext.domain('burn-my-windows').gettext;
+import Gio from 'gi://Gio';
+import GLib from 'gi://GLib';
// This method can be used to write a message to GNOME Shell's log. This is enhances
// the standard log() functionality by prepending the extension's name and the location
// where the message was logged. As the extensions name is part of the location, you
// can more effectively watch the log output of GNOME Shell:
-// journalctl -f -o cat | grep -E 'particle-effects|'
-// This method is based on a similar script from the Fly-Pie GNOME Shell extension which
-// os published under the MIT License (https://github.com/Schneegans/Fly-Pie).
-function debug(message) {
+// journalctl -f -o cat | grep -E 'burn-my-windows|'
+export function debug(message) {
const stack = new Error().stack.split('\n');
// Remove debug() function call from stack.
stack.shift();
- // Find the index of the extension directory (e.g. particles@schneegans.github.com) in
- // the stack entry. We do not want to print the entire absolute file path.
- const extensionRoot = stack[0].indexOf(Me.metadata.uuid);
+ // Find the index of the extension directory in the stack entry. We do not want to
+ // print the entire absolute file path.
+ const extensionRoot = stack[0].indexOf('burn-my-windows@schneegans.github.com');
- log('[' + stack[0].slice(extensionRoot) + '] ' + message);
+ console.log('[' + stack[0].slice(extensionRoot) + '] ' + message);
}
-// This method simply returns true if we are currently using GTK4.
-function isGTK4() {
- return Gtk.get_major_version() == 4;
-}
-
-// Starting with GNOME Shell 42, the settings dialog uses libadwaita (at least most of
-// the time - it seems that pop!_OS does not support libadwaita even on GNOME 42).
-function isADW() {
- return Adw && shellVersionIsAtLeast(42, 'beta');
-}
-
-// This method returns 'gtk3', 'gtk4', or 'adw' depending on the currently used GTK / and
-// or libadwaita version.
-function getUIDir() {
- return isADW() ? 'adw' : (isGTK4() ? 'gtk4' : 'gtk3');
-}
-
-// This method returns true if the current GNOME Shell version matches the given
-// arguments.
-function shellVersionIs(major, minor) {
- return GS_MAJOR == major && GS_MINOR == toNumericVersion(minor);
-}
-
-// This method returns true if the current GNOME Shell version is at least as high as the
-// given arguments. Supports "alpha" and "beta" for the minor version number.
-function shellVersionIsAtLeast(major, minor) {
- if (GS_MAJOR > major) {
- return true;
+// This method can be used to import a module in the GNOME Shell process only. This
+// is useful if you want to use a module in extension.js, but not in the preferences
+// process. This method returns null if it is called in the preferences process.
+export async function importInShellOnly(module) {
+ if (typeof global !== 'undefined') {
+ return (await import(module)).default;
}
+ return null;
+}
- if (GS_MAJOR == major) {
- return GS_MINOR >= toNumericVersion(minor);
+// This method can be used to import gettext. This is done differently in the
+// GNOME Shell process and in the preferences process.
+export async function importGettext() {
+ if (typeof global === 'undefined') {
+ return (await import('resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'))
+ .gettext;
}
-
- return false;
+ return (await import('resource:///org/gnome/shell/extensions/extension.js')).gettext;
}
// Reads the contents of a file contained in the global resources archive. The data
// is returned as a string.
-function getStringResource(path) {
+export function getStringResource(path) {
const data = Gio.resources_lookup_data(path, 0);
- return ByteArray.toString(ByteArray.fromGBytes(data));
+ return new TextDecoder().decode(data.get_data());
}
// Executes a command asynchronously and returns the output from 'stdout' on success or
@@ -116,7 +67,7 @@ function getStringResource(path) {
// 'stdin' and cancellable can be used to stop the process before it finishes.
// This is directly taken from here:
// https://gjs.guide/guides/gio/subprocesses.html#complete-examples
-async function executeCommand(argv, input = null, cancellable = null) {
+export async function executeCommand(argv, input = null, cancellable = null) {
let cancelId = 0;
let flags = (Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_PIPE);