conformal / spectrwm

A small dynamic tiling window manager for X11.
ISC License
1.34k stars 97 forks source link

[Feature request] SCRATCHPAD quirk #400

Closed osimplex closed 11 months ago

osimplex commented 4 years ago

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:

  1. Have a ws with some windows in default layout, vertical tile.
  2. Fire the scratchpad script to create or place and focus a spd (scratchpad) window in current ws.
  3. Fire again scratchpad to hide the spd window.
  4. The last window of ws will always receive the focus, even if was not there before the spd cicle.

Situation 2:

  1. Have a ws with some windows in default layout, vertical tile.
  2. Fire the [maximize_toggle] action to have current focused window maximized.
  3. Do the spd cicle, steps 2 and 3 of situation 1.
  4. 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.

LordReg commented 11 months ago

Possible since 3.5.0