lingtjien / Grid-Tiling-Kwin

A kwin script that automatically tiles windows
GNU General Public License v3.0
901 stars 43 forks source link

Feature Request: Shortcut to Blacklist an App #149

Closed diogogmatos closed 4 weeks ago

diogogmatos commented 2 months ago

Hey,

So I was just using the script as usual and when using the 'Toggle Tile/Float' shortcut I had this idea: if the 'Toggle Tile/Float' shortcut successfully floats the focused window, then it shouldn't be very complicated to create a shortcut that instead adds the current window to the blacklist. This way, it wouldn't be necessary to try and figure out what name the window goes by to be identified by the script.

If this worked, it would be a solution to a problem I mentioned in this issue: #140 , where I couldn't figure out how to float the Firefox PIP window, since I tried applying the 'Toggle Tile/Float' to the Firefox PIP window and it works, it successfully floats the PIP window, keeping the Firefox one tiled.

I surely have no idea the complexities behind this project and if this is even possible, but just some food for thought anyway.

Thanks!

lingtjien commented 2 months ago

Are you expecting this shortcut to add applications to the blacklist to be persistent between reboots? So say you mark the Firefox PIP window as blacklisted and you then reboot, do you expect it to still be blacklisted?

diogogmatos commented 2 months ago

Are you expecting this shortcut to add applications to the blacklist to be persistent between reboots? So say you mark the Firefox PIP window as blacklisted and you then reboot, do you expect it to still be blacklisted?

Yes.

lingtjien commented 2 months ago

The problem is that what if a window that you then add to the blacklist shares a name with other applications, then you accidentally blacklist those as well (especially child windows of a main application window, sometimes share the same name). Or if the application has a version number in the name (gimp used to do that back in the days), then when you upgrade your application the blacklist matching would no longer work.

I think it's better to let the user figure out the name that they want to blacklist, so that they can make a cautious decision about the name and not end up blacklisting too much or too little.

For example, if a user figures out that the name of the application is gimp-2.18 that they can then decide "oh but I don't want to blacklist just this specific version of gimp, I want to blacklist all versions of gimp" so they proceed to add gimp to the blacklist instead of gimp-2.18.