Add transparent windows with transset - gHacks Tech News

Add transparent windows with transset

In my last post I instructed you how Adding dropshadows in Fluxbox with xcompmgr was easy to do.In this installment we are going to take this one step further and and transparencies - only this time we are going to do this in Enlightenment. Why Enlightenment? Besides being my favorite Linux window manager, it also works with transparencies better than Fluxbox. The reason for this is Enlightenment was built with compositors in mind. If you were to try this in Fluxbox you would find that the minute you moved a window, the transparency would disappear.

With that in mind...what exactly are we doing? For the most part this all is nothing more than "proof of concept stuff", all of which was brought to fruition in Compiz. But for those who do not want to use Compiz, or are using a window manager that does not work with Compiz, this little "proof of concept" is the perfect trick for getting a bit more eye candy on your desktop.

What exactly is this?

There are two tools that must be used to gain transparency in a window manager: xcompmgr and transset. Both of these will be found in your Ubuntu (or Debian) repositories. Xcompmgr was explained in the article mentioned above. Transset, however, is a small application that does one thing - sets transparency on a single window. The only draw back is that you have to manually set the transparencies of each window.When a window closes, that has a transparency applied, the next time it opens the transparency will be gone.

Of course, before we get to using transset, we have to install it first. Open up your Add/Remove Software utility. Once this is open do a search for transset. When you find the resulting entry, select it, and apply the changes.

Once transset (and xcompmgr) is installed you are ready to go.

Basic usage

Figure 1
Figure 1

Using transset is simple. Have open the window you want to make transparent and open up a terminal window. Issue the command:

transset

from within the terminal window and you see a crosshair (as shown in Figure 1). Move that cross hair to the window you want to make transparent and click within that window. Instantly the window you clicked in will become transparent.

If you take a look at Figure 2 you will see

Figure 2
Figure 2

the difference when transset is applied. You can now see the background behind the Rhythmbox window.

Now you might be thinking this is nothing more than pseudo-transparency where the window manager is just constantly redrawing the background. That is not the case. With transset you are getting true transparency. The difference is that pseduo-transparency basically redraws the root window (what is covered by the wallpaper) behind the window as it moves. If that window moves over another window the image of the secondary window (the one behind the window being moved) is not seen through the transparency.

Figure 3
Figure 3

As you can see, in Figure 3, the secondary window is shown above the root window. What you are seeing is Rhythmbox, above The Gimp, above the root window. Real transparency.

Make it easy

No one wants to have to open a terminal window and issue a command just to make a window transparent. What you can do, instead, is create a menu entry for this. This way, when you want to make a window transparent, all you have to do is click the menu entry and then click the target window.

Figure 4
Figure 4

To make this menu entry in E17 you have to go to the menu and select Settings Panel from the Settings submenu. Once that is open click on the Apps tab and then select New Application from that. Fille out the necessary information (see Figure 4) and save the entry. Here's the trick though, a simple menu entry won't work in E17. You actually have to add the new menu entry to the iBar in order to make this work.

Figure 5
Figure 5

To add this to the iBar go back tot he Settings Panel and click iBar Applications. You will see a new window with two panes (see Figure 5). Scroll down until you find your transset entry. Select your transset entry and click Add. Once you have clicked Add click OK and the new iBar button will appear in your Shelf.

Now all you have to do is click your iBar button for transset and then click the window you want to become transparent.

Final thoughts

It's not going to make you a more efficient worker. It's not going to resolve all of your IT issues. But it will make your desktop cooler without hogging up resources like Compiz will. And it might also help you understand, even if a tiny fraction, how the desktop is laid out.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. ethnopunk said on April 27, 2010 at 11:50 am
      Reply

      How do I undo a transset grab?

    Leave a Reply