New term, strip decorations, maximize term

I am trying to write a function that will allow a function to be called via a keyboard shortcut and then strip the decorations out and then maximize the window. Here is code that I’m using now.

[code]Key Return A M Strip_Max_Term

DestroyFunc Strip_Max_Term
AddToFunc Strip_Max_Term

  • I Exec exec aterm
  • I Wait aterm
  • I ToggleDecor
  • I Maximize

DestroyFunc ToggleDecor
AddToFunc ToggleDecor

  • I State 1 toggle
  • I Current (State 1) WindowStyle !Borders, NoTitle
  • I TestRc (NoMatch) WindowStyle !Borders, Title
    [/code]

Of course it works but it prompts me to select the window to take decor away and then again as to which window to maximize. Is there anyway to grab the window id of the new aterm window and then automagically pass that id to ToggleDecor and then to the Maximize command???

Thanks …

You could give your aterm a name, and then try

  • I ToggleDecor Name-Of-Aterm

or something like:

Style the_term NoTitle, !Borders
Exec exec aterm -name the_term

how to handle maximization i don’t know

I think this page may help you out:
http://www.hpc.uh.edu/fvwm/archive/0410/msg00110.html

Basically, put Current right before the Maximize or DecorToggle command.

DestroyFunc Strip_Max_Term
AddToFunc Strip_Max_Term

  • I Exec exec aterm
  • I Wait aterm
  • I Current Maximize on 100 100
  • I Current ToggleDecor

DestroyFunc ToggleDecor
AddToFunc ToggleDecor

  • I State 1 toggle
  • I Current (State 1) WindowStyle !Borders, NoTitle
  • I TestRc (NoMatch) WindowStyle !Borders, Title