I've written #345 previously for a "A way to get a ws stack independent window for scratchpad".
I've made a implementation for WM independent scratchpad, but there is a problem that appears in at least two situations.
Situation 1:
Have a ws with some windows in default layout, vertical tile.
Fire the scratchpad script to create or place and focus a spd (scratchpad) window in current ws.
Fire again scratchpad to hide the spd window.
The last window of ws will always receive the focus, even if was not there before the spd cicle.
Situation 2:
Have a ws with some windows in default layout, vertical tile.
Fire the [maximize_toggle] action to have current focused window maximized.
Do the spd cicle, steps 2 and 3 of situation 1.
No maximized window and, as step 4 of situation 1, focus on last window always.
With FLOAT quirk defined for a spd window, if I fire scratchpad on a ws with max layout the window will be maximized for some reason, but this is for another issue (#399).
The problem is: spectrwm doesn't have a machanism to handle a ws independent window, then the spd window will mess with the ws last focused window, then the focused window after spd window gets iconified or goes to another ws will be always the last, and this is the current expected behavior.
What I name here SCRATCHPAD quirk is, indeed, a machanism to just decouple the spd window, handled by an external tool like my script, from ws window list, just to not lose the "truly" last focused window.
I've written #345 previously for a "A way to get a ws stack independent window for scratchpad".
I've made a implementation for WM independent scratchpad, but there is a problem that appears in at least two situations.
Situation 1:
scratchpad
script to create or place and focus a spd (scratchpad) window in current ws.scratchpad
to hide the spd window.Situation 2:
[maximize_toggle]
action to have current focused window maximized.FLOAT
quirk defined for a spd window, if I firescratchpad
on a ws with max layout the window will be maximized for some reason, but this is for another issue (#399).The problem is: spectrwm doesn't have a machanism to handle a ws independent window, then the spd window will mess with the ws last focused window, then the focused window after spd window gets iconified or goes to another ws will be always the last, and this is the current expected behavior.
What I name here
SCRATCHPAD quirk
is, indeed, a machanism to just decouple the spd window, handled by an external tool like my script, from ws window list, just to not lose the "truly" last focused window.