bakkeby/patches

Improving switchtag patch

adetabrani opened this issue · 4 comments

Do you have any plans to improve the functionality of the switchtag patch? such as focusing on the previous tag when the tag that has already been moved is closed

I know you already wrote this note on the switchtag wiki, is this functionality very complex to implement? If so, feel free to delete this issue, because it's a little annoying that I have to always move the focus to the previous tag every time I close a tag I've already moved

Perhaps you could describe a scenario? Not sure what you mean by closing a tag or moving a tag.

simplescreenrecorder.webm

sorry bro, I mean window focus on previous tag (I didn't sleep well today 😂)

as you can see in the video, I want when the window is moved to another tag and I close the window I moved, focus should move to the previous tab automatically when I close that window, but the behavior that I get the focus does not move at all

I see what you mean, and surely it would be possible to implement something like this.

I am not sure if you have thought this through though from a workflow perspective.

Like why did you move the window to that other tag (for demonstration purposes sure, but I mean as in your normal workflow). You could have it so that you either move a window away, or the view follows the window that is being moved.

If you are moving it to immediately close it then that seems a bit bizarre from a workflow perspective. What I am getting at is that at some point you are going to move the music video playing "ladydog" from tag 2 to tag 5, then you are going to change the view to tag 3 to do some work in a terminal. Then you go to tag 9 to look up the word "thesaurus" in the dictionary in your browser. At some point you get back to tag 5 and the video has stopped so you close it, now suddenly you are on tag 2 and makes absolutely no sense. You close something on tag 2 and you are on tag 9 (because you moved that window previously) and it seems like your window manager is living its own life.

Then what if the music video that was moved to tag 5 closes automatically when it has finished playing the video? You find yourself typing something in a terminal on tag 3 in a critical situation and suddenly you are moved to tag 2 for no obvious reason.

There are other situations as well but to keep this relatively short I won't go into more.

Moving back to the previous tag may make sense if the window is going to be closed in the very near future, but not so much if it may live on for more than five minutes.

In general I would say that it is better to have rules that place windows on designated tags. As for the moving back thing you could for example have a keybinding that simply brings you back to the tag of the most recently used client. That you could have for the same keybinding as killclient if that is your desired workflow.

Thank you for your input, after considering it, I think I changed my mind about this feature, the points you conveyed to me do make sense, sorry for interrupting your time.