Hello -- 2009/1/22 Dominik Vogt <dominik.v...@gmx.de>: > On Mon, Jan 19, 2009 at 06:47:28AM +0000, Thomas Adam wrote: >> I've been toying around with this patch for a while now, which seems >> to work. Given that we have PositionPlacement which allows for >> placingwindows at a specific location, StartMaximized will start a >> window maximized, allowing for the usual arguments per the Maximize >> command[1]. >> For instance: >> >> Style somewindow PositionPlacement 0 50, \ >> StartMaximized growonlayers $[w.layer] -1 grow grow >> >> Or more simply: >> >> Style somewindow StartMaximized > > Does the new style take the same arguments as the maximize > command, or does it have a different syntax?
No, it has the same syntax as the Maximize command -- but as noted as more of a throwaway comment in my email, it does no error checking, so you can do: Maximize 100, 100, grow sdhjfdjkkjdfhkjhdfkjhkdfj And it will still work. :) But that's by-the-by at this point. >> Comments/suggestions welcome. > > I ponder if we shouldn't have a much more generic mechanism here. > At the moment we have: > > StartsOnDesk/Page/Screen > StartsLowered/Raised > StartsShaded > StartIconic/Normal > > All of these could be replaced by a hypothetic style > "InitWindowCommand" (stupid name, suggestions welcome): Yes. When I came up with StartMaximized, I was *really* tempted to add it in as some form of option to PositionPlacement, but it wasn't logical to do so. If we could amalgamate the above list (with perhaps some others -- squashing in my idea for StartMaximized) then that would be a nice idea, and one I would be happy to work on. > Style Foo MapFooFunc > AddToFunc MapFooFunc > + I MoveToPage 1 1 > + I Iconify true > > This way, it would even be possible to get these stupid Open > Office windows under control that shade themselves on startup. I am not following you here. What's the relationship between MapFooFunc and InitWindowCommand? Are you implying it's a hook for a known function to be called when the window is mapped? (If this is a silly question to ask, it's because I've yet to have coffee. :P) > Of course the parsing would be difficult if the command contains > commas. Hmm, yes it would. But we could ignore that for now and just opt for a proof-of-concept. :) -- Thomas Adam