Wednesday, December 1, 2004

fvwm events for gaim!

I posed this to the fvwm-users mailing list a month back . . . So, I'm thinking . . . I like having my terminals the full height of my display, except, when I get an instant message and I get that little damned pop up window, which I have stickied, so I don't miss any important conversations.

As such, I've had an idea. Whenever a new window is created have fvwm check to see if it is a chat window, and if it is, resize all my terminals so that the chat can fit unobtrusivly below them.

I have a sort of idea on how to do this, but I was wondering if anyone else had experience with something of this nature, or how to do conditionals with fvwm.

Then, while waiting at the airport to board the plane (and a few hours the night before) I figured out how to do this:

I've figured this out. . . It's mostly working, there are still a few bugs to work out, and it doesn't do 100% exactly what I want it to do, but . . .

Basically, when an add_window event occurs, a test is done to see if it's a gaim window, if it is, then do some resizes of my aterms, and move that window all the way right, then pack to the left (courtesy of taviso's PackWrapperLeft)

############### TESTING ############
DestroyFunc FuncUnShrinkForGaim
AddToFunc FuncUnShrinkForGaim
+ I ThisWindow (gaim)
+ I TestRc (NoMatch) Break
+ I Next (gaim)
+ I TestRc (Match) Break
+ I All (State 17) Maximize true 0 100%
+ I All (State 17) State 17 False

DestroyFunc FuncShinkForGaim
AddToFunc FuncShrinkForGaim
+ I ThisWindow (gaim)
+ I TestRc (NoMatch) Break
+ I ThisWindow State 18
+ I All (Maximized, aterm) State 17
+ I All (Maximized, mozilla-firefox) State 17
+ I All (State 17) Maximize true 0 -120p
+ I Next (State 18) Move -0 --6
+ I Next (State 18) PackWrapperLeft
+ I Next (State 18) State 18 false

################################## Event ######################################
DestroyModuleConfig FvwmEvent: *
*FvwmEvent: Cmd
*FvwmEvent: add_window FuncShrinkForGaim
*FvwmEvent: Cmd
*FvwmEvent: destroy_window FuncUnShrinkForGaim

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

-->

Links

Me

Not Me

Archives

The views and opinions expressed in the blog are of Joe LaPenna. Google has nothing to do with these pages.
For information about Google please visit: Google Press Center