Changing titlebar location by where the window gets spawned

I guess it would involve FvwmEvent, but the actual function …
Does this sound sane?

AddToFunc SomeFunc

  • I PipeRead ‘[ $[w.x] > $(($[vp.width] / 2)) ] || 1’
  • I TestRc (Error) Break
  • I Style $[] TitleAtLeft

So, I would like to change the titlebar location to left side of the window if the window gets spawned to the right half of the viewport(?) (the actual screen you see).

Assuming that you qualify your piperead statement (such that it does something FVWM responds to) then it sort of makes sense. Note though that some improvements would have to be assumed. I’d probably use “ThisWindow” to give conext (you can’t assume the use of Current here.

In the same way, your Style line is nonsensical – use ‘WindowStyle’ and, as this is in a function, add: “+ I UpdateStyles”.

– Thomas Adam