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?)
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.