Schneegans / Burn-My-Windows

🔥 Disintegrate your windows with style.
GNU General Public License v3.0
2.66k stars 77 forks source link

Specify effect for certain applications #89

Closed hasecilu closed 1 year ago

hasecilu commented 2 years ago

The Motivation

Some applications may benefit more aesthetically from certain effects. For example:

The Solution

Create a Advanced options tab to specify a closing effect and a opening effect. This settings should overwrite the General options settings. Example:

This idea was conceived for individual applications but can be applied to groups, ie, instead of choose effects individually for tilix, guake and alacritty I want to create a group called Terminals, assign it some effects and then add tilix, guake and alacritty to that group, the selected effects in Terminals are applied to those applications

Screenshot from 2022-02-02 15-26-20

The Alternatives

In #37 is presented the idea of disabling effects for certain applications, that feature is the complement of this Feature Request.

Schneegans commented 2 years ago

This is a pretty good idea! I think I'll close #37 in favor of this one here, as this solution sounds very good and would include #37. However, it also seems to be quite a lot of work UI-wise, so there will be other things with a higher priority for me. But I'll keep this on the list 😉

vozeldr commented 2 years ago

I see that #37 is closed in favor this one. I would love this feature to be added. I use the ddterm (dropdown terminal) extension and every time I hide that terminal, the animation runs on it. I do think #37 would be a bit simpler to implement on it's own (i.e. add a single setting with a list of exclusions) and I might even be down to try and tackle that. This issue is probably more than I have availability for though.

Schneegans commented 2 years ago

To be honest, I am a bit hesitant to start working on this (or encourage anybody else to do it) because of the Preset System idea which popped up in several places. Various people suggested that it would be nice if one could have different configurations of the same effect for opening and closing windows. Or maybe for different applications (e.g. red fire for firefox and blue fire for thunderbird etc.).

I haven't put too much thought into this up to now, but this would certainly require a complete redesign of the settings dialog. The basic idea would be that the user can create an arbitrary number of effect configurations (e.g. several variants of the fire effect, a few variants of the matrix effect, and so on), and then can select which configuration is used for which event.

While this will require a much more sophisticated UI, it would also make the work done for this issue here more or less obsolete...

vozeldr commented 2 years ago

Hopefully the complexity of that configuration screen won't be overwhelming to users and there will still be a default configuration for anything not specifically overwritten.

Schneegans commented 2 years ago

Yep. That's why I haven't started to think about this in detail :laughing: For me, it would be a strict requirement that the configuration does not get more complicated for simple use cases as it is right now. This will be difficult to achieve, but possible I think.

Schneegans commented 1 year ago

I thought about this alot in the recent days and I think that I have a proper solution now. Here's what I would like to have:

The solution for this may be Effect Profiles. The default profile is enabled under all conditions. If you want, you can add more specific profiles, which are only used if the corresponding conditions are met. Here's a mockup how this could look like. The settings dialog does not change much, the only differences are the added profile selection in the header bar and that effects can now only be enabled / disabled; there is no separate selection for opening / closing animation anymore: image In fact, this may make things a bit more easy for first-time users. Then, if you edit the Default Profile, this pops up: image You can limit the cases where this profile is applied, or add new profiles. For example, this could look like this: image This will be pretty complex to implement, but I think that it would solve many issues!

fnxweb commented 1 year ago

Actually, that sounds great! Can't really offer time to help code, but happy to beta test bits, and potentially debug.

Schneegans commented 1 year ago

I am currently working on this in the feature/effect-profiles branch. It's not yet functional, but already pretty promising! Stay tuned for future updates!

hasecilu commented 1 year ago

If I understood correctly you can add n profiles at once and every profile includes a set of constraints/rules, if you want more tweaks you add more profiles. I'll be happy to test it.

Schneegans commented 1 year ago

If I understood correctly you can add n profiles at once and every profile includes a set of constraints/rules, if you want more tweaks you add more profiles. I'll be happy to test it.

Yes, pretty much this. I'll let you know when its ready for testing!

Schneegans commented 1 year ago

The feature/effect-profiles now works already pretty well (I hope :smile:) on GNOME 43. So if you are on this version, you could start playing around. The basic approach would be:

git clone https://github.com/Schneegans/Burn-My-Windows.git
cd Burn-My-Windows
git checkout feature/effect-profiles
make install

Then restart GNOME Shell with Alt + F2, r + Enter or logout / login if you are on Wayland.

But please keep in mind, that this my break on a daily basis as I am actively working on it.

Btw, I am tracking the progress here: #292.

hasecilu commented 1 year ago

I have some hours using it, and haven't encountered any problems with the rules. The window picker is very handy. Having multiple applications per profile can reduce the number of profiles needed when you want the same rule for various programs, not a big deal if just are 2 or 3. Apart from that it's very nice.

Schneegans commented 1 year ago

Thanks for the feedback! A simple solution would be to allow for a list of applications. Maybe separated with a "|". Like "Firefox | gnome-terminal". The window picker would then just append to the list.

At some point in the future libadwaita may support tagged entries which would be very cool here.

Schneegans commented 1 year ago

The above mentioned branch should now also work on GNOME Shell 40, 41, and 42. So if anybody wants to test it, I would be happy about more feedback! :smile: