Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I love transparency and minimalism... a lot. So much so I ended up with a desktop like this:

Desktop

The problem is that to add a cool effect I made my terminal windows transparent. Which for the most part looks pretty good, except for the fact that I can't see anything when it's above other windows. Here's an example:

Terminal issue

I would like to know if there is a way to auto change the profile of the terminal whenever it is above another window to say, something more visible. And then autochange it back whenever the terminal has no windows under it (also including conky).

share|improve this question
1  
I thinnk this will be difficult, but I don't know. Without compiz there might be a similar behaviour: read this. –  lumbric Jan 4 '12 at 11:08
    
Thanks for the link. That would be another appropriate way of doing it, however they did not come up with a solution. I think that showing the background through the terminal window is a nice effect, it shouldn't have to be a choice between composting and non composting in order to get it. –  mr axilus Jan 4 '12 at 14:41
add comment

1 Answer 1

It's a great idea, but I think it would be quite difficult. Let's see...

We can turn this problem into a graphics problem where you want to find collision detection between windows and color code the collision area accordingly.

I would start by getting information about the window such as the position and the size: position, size, and activity of windows.

You can apply that information on both the window of the transparent terminal, as well as the background windows. Once you have both positions and sizes, you should easily be able to perform a simple calculation to see if they have any squares colliding.

For example:

Terminal: Position=[X,Y] Size=[A,B]

Window: Position=[x,y] Size=[a,b]

//here's a rough draft of a code

    if(X<x)
    {
        if(Y<y)
    {
        ChangeColor(A-a,B-b)
    }
    else
    {
    }
}

Hope this helps, please post your code when you're done, Thanks =)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.