Change taskbar button color according to program running


I’d like to change the colors of the buttons on my taskbar according to the program that I’m running. For example, have the taskbar button color be blue I’m running matlab or green if vi.

Ideally, I’d like to set this up within the original call to fvwm, so that fvwm would change color automatically when I started up certain enumerated programs, vi, matlab, etc.

But I’d be perfectly happy to put into a bash script the FvwmCommand to change the color when I started up matlab or vi etc., so long as I knew how to change the color back to the default when I quit these programs.

Any help would be most appreciated.

Thanks, Leo

Could this be done using something like:

Next ("vi") Function_That_Changes_Taskbar_Color 


Hmm, thanks for the suggestion, certainly sounds promising. I tried this from the command line

FvwmCommand 'Next ("vi") FvwmTaskBar:Back Blue'

and various permutations of this, but nothing worked: when I then typed "vi ", the color of the button remained the same.

It seems as though the color of the task bar buttons is set at startup. Maybe I need to destroy and restart the module?