If you pass -maximize option to FvwmRearrange, this will then allow you to target those windows in that state, and toggle maximisation. If you wanted to mark those windows which were tiled as a result of calling FvwmRearrange, you could also add the State style to them, and also use that in your condition:
Note, you have to add the State 1 style to windows as well to use the suggested command. Without adding that style, the suggested command won’t match any windows. I was mostly just suggesting using Maximized as part of the list you were using (assuming you have a particular reason for that chain of conditionals over just guessing until you get something that works, State 1 style would simplify things a lot.
Maybe we should add a -state n option to FvwmRearrange so that the given number is applied to all affected windows of FvwmRearrange. That way the user wouldn’t have to create a function to call FvwmRearrange and then mark the windows afterwards.
That is doable. Though brings up a few questions, primary how should the state be removed. Should the user then have to add removing the state from the windows (if so writing custom functions might just be best for this). Or should FvwmRearrange be more aggressive and remove the state from all other windows so only the last arranged windows are in the given state?
Yes, I think we just allow for a -state n option, and if the chosen state happens to clobber a state which is already in use, sobeit. I class that as the users’ problem.
Well, FvwmRearrange as a module isn’t persistent, and therefore has no knowledge about the state of windows between runs; if anything, -maximize is a handy means of ensuring the window returns to its previous state, only because that’s now Maximise works. In these other instances we’re referring to though, -maximize as an option to FvwmRearrange isn’t enough, so something like -state n might help.
FvwmRearrange -maximize tiles all windows, but doesn’t return all windows at once. It allows one by one.
To detile all, with my limited dev mind, does it need to know about the state of windows? If not tiled, nothing happens. Same as -maximize when tiled. Nothing happens if entered the command a second time, windows stay tiled.
No – as I said before, -maximize is being used as a cheat – to be able to restore windows to their previous size/position.
I don’t think you’re understand what I mentioned in my previous post; FvwmRearrange doesn’t remember state from one run to the next; it’s not persistent. Therefore, the state of the windows is the only thing we have to go on.
I’m sorry you might not be understanding this, but I also don’t have a lot of time to repeat myself ad infinitum either.
For now, we will add a -state n option to FvwmRearrange to help more advanced scripting capabilities, and be done with it. Even then, this option is a pretty shitty one but it’s the best we’ve got.