How to use Awesome window manager

Learn how to install and use a small yet efficient window manager that's... well... Awesome!

Published Date
30 - Dec - 2013
| Last Updated
28 - May - 2014
 
How to use Awesome window manager

Awesome is a dynamic tiling window manager. Forked from dwm, it aims to be an extremely small and lightweight window manager. 

The Awesome Window Manager UI 

Here are a few tips and tricks to get you started.

 
Installing Awesome
Quite a few distros out in the wild distribute Awesome through their package managers. If you’re on Debian/Ubuntu/Mint, the installation is as easy as typing sudo apt-get install awesome in your terminal. 
Another thing to note is that an awesome package is not shipped by Fedora officially. The problem is not from awesome’s end, the problem is its dependency on cairo. Since version 3, awesome needs the XCB backend of cairo, which is not enabled in the Fedora cairo package and the Fedora cairo maintainer refuses to build cairo with XCB support as long as the XCB backend is declared experimental on upstream. To get awesome from the unofficial repository just run these commands:
sudo wget -nd -P /etc/yum.repos.d http://repos.fedorapeople.org/repos/thm/awesome/fedora-awesome.repo
sudo yum install awesome
In case you’re feeling adventurous you can always build Awesome from the source.
 
Theming Awesome
Awesome itself has been written in C, but you can use Lua scripts to extend it as per your liking. A recommended step before you start customizing awesome is to configure the configuration file , rc.lua to your home directory. Usually the rc.lua file resides in /etc/xdg/awesome/. Copy it to ~/.config/awesome/, you might want to create the directory before copying it though.
Beautiful is a lua library that allows you to theme awesome using an external file. It provides an abstraction using which you can dynamically change the appearance of awesome without having to touch rc.lua.
To start using Beautiful, just add the following line to the beginning of rc.lua, require(‘beautiful’). To start using Beautiful you must initialize it with a theme file: beautiful.init(“path_to_theme_file”). This line will be there in your configuration but the path inside will be /usr/local/share/awesome/themes/default/theme.lua or /usr/share/awesome/themes/default/theme.lua depending on your distro. Replace this with the path to your theme file, the best place to keep them is a themes directory in .config folder containing your rc.lua file. The awesome wiki has got loads of user generated themes that you can use, which can be found here http://awesome.naquadah.org/wiki/Beautiful_themes
 
Vicious
What is a desktop environment without widgets, eh? Awesome has got a brilliant modular widget library called Vicious. To start using Vicious you’ll need to install it, it’s quite straightforward to do so in Ubuntu, just type in sudo apt-get install awesome-extra and you’re done. Or you can can clone the github repo and move the extracted tarball to ~/.config/awesome/.
The process to use Vicious is similar to Beautiful, just add the line require(“vicious”)to the rc.lua file and you’re good to go. The best thing about Vicious is that it only loads the widgets that you’re going to use, so you don’t have a bunch of them sitting around hogging your memory.
The actual widget creation and displaying part will require a lot of typing, for example if you want to display a CPU usage graph then you’d have to create a widget by adding the following code to your rc.lua file.
-- Initialize widget 
cpuwidget = awful.widget.graph()
-- Graph properties
cpuwidget:set_width(50)
cpuwidget:set_background_color(“#494B4F”)
cpuwidget:set_color(“#FF5656”)
cpuwidget:set_gradient_colors({ “#FF5656”, “#88A175”, “#AECF96” })
-- Register widget
vicious.register(cpuwidget, vicious.widgets.cpu, “$1”)
And then to display it you’ll have to add it to the any wibox (statusbars and titlebars). Just add the widget variable (here cpuwidget) to the wibox array in your rc.lua file. Awesome provides a host of widgets for you to use, for an indepth look at  awesome widget types and objects, how they work, their properties and so on, check out the wiki entry at http://awesome.naquadah.org/wiki/Widgets_in_awesome
 
Awesome on Gnome
To get the best of both worlds with Gnome you can use awesome as your window manager inside Gnome. How to do this will depend on your Gnome version, if your Gnome version is above or equal to 2.12 but below 3.0 you can run the following commands
gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop False
gconftool-2 --type string --set /desktop/gnome/session/required_components/windowmanager awesome
In case your distro didn’t provide /usr/share/applications/awesome.desktop, then you’ll have to manually add one at ~/.local/share/applications/awesome.desktop which reads
[Desktop Entry]
Version=1.0
Type=Application
Name=Awesome
Comment=The awesome launcher!
TryExec=awesome
Exec=awesome
If you’re using Gnome between versions 3.0 and 3.4, then the best way to go about this is firstly go to System Settings > System Info > Graphics > Forced Fallback Mode ON. This disables the Gnome 3 Shell, which is incompatible with exotic window managers.
Now, create a file called .gnomerc in your $HOME with the following contents:
export WINDOW_MANAGER=/usr/local/bin/awesome-wm
Then you can create an executable script at /usr/local/bin/awesome-wm with 
the following 
content:
#!/bin/sh
awesome &
 
Awesome on KDE
Create a new file called awesome.desktop in /usr/share/apps/ksmserver/windowmanagers/ (or your system’s equivalent; the folder will probably contain openbox.desktop or metacity.desktop as well). Edit it and replace the contents with 
[Desktop Entry]
Exec=awesome
TryExec=awesome
Name=awesome
Now, you should be able 
to choose “awesome” as window manager in System Settings > Default Applications > Window Manager. It is advised that you disable Plasma, 
by removing or renaming 
/usr/share/autostart/plasma.desktop