Using FvwmEvent again, it is possible, although tricky. When you say workspaces, I have no idea whether you mean pages or actual desks. Indeed, I have my Pager in a 3x3 combination. One desk therefore has nine pages on it.
As an example, you can do something like this. Suppose I only want to supply a particular theme to a group of windows on a certain page. That page (for convenience’s sake will be 0 0 0) will have a style such that all windows will have a darkgreen colorset for active windows.
First thing, then, is to tell FvwmEvent that we want it to listen for a change of new page:
DestroyModuleConfig FvwmEvent-newPage: *
*FvwmEvent-newPage: new_page FvwmFuncNewStyle
This will then call the specified function everytime we change pages. So that now, we want in that function to test to see if we are at location 0 0 0, and if we are to style appropriately:
+ I PipeRead '[[ $[desk.n] -eq 0 && $[page.nx] -eq 0 && $[page.ny] -eq 0 ]] && echo "Function ChangeDecorWithMenu" || \
echo "Function RestoreDecor"'
Then in the ChangeDecorWithMenu function, just apply our styles:
+ I All (!Iconic, AcceptsFocus, CurrentPage) WindowStyle Colorset 0
+ I All (!Iconic, AcceptsFocus, CurrentPage) WindowStyle HilightColorset 3
So that here, I have said for all windows on the current page, that arw not icons, and that accept focus, change the window style to use
Colorset 0 and a HilightColorset 3. These might be defined as:
Colorset 0 fg black, bg #60a0c0
Colorset 3 fg black, bg darkgreen
The other function you saw there was ‘RestoreDecor’ – this gets run on any page which is not 0 0 0 – effectively we can then switch back to our original colorset, hence:
+ I All (!Iconic, AcceptsFocus, CurrentPage) WindowStyle HiLightColorSet 1
Or somesuch. It’s entirely up to you. Note that “Colorset” denotes the colorset applied to inactive windows, and “HilightColorset” is applied to those windows that have focus.
In this way, you can then add MenuStyle definitons in the same way. I’ve alluded to the fact to allow you to configure it how you like, although I hope this has given you the start you need.
The last thing you must remember to do, is to tell FVWM to use the FvwmEvent. So, as we did for the other function, in your StartFunction definition add:
Module FvwmEvent FvwmEvent-newPage
… and all should be well.
Does that help?
– Thomas Adam