Several questions about window placement and shading.

I am working on a feature for my config that will allow me to press a key (in my case its F1) that will unshade a terminal that is running irssi. I want this terminal to be centered at the bottom of my screen. When I press F1 I want it to unshade “up”.

The problems I have run into so far:

-I don’t know how to get this terminal window centered.
-I don’t know how to get JUST this one window to have the controls on the “bottom” of the window–this will allow it to unshade “up” (or at least thats how i understand it.

So far I have the terminal working where it runs at start and unshades “down” from the top left.

Here is the code I have for it:

+ I Test (Init) StartTerminal

[code]DestroyFunc StartTerminal
AddToFunc StartTerminal

  • I Exec exec $[TermName] -name irc -tr -tint white -sh 60 +sb -fg grey -e irssi
  • I Wait irc
  • I All (irc) Resize 50 45
  • I All (irc) Move 0p 0p
  • I All (irc) WindowShade[/code]

[code]
Style irc NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip
Style irc StaysOnTop, NoHandles, BorderWidth 1, WindowShadeSteps 75

DestroyFunc irc
AddToFunc irc

  • I All (irc) WindowShade
  • I Next (HasPointer) Focus
  • I All (irc) Focus
  • I All (irc Shaded) Next (HasPointer) Focus[/code]

How can I center this on the bottom of my screen?

&

How can unshade “up” BUT I only want this one particular window to have that feature. I want the other windows to unshade down (or have the controls on the top).

I have I wasnt confusing. Any help would be greatly appreciated.

Instead of using “Move 0p 0p”, use different coordinates.

Instead of “+ I All (irc) WindowShade”, try “+ I All (irc) WindowShade North”. I haven’t tested it, but that’s how I interpreted the man pages.

WindowShade North doesnt seem to work

It should be WindowShade South if you want it to shade down (and later unshade up)

I have tried WindowShade North, WindowShade South, but neither seem to work.

What could be going wrong? There are no errors showing in my error log file.

Well I got it working using WindowShade South. It was a matter of messing with the window positions to get it to work right. Apparently, you have to position the window to where the top left corner of the window would be if fully unshaded.

If any part of the shaded or unshaded window is off of the screen it will not work correctly.

I dunno if thats a bug or if thats how its designed, but I think the window placement should be based on the titlebar. No matter where the title bar is placed.