Skip to content

Commit

Permalink
Merge pull request #488 from jgarza9788/newMain
Browse files Browse the repository at this point in the history
  • Loading branch information
Schneegans authored Feb 8, 2025
2 parents 17c4902 + cbd364c commit b003891
Show file tree
Hide file tree
Showing 32 changed files with 3,960 additions and 192 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
/resources/burn-my-windows.gresource
/resources/burn-my-windows.gresource.xml
kwin/_build
kwin/*.tar.gz
kwin/*.tar.gz
notes.md
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ This extension is not only more useless than the cube, but it is also much more
| Effect | Preview |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| **Apparition** <br> This effect hides your windows by violently sucking them into the void of magic! | <img src ="docs/pics/apparition.gif" /> |
| **Aura Glow** <br> A radiant edge-lit animation | <img src ="docs/pics/aura-glow.gif" /> |
| **Broken Glass** <br> Shatter your windows into a shower sharp shards! This effect can be configured so that the shards fly away from your mouse pointer position! | <img src ="docs/pics/broken-glass.gif" /> |
| **Doom** <br> Melt your windows. Inspired by the legendary screen transitions of the original Doom. | <img src ="docs/pics/doom.gif" /> |
| **Energize A** <br> Beam your windows away! | <img src ="docs/pics/energize-a.gif" /> |
Expand All @@ -41,15 +42,19 @@ This extension is not only more useless than the cube, but it is also much more
| **Hexagon** <br> With glowing lines and hexagon-shaped tiles, this effect looks very sci-fi. | <img src ="docs/pics/hexagon.gif" /> |
| **Incinerate** <br> A less snappy but definitely more fancy take on the fire effect. | <img src ="docs/pics/incinerate.gif" /> |
| **Matrix** <br> Turn your windows into a shower of green letters! The color is actually configurable. | <img src ="docs/pics/matrix.gif" /> |
| **Mushroom** <br> Inspired by your favorite italian plumber! | <img src ="docs/pics/mushroom.gif" /> |
| **Paint Brush** <br> Paint or erase your windows with a thick paint brush. | <img src ="docs/pics/paint-brush.gif" /> |
| **Pixelate** <br> Pixelate your windows and randomly hide pixels until the entire window is gone. | <img src ="docs/pics/pixelate.gif" /> |
| **Pixel Wheel** <br> This simple effect pixelates the window and hides the pixels in a wheel-like fashion. | <img src ="docs/pics/pixel-wheel.gif" /> |
| **Pixel Wipe** <br> This effect pixelates the window and hides the pixels radially, starting from the pointer position. | <img src ="docs/pics/pixel-wipe.gif" /> |
| **Portal** <br> This ridiculous effect teleports your windows from and to alternative dimensions. It may resemble the portal from a well-known cartoon series... | <img src ="docs/pics/portal.gif" /> |
| **RGB Warp** <br> Red Blue and Green go bye bye. | <img src ="docs/pics/rgbwarp.gif" /> |
| **Snap of Disintegration** <br> Dissolve your windows into a cloud of dust. | <img src ="docs/pics/snap.gif" /> |
| **TeamRocket** <br> ... is blasting off again! | <img src ="docs/pics/teamrocket.gif" /> |
| **T-Rex Attack** <br> Destroy your windows with a series of violent slashes! | <img src ="docs/pics/trex.gif" /> |
| **TV Effect** <br> This is a very simple effect to demonstrate that this extension could also be used in a more professional environment. | <img src ="docs/pics/tv.gif" /> |
| **TV Glitch** <br> This effect combines the Glitch and the TV Effect. | <img src ="docs/pics/tv-glitch.gif" /> |
| **Unicorn Fart** <br> Sniff the Rainbow! | <img src ="docs/pics/unicorn-fart.gif" /> |
| **Wisps** <br> Let your windows be carried away to the realm of dreams by these little fairies! | <img src ="docs/pics/wisps.gif" /> |
| **Your Effect!** <br> 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). | [![Create your own effects](docs/pics/custom.jpg)](docs/how-to-create-new-effects.md) |

Expand All @@ -66,6 +71,7 @@ Below is a table which summarizes the current availability for all effects.
</tr>
<tr><td></td> <td>3.36</td> <td>3.38</td><td>40+</td><td>5.25.0+</td></tr>
<tr><td>Apparition</td> <td> </td> <td>✅</td> <td>✅</td> <td> </td> </tr>
<tr><td>Aura Glow</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Broken Glass</td> <td> </td> <td> </td> <td>✅</td> <td> </td> </tr>
<tr><td>Doom</td> <td> </td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Energize A</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
Expand All @@ -77,15 +83,19 @@ Below is a table which summarizes the current availability for all effects.
<tr><td>Hexagon</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Incinerate</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Matrix</td> <td> </td> <td> </td> <td>✅</td> <td> </td> </tr>
<tr><td>Mushroom</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td>✅</tr>
<tr><td>Paint Brush</td> <td> </td> <td> </td> <td>✅</td> <td> </td> </tr>
<tr><td>Pixelate</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Pixel Wheel</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Pixel Wipe</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Portal</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>RGB Warp</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Snap of Disintegration</td> <td> </td> <td> </td> <td>✅</td> <td> </td> </tr>
<tr><td>TeamRocket</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>T-Rex Attack</td> <td> </td> <td> </td> <td>✅</td> <td> </td> </tr>
<tr><td>TV Effect</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>TV Glitch</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Unicorn Fart</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
<tr><td>Wisps</td> <td>✅</td> <td>✅</td> <td>✅</td> <td>✅</td> </tr>
</table>

Expand Down
36 changes: 36 additions & 0 deletions docs/how-to-create-new-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,39 @@ make install && pkill -f '.Extensions' && sleep 2 ; gnome-extensions prefs burn-
That's it!
If you have any questions, feel free to [ask them on the discussions board](https://github.com/Schneegans/Burn-My-Windows/discussions).
If you are happy with your effect, submit a pull request, and it may get included in the next version!


## Install Dependencies (if needed)
the list below might not be 100% correct, please pull request if changes need to be made

### **Ubuntu**
```bash
sudo apt install make gettext libglib2.0-dev-bin clang-format
```

### **Fedora/RHEL**
```bash
sudo dnf install make gettext glib2-devel clang-format
```

### **Arch Linux**
```bash
sudo pacman -S base-devel gettext glib2 clang-format
```

### **openSUSE**
```bash
sudo zypper install make gettext-tools glib2-devel clang-format
```

### **Alpine Linux**
For minimal distributions like Alpine:
```bash
sudo apk add build-base gettext-dev glib-dev clang-format
```

### **Gentoo**
```bash
sudo emerge --ask sys-devel/make sys-devel/gettext dev-libs/glib clang-format
```

11 changes: 10 additions & 1 deletion docs/pics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ The preview GIFs are recorded with OBS Studio at 1920x1080, cut to a length of e

```bash
gifski --fps 30 -W 320 -H 180 -o effect.gif effect.mp4
```
```

# gif Info
GIF length: 2 second(s)
GIF width/height: 320×180 pixels
number of frames: 60
number of colors: 256
loop count: 0 (endless)

The animation should starts 1s into the gif.
Binary file added docs/pics/aura-glow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pics/mushroom.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pics/rgbwarp.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pics/teamrocket.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pics/unicorn-fart.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 11 additions & 9 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {WindowPicker} from './src/WindowPicker.js';
import * as utils from './src/utils.js';

import Apparition from './src/effects/Apparition.js';
import AuraGlow from './src/effects/AuraGlow.js';
import BrokenGlass from './src/effects/BrokenGlass.js';
import Doom from './src/effects/Doom.js';
import EnergizeA from './src/effects/EnergizeA.js';
Expand All @@ -34,18 +35,20 @@ import Glitch from './src/effects/Glitch.js';
import Hexagon from './src/effects/Hexagon.js';
import Incinerate from './src/effects/Incinerate.js';
import Matrix from './src/effects/Matrix.js';
import Mushroom from './src/effects/Mushroom.js';
import PaintBrush from './src/effects/PaintBrush.js';
import Pixelate from './src/effects/Pixelate.js';
import PixelWheel from './src/effects/PixelWheel.js';
import PixelWipe from './src/effects/PixelWipe.js';
import Portal from './src/effects/Portal.js';
import RGBWarp from './src/effects/RGBWarp.js';
import SnapOfDisintegration from './src/effects/SnapOfDisintegration.js';
import TeamRocket from './src/effects/TeamRocket.js';
import TRexAttack from './src/effects/TRexAttack.js';
import TVEffect from './src/effects/TVEffect.js';
import TVGlitch from './src/effects/TVGlitch.js';
import Wisps from './src/effects/Wisps.js';


import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import {Workspace} from 'resource:///org/gnome/shell/ui/workspace.js';
import {WindowPreview} from 'resource:///org/gnome/shell/ui/windowPreview.js';
Expand All @@ -71,14 +74,13 @@ export default class BurnMyWindows extends Extension {

// New effects must be registered here and in prefs.js.
this._ALL_EFFECTS = [
new Apparition(), new BrokenGlass(), new Doom(),
new EnergizeA(), new EnergizeB(), new Fire(),
new Focus(), new Glide(), new Glitch(),
new Hexagon(), new Incinerate(), new Matrix(),
new PaintBrush(), new Pixelate(), new PixelWheel(),
new PixelWipe(), new Portal(), new SnapOfDisintegration(),
new TRexAttack(), new TVEffect(), new TVGlitch(),
new Wisps(),
new Apparition(), new AuraGlow(), new BrokenGlass(), new Doom(),
new EnergizeA(), new EnergizeB(), new Fire(), new Focus(),
new Glide(), new Glitch(), new Hexagon(), new Incinerate(),
new Matrix(), new PaintBrush(), new Pixelate(), new PixelWheel(),
new PixelWipe(), new Portal(), new RGBWarp(), new SnapOfDisintegration(),
new TeamRocket(), new TRexAttack(), new TVEffect(), new TVGlitch(),
new Wisps(), new Mushroom()
];

// Load all of our resources.
Expand Down
5 changes: 3 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"47"
],
"url": "https://github.com/Schneegans/Burn-My-Windows",
"version": 45
}
"version": 47

}
36 changes: 28 additions & 8 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import * as utils from './src/utils.js';
import {ProfileManager} from './src/ProfileManager.js';

import Apparition from './src/effects/Apparition.js';
import AuraGlow from './src/effects/AuraGlow.js';
import BrokenGlass from './src/effects/BrokenGlass.js';
import Doom from './src/effects/Doom.js';
import EnergizeA from './src/effects/EnergizeA.js';
Expand All @@ -35,12 +36,15 @@ import Glitch from './src/effects/Glitch.js';
import Hexagon from './src/effects/Hexagon.js';
import Incinerate from './src/effects/Incinerate.js';
import Matrix from './src/effects/Matrix.js';
import Mushroom from './src/effects/Mushroom.js';
import PaintBrush from './src/effects/PaintBrush.js';
import Pixelate from './src/effects/Pixelate.js';
import PixelWheel from './src/effects/PixelWheel.js';
import PixelWipe from './src/effects/PixelWipe.js';
import Portal from './src/effects/Portal.js';
import RGBWarp from './src/effects/RGBWarp.js';
import SnapOfDisintegration from './src/effects/SnapOfDisintegration.js';
import TeamRocket from './src/effects/TeamRocket.js';
import TRexAttack from './src/effects/TRexAttack.js';
import TVEffect from './src/effects/TVEffect.js';
import TVGlitch from './src/effects/TVGlitch.js';
Expand Down Expand Up @@ -71,10 +75,15 @@ export default class BurnMyWindowsPreferences extends ExtensionPreferences {

// New effects must be registered here and in extension.js.
this._ALL_EFFECTS = [
Apparition, BrokenGlass, Doom, EnergizeA, EnergizeB, Fire,
Focus, Glide, Glitch, Hexagon, Incinerate, Matrix,
PaintBrush, Pixelate, PixelWheel, PixelWipe, Portal, SnapOfDisintegration,
TRexAttack, TVEffect, TVGlitch, Wisps,
Apparition, AuraGlow, BrokenGlass,
Doom, EnergizeA, EnergizeB,
Fire, Focus, Glide,
Glitch, Hexagon, Incinerate,
Matrix, Mushroom, PaintBrush,
Pixelate, PixelWheel, PixelWipe,
Portal, RGBWarp, SnapOfDisintegration,
TeamRocket, TRexAttack, TVEffect,
TVGlitch, Wisps,
];


Expand Down Expand Up @@ -183,13 +192,24 @@ export default class BurnMyWindowsPreferences extends ExtensionPreferences {
this._searchEntry.connect('search-changed', () => {
const query = this._searchEntry.get_text().toLowerCase();

this._effectRows.forEach(er => {
this._effectRows.forEach(row => {
if (query === '') {
er.show(); // Show all effects if query is empty
row.show(); // Show all effects if query is empty
} else {
// Show or hide each effect based on query match
const showEffect = er.name.toLowerCase().includes(query);
showEffect ? er.show() : er.hide();
const showEffect = row.name.toLowerCase().includes(query);

// old code
// showEffect ? er.show() : er.hide();

// new code ...auto-expand
if (showEffect) {
row.show();
row.set_expanded(true);
} else {
row.set_expanded(false);
row.hide();
}

// TODO
// maybe add a fuzzy search later
Expand Down
Loading

0 comments on commit b003891

Please sign in to comment.