hyprland-community / pyprland

Scratchpads & many goodies for Hyprland [maintainer=@fdev31]
MIT License
406 stars 17 forks source link

[FEAT] Exclude to ignore scratchpads that are not floating #124

Closed punk-dev-robot closed 4 months ago

punk-dev-robot commented 4 months ago

Is your feature request related to a problem? Please describe. I have many scratchpads that I use in my workflow. Most of them occupy the same spot - a big window in the middle of the screen. So it makes sense to me to use excludes=* for many of them. This works well most of the time, but sometimes I need to have one of my scratchpads as a reference, e.g. I want to have obsidian side to side to the browser to reference notes when writing tickets. Normally I would just change the floating status of the scratchpad and work as long as I need, then toggle it back to floating status. The problem is that when it is not floating and I want to show another scratchpad (like terminal or audio settings) it still moves my window that is not floating away, shuffling my windows and leading to unpredicted behaviours.

Describe the solution you'd like I would like for pyprland to ignore scratchpads windows that are not floating. Ideally not only for excludes, but for all actions like normal scratchpad toggle.

Describe alternatives you've considered Unfortunately, I took some apps out of pyprland and manage them manually as I could not come up with a good solution within pyprland

fdev31 commented 4 months ago

Ok, at first it didn't sound great to implement, but now I see there is a changefloatingmode event emitted by hyprland, meaning I can track the floating statuses without querying all the clients each time.

It sounds like a good idea to not hide those windows, I can just keep a memory of all the floating statuses of the scratchpads, this event may even allow a couple of improvements.

fdev31 commented 4 months ago

Will not work on that until #126 is closed.

fdev31 commented 4 months ago

@kuba-gaj do you have an option to test the git version? I did some small refactor that should allow that, but don't have much time to run tests etc at the moment...

punk-dev-robot commented 4 months ago

Hey, thank you for looking into it. I tried and it is much much better now.

But this is a huge improvement to my workflow, thank you very much for that!

fdev31 commented 4 months ago

hm, why would it not do anything if you ask to toggle a specific scratchpad ? I'm not sure I would like to change that, so if it's good enough for you you can close the bug :)

punk-dev-robot commented 4 months ago

Very good for me, thank you. This is big improvement for me