Transparency
You will need to use a compositor to enable transparency. See Composite Managers.
There are few compositors for X that aren't also window managers; three are xcompmgr, Cairo Composite Manager and Unagi Compositing Manager. xcompmgr is very simple and rather fast, but it does have bugs regarding awesome's menues. Unagi can be compared to xcompmgr from a resource usage and features point of view but is supposed to be faster and extensible. Cairo-compmgr is more full-featured and configurable and extensible, but also more resource-demanding.
Contents |
Cairo Composite Manager
Cairo Composite Manager uses the cairo vector framework for compositing.
Installation instructions can be found on projects's website. They provide debian packages here. There is also a PPA for Ubuntu users.
To install under Ubuntu:
sudo apt-add-repository ppa:gekkio/cairo-compmgr sudo apt-get update sudo aptitude install cairo-compmgr
Run cairo-compmgr somewhere near the top of your rc.lua or other initialization procedures, or start it manually by typing cairo-compmgr &
-- launch the Cairo Composite Manager
awful.util.spawn_with_shell("cairo-compmgr &")
By default, cairo-compmgr binds Mod4 + drag to a screenshot tool and enables some slow, grating menu animations. To disable these and other annoying "features", right-click on the scarab icon in your notification area and select Preferences. If you are on a slower machine, or one without good graphics drivers, consider disabling some of cairo-compmgr's eyecandy features.
Xcompmgr
Install xcompmgr. On Ubuntu: sudo aptitude install xcompmgr
Open a terminal and run xcompmgr. It will immediately begin providing transparency support, allowing you to use any transparent programs. roxterm has been suggested as a transparency-enabled terminal emulator. You can go to preferences and hide the scollbars, menubars, and then configure transparency.
Near the top of your rc.lua:
awful.util.spawn_with_shell("xcompmgr -cF &")
Add it without the options if you don't want shadows.
Error-messages
If xcompmgr is giving error messages then it's because the utility for setting wallpapers in awesome (awsetbg) has fell back onto using the utility display for setting the wallpapers. There are two currently known ways to fix this:
Find a backend for awsetbg
If awsetbg has a working backend, it will happily start using that one instead. Backends currently confirmed to fix the issue are:
- feh
Simply install one of them with the package-manager of your choice and restart awesome.
awsetbg -iwill tell you which backend it is currently using or recommend some if none could be found.
habak (deprecated)
genjix@l:~$ sudo aptitude search habak i habak - utility for creating multi-layered backgr
I then had to had to change my theme.lua:
-- use habak instead
-- theme.wallpaper_cmd = { "awsetbg /usr/share/awesome/themes/default/background.png" }
theme.wallpaper_cmd = { "habak mywallpaper.png" }
I had to crop/resize my background wallpaper so it wasn't cropped.
Unagi Compositing Manager
Like Awesome, Unagi uses XCB library, is extensible through plugins and is lightweight compared to Cairo Composite Manager but also provides far less features at the moment. It is available officially in Debian (and thus Ubuntu): sudo aptitude install unagi and on Arch through AUR. Installation instructions for other systems can be found in the project's wiki.
Open a terminal and run unagi. This will provide transparency support straightaway as long as you have set up Awesome properties properly as explained below.
Near the top of your rc.lua:
awful.util.spawn_with_shell("unagi &")
Using built-in transparency support
Note: You need a running compositor such as xcompmgr or cairo-compmgr.
To automatically set transparency level for particular window class, you can add the following rule to awful.rules in rc.lua:
{rule = {class = "some-class"},
properties = {opacity = 0.8} }
(You are able to know the window class of particular app with the help of xprop utility.)
With such a rule for XTerm I have terminal windows of 80% opacity.
If you want transparent notifications, overwrite the default presets in your rc.lua. The following lines sets a 80% opacity for each urgency level:
naughty.config.presets.normal.opacity = 0.8 naughty.config.presets.low.opacity = 0.8 naughty.config.presets.critical.opacity = 0.8
The default options will be ignored, if a notification sets a custom opacity:
naughty.notify{
title="NaughtyNotifcation",
text="Check, if everything works.",
opacity=0.5
}
Troubleshooting
RecordMyDesktop
To avoid dark borders do,
Fullscreen mode:
recordmydesktop --no-frame
Or use a window id (see man recordmydesktop & xwininfo)
recordmydesktop --windowid 0xa00003
Gloobus-Preview
You need to add a special rule to your rc.lua for Gloobus-Preview. This rule floats Gloobus-preview and disables border-drawing around the window:
-- Make Gloobus behave as expected
{ rule = { class = "Gloobus-preview-configuration" },
properties = { floating = true } },
{ rule = { class = "Gloobus-preview" },
properties = { floating = true,
border_width = 0 } },