This is what I would like to do, but I don’t know if it’s possible.
I will write a gaim plugin that will set a variable like $MESSAGE_RECEIVED to true when I get a new message and to false after I answerd the message.
I would like to make a titlebar button that reads this variable every x seconds and changes when the state of the variable is changed.
is this possible? and how? because I don’t really have an idea how to do it, but if I could include this, my config would be just perfect
“Titlebar button”? Surely you mean you’d want the state of the variable to update itself which is subsequently displayed in the title of the window? If that’s so you might be able to use xprop(1) to set the WM_NAME XAtom of the window…
Now every window has a close, maximize and minimize button. I want to add a 4th button. But this button should update itself every x seconds depending on a variable.
(I could set two vectors, one for true and one for false)
The idea I have is this: my gaim is swallowed in fvwmbuttons that I hide with a shortcut, so I don’t see when someone is talking to me. But if I could add this button to the titlebar of every window open then I could see when someone talks to me.
I have thought about other notifications but I don’t want it to take any space on my desktop so the titlebar is the only location where it should be.
(and a little other question… would it be possible to write a program that adds the time-date to every titlebar with something like xprop?)
Well, yes it would do. How can you expect to change its titlebar button if it’s in FvwmButtons? Unless of course you mean all window which aren’t swallowed?
You need to restate a little more clearly just what you want to do…
I cant help with your button problem but heres a LINK that will help you with adding things to the title bar. Have you posted your config yet? Sounds interesting.
If you have two unused buttons on one side you may define them as two separate buttons to use, assign them some Mouse binding (Nop) and then turn them on/off with the Button style.
I don’t think there’s an easy way to figure out if an application is swallowed, you could list the swallowed applications’ names explicitly in the condition of course, or search for something that checks if a window has a titlebar and use that…
I still beieve that using an extra decor for having one button to update is unneccessarily complex.
You say you already have 3 buttons. That mean that you have at least two buttons on the same side available. For the scope of this post I take it that the buttons should be on the right side of the title bar as close to the middle as possible.
is it a big difference if I use ChangeDecor or only change the buttons (as said in a post in this thread), I mean in cpu usage.
[color=red]Edit another little question:[/color]
Is fvwm smart enough to see if the decor it is changing to is the same as the current decor or should I check that myself to save some cpu?
I believe the biggest difference is the memory usage of having two decors defined rather than only one. I’m not sure about the cpu time for chaning decor verses hiding/showing a button.
I belive fvwm won’t know if you try to change to the current decor.
As soon as I have written the gaim plugin and get everything working I will post my config (it won’t be for the first week though to much work for school)