Bug 464322 - Make Kwin capable of using one animation for opening windows and a different one for closing
Summary: Make Kwin capable of using one animation for opening windows and a different ...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-window-management (show other bugs)
Version: 5.26.5
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-15 12:48 UTC by Eduardo Correia
Modified: 2024-02-20 11:27 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example Mockup / Draft (120.37 KB, image/jpeg)
2023-01-15 12:48 UTC, Eduardo Correia
Details
Alternative Idea including random effects (149.53 KB, image/png)
2023-01-21 19:42 UTC, code
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Correia 2023-01-15 12:48:46 UTC
Created attachment 155312 [details]
Example Mockup / Draft

[Feature Request]
It would be cool, especially when used in combination with "burn my windows" effects, if we could select one effect for the "windows open animation", and a different one for closing. That is, have two different selection options in the "Desktop Effects" KCM, one for opening animation and another for closing. I think this could maybe be it's own option in the windows effects section. Where we currently have the default "Scale" and etc window animations options, we could at the end of this list have this additional one called "Advanced Effects" or something like that, where we could then go into the settings for this option and select the "window open animation" and a "window close animation". By default and to avoid having no animations when selecting custom animations, this could come with the default animation on both options.
Comment 1 Eduardo Correia 2023-01-15 12:53:04 UTC
Please any mod, if possible, change the severity of this bug to "wishlist". I did F5 by mistake while editing this and didn´t notice the importance/severity reverted back to "normal".
Comment 2 code 2023-01-21 19:42:29 UTC
Created attachment 155480 [details]
Alternative Idea including random effects

I just added an alternative idea for how this could look like user-interface wise. For the Burn-My-Windows effects, I frequently get requests for random effects (the open/close animation should be chosen randomly from a given set of effects) as well as for different settings for opening / closing with the same effect (e.g. different duration or different color).

In the attached mockup, I have a separate list of effects for opening and closing. This allows for having different settings for the same effect. Furthermore, the radio buttons for choosing the effect have been replaced by checkboxes - if multiple are selected, one should be chosen at random.

While this would make many users of the Burn-My-Windows effects happy, I have no idea whether this is feasible to implement. So it's just an idea :)
Comment 3 Eduardo Correia 2023-01-21 20:29:52 UTC
(In reply to code from comment #2)

I like your idea but I don't know how complex it would be to implement, and its a very niche use case. Seems very complex in terms of coding, I am not a KDE developer thought so can't say. I also really liked your mockup, but to be honest we are slowly making this effects config page overly complex and it will get very overwhelming (it already is) for many users. I think we could implement your idea (I don't know about the checkboxes and random effects though) but in a separate screen dedicated to it. Keep it "simple by default". Actually, the main desktop effects page should maybe be even more "downgraded" - it should maybe only show a simple dropdown selector for "Window Open/Close effect". This way all those hundreds of options (if you install many extra effects) will get all condensed into a single option, that dropdown selector. Would have the same functionality it already has, just a lot cleaner. You clicked the dropdown, you select an effect from all the installed, done. But! It could also have, bellow that dropdown selector, the idea of "advanced open/close effect options". By clicking it, the user could be taken to a new window/page/tab where it would list all the effects in a list way (basically the way it currently is), separated in two lists, the open effects and the close effects, where we could choose a different one for each, and here is where we could use your mockup (comment #2). The idea of choosing multiple effects could be interesting but we need a kde developer to tell us how feasible it would be to implement. Might not be worth it because it would be a very niche use case, having random effects like that, and very complex to develop.

But I still think we could cleanup that effects page a lot more with that selector, since it would achieve the same thing as the current implementation. Maybe I should open a separate wishlist request with this "cleanup" idea?
Comment 4 David Redondo 2023-01-23 08:09:58 UTC
Having it in the main list is certainly less confusing imo as an item in the list itself. Coding wise should not be to complicated
Comment 5 Matthias Mueller 2023-05-13 12:39:17 UTC
I wholeheartedly support this wish!

i also think it would be better to directly have two sections in the settings.
Or - if it's not too complicated in regards to implementation - maybe have the current selection for both opening and closing by default and a checkbox that splits that section into two?
Comment 6 Jep 2024-02-20 11:27:06 UTC
I've created a mini script in fish that uses kwriteconfig5 to modify kwinrc.

The script is:

#!/usr/bin/env fish

# Lista de nombres de efectos
set efectos kwin4_effect_incinerateEnabled kwin4_effect_scaleEnabled kwin4_effect_squashEnabled glideEnabled kwin4_effect_energize_aEnabled kwin4_effect_energize_bEnabled kwin4_effect_doomEnabled kwin4_effect_glitchEnabled kwin4_effect_hexagonEnabled kwin4_effect_pixel_wheelEnabled kwin4_effect_pixel_wipeEnabled kwin4_effect_pixelateEnabled kwin4_effect_tvEnabled kwin4_effect_wispsEnabled fallapartEnabled

# Elegir un nombre de efecto al azar
set elegido (random choice $efectos)

# Agregar todos los efectos como falsos primero
for efecto in $efectos
    kwriteconfig5 --file /home/jbd/.config/kwinrc --group Plugins --key $efecto false
end

# Sobrescribir el efecto elegido como verdadero
kwriteconfig5 --file /home/jbd/.config/kwinrc --group Plugins --key $elegido true

qdbus-qt5 org.kde.KWin /KWin reconfigure

# Opcional: Imprimir el efecto elegido y su estado
echo "Efecto $elegido establecido en true."

in # Lista de nombres de efectos I have all the names of all the effects I have installed in my KDE, with the name that appears in kwinrc (in my installation it is in /home/jbd/.config/kwinrc under the Plugins section), then I choose one in elegido. After that I loop for all the effects to set them to false, and then write the chosen one (elegido) in Kwinrc. Finally I do qdbus-qt5 org.kde.KWin /KWin reconfigure to update kwin with the new effect (the problem is that there is a blink of the screen when I do that).

After checking that the script works, I've installed it in my user crontab to be run every 10 minutes