I Exec exec aterm -geometry 144x20+0+0 -name GameConsole
I Wait GameConsole
I All (GameConsole) Resize 101 keep
I SetEnv OpenedTerm “True”
The problem is that this console isn’t transparent at all! If I remove the parameter “-name GameConsole” the transparency is back! As well When I restart fvwm, the GameConsole become transparent during the restart process.
It’s because by changing the -name of aterm it sets the resource to something other than what you have it listed in ~/.Xdefaults file as (i.e. something other than aterm). Leaving off the ‘-name’ option, as you observed, causes it to work only because aterm defaults to aterm.
I seem to recall Eterm needing Esetroot enabled for transparency? Note that the other resource lines work just fine for --name GameConsole, so you might need to check that. Also whilst I am here, let’s change your functions so that they’re a little more… stream-lined:
#+ I SetEnv OpenedTerm “False”
I None (GameConsole) StartTerminal
I Next (GameConsole) Focus
I Next (GameConsole) Raise
I Next (GameConsole, Shaded) WindowShade False
I TestRc (NoMatch) Next (GameConsole, !Shaded) WindowShade True
The SetEnv here is useless, since you can just use “None” to check for the presense of a window anyway. Note that for the next three ‘Next’ lines above, you could refactor them into a single line which does those three operations as a function call. It’s up to you. Note the use of “Next” as opposed to “All”. This is important, and a fundamental mistake people seem to make. There’s nothing wrong with it, but it will affect ALL window, including the window just opened. Using Next ensures only the opening window is affected. 99% of times, this is generally what people mean to use when they’re doing something like this.
Again in the above, just change “All” to “Next”, and remove the SetEnv line. Your SetWindowShadeTrue function is no longer needed.
I am trying to implement the same thing, and have it working, except for the transparency thing. I have noticed that aterm is reading the Xdefaults file if you specify GameConsole*: (I was changing the font), and when you restart Fvwm with the concole running, it does honor the transparency setting as defined in Xdefaults or the command invocation. As soon as you close/reopen the GameConsole though, you lose the transparency and have to restart Fvwm to get it back. I’m not sure where this can changed, but it seems like it might have something to do with the console starting shaded and not being able to grab the bg. I dunno. Thanks for the tips and help thomas_adam, zonk, and cstorm.
maybe sending the terminal window a self-update message request will help, e.g. by moving the terminal a few pixels forth and back or by fiddling around with Xlib a bit.
i myself start the terminal on another, unused desk to which i cannot manually navigate and then use the MoveToDesk command to make it appear on my current desk/page. if you have different wallpapers on different desks/pages this, however, could pose some problems.