Difference between revisions of "Awesome (window manager)"

From ArchWiki
Jump to navigation Jump to search
(Troubleshooting: Cairo Memory Leak)
Line 179: Line 179:
Note: Awesome does a have a few commands that make use of Mod4 plus a single letter. Changing Mod4 to Mod1/Alt could cause overlaps for some key combinations. The small amount of instances where this happens can be changed in the rc.lua file.
Note: Awesome does a have a few commands that make use of Mod4 plus a single letter. Changing Mod4 to Mod1/Alt could cause overlaps for some key combinations. The small amount of instances where this happens can be changed in the rc.lua file.
==Cairo Memory Leak==
If you experiencing [http://awesome.naquadah.org/bugs/index.php?do=details&task_id=396 memory leaks] then try [http://aur.archlinux.org/packages.php?ID=9566 cairo-git] in AUR. [http://bbs.archlinux.org/viewtopic.php?pid=462021 Forum Thread]
= Additional Resources =
= Additional Resources =

Revision as of 11:57, 12 December 2008

Template:I18n links start Template:I18n entry Template:I18n links end


From the awesome website:

awesome is a highly configurable, next generation framework window manager for X. It is very fast, extensible and licensed under the GNU GPLv2 license.

It is primarly targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on its graphical environment.


Awesome is available in the standard repositories (community):

# pacman -S awesome

Development Snapshots

Git-based development versions are available from AUR, such as awesome-git.

Getting Started

Using awesome

To start awesome from a login manager, see this article. SLiM is a popular lightweight login manager and comes highly recommended.

To run awesome without a login manager, simply add exec awesome to the startup script of your choice (e.g. ~/.xinitrc.)


Awesome includes some good default settings right out of the box, but sooner or later you'll want to change something. The lua based configuration file is at ~/.config/awesome/rc.lua.

Creating the configuration file

Whenever compiled, awesome will attempt to use whatever custom settings are contained in ~/.config/awesome/rc.lua. This file is not created by default, so we must copy the template file first:

$ cp /etc/xdg/awesome/rc.lua ~/.config/awesome/rc.lua

For more information about configuring awesome, check out the configuration page at awesome wiki

More configuration resources

Some good examples of rc.lua would be (note that the awesomerc syntax changes regularly, so you will likely have to modify any configuration file you download):

   * http://git.glacicle.com/other/configs.git/.config/awesome/rc_30.lua
   * http://www.calmar.ws/dotfiles/dotfiledir/dot_awesomerc.lua
   * http://tux-atome.fr/rhaamo_config-files.git?a=tree;f=configs/awesome3/dot_config/awesome - Awesome 3, no wicked required and no beautiful.
   * http://github.com/wolgri/wolgri.config/tree/master/.config/awesome/rc.lua
   * http://oxmoz.no-ip.org/awesome/rc.lua
   * http://www.ugolnik.info/downloads/awesome/rc.lua (screen) - Awesome 3 with small titlebar and statusbar.
   * http://github.com/BaSh/config/tree/master/.config/awesome/rc.lua
   * http://silenceisdefeat.org/~koniu/awesome/rc.lua (screen)
   * http://www.gigamo.be/stuff/rc.lua (screen)
   * http://dmaus.gmxhome.de/awesome/rc.lua (main file)
         o http://dmaus.gmxhome.de/awesome/thinkpad.include (notebook specific configuration) 
   * https://trac.poildetroll.net/trac/akoya/browser/config/awesome/rc.lua
   * http://svn.grumblesmurf.org/mercurial/awesome-config/file/tip
   * User Configuration Files  http://awesome.naquadah.org/wiki/index.php?title=User_Configuration_Files


Beautiful is a lua library that allows you to theme awesome using an external file, it becomes very easy to dynamically change your whole awesome colours and wallpaper without changing your rc.lua.

The default theme is at /usr/share/awesome/themes/default. Copy it to ~/.awesome/themes/default and change theme_path in rc.lua.

More details here

A few sample themes

Setting up your wallpaper

Beautiful can handle your wallpaper, thus you don't need to set it up in your .xinitrc or .xsession files. This allows you to have a specific wallpaper for each theme. If you take a look at the default theme file you'll see a wallpaper_cmd key, the given command is executed when beautiful.init("path_to_theme_file") is run. You can put here you own command or remove/comment the key if you don't want Beautiful to interfere with your wallpaper business.

For instance, if you use fbsetbg to set your wallpaper, you can write:

wallpaper_cmd = fbsetbg -f .config/awesome/themes/awesome-wallpaper.png

Tips & Tricks

Feel free to add any tips or tricks that you would like to pass on to other awesome users.

Expose effect like compiz

Revelation brings up a view of all your open clients; left-clicking a client pops to the first tag that client is visible on and raises/focuses the client. In addition, the Enter key pops to the currently focused client, and Escape aborts.


Hide / show statusbars in awesome 3.0?

Lua code:

mystatusbar.screen = nil

To map Modkey-b to hide/show default statusbar on active screen (as default in awesome 2.3), add to your awesome/rc.lua:

keybinding.new({ modkey }, "b", function () 
     if mystatusbar[mouse.screen].screen == nil then 
        mystatusbar[mouse.screen].screen = mouse.screen
        mystatusbar[mouse.screen].screen = nil

Do not forget replace mystatusbar with the name of your statusbar

Dynamic tagging using Eminent

TODO... [1]

Note: Eminent is a bit old and outdated. We have a new library in the works, Shifty. It hasn't been included with the main source yet, but is very promising. I'd recommend waiting for that and then writing this section for it. Shifty Video (.ogv)

Note2: There is actually yet another implementation of this feature. I'm hoping it merges with Shifty, and I'm poking the developers in that direction.

Space Invaders

TODO [2]

Naughty for popup notification

TODO [3]

Popup Menus

Todo.... [4]

Widgets using wicked

Todo... [5]


Awesome has support for (2D) transparency through xcompmgr. Note that you'll probably want the git version of xcompmgr, which is available in AUR.

Add this to your ~/.xinitrc

    xcompmgr &

See man xcompmgr or xcompmgr for more options.

you can set this window transparency dynamically in the rc.lua add

    c.opacity = 1

to the awful.hooks.focus.register hook (to restore Visibility) add

    c.opacity = 0.4

to the awful.hooks.unfocus.register hook (to make the Window transparent. Adjust value as comfortable)

As of Awesome 3.1, there is now built-in pseudo transparency for wiboxes. To enable, just add 2 more hexadecimals to the colors in your theme file (~/.config/awesome/themes/default usually), like shown here:

    bg_normal = #000000AA

where "AA" is the transparency value.


Mod4 key

Alias the Win key. Somehow, my Mod4 key isn't mapped by default. If that's your case too, you can check the keycode of your Mod4 key with

$ xev

It should be 115 for the left one. Then add this to your ~/.xinitrc

xmodmap -e "keycode 115 = Super_L" -e "add mod4 = Super_L"
exec awesome

Mod4 key vs. IBM ThinkPad users

IBM ThinkPads do not come equipped with a Window key (although Lenovo have changed this tradition on their ThinkPads). As of writing, the Alt key is not used in command combinations by the default rc.lua (refer to the Awesome wiki for a table of commands), which allows it be used as a replacement for the Super/Mod4/Win key. To do this, edit your rc.lua and replace:

modkey = "Mod4"


modkey = "Mod1"

Note: Awesome does a have a few commands that make use of Mod4 plus a single letter. Changing Mod4 to Mod1/Alt could cause overlaps for some key combinations. The small amount of instances where this happens can be changed in the rc.lua file.

Cairo Memory Leak

If you experiencing memory leaks then try cairo-git in AUR. Forum Thread

Additional Resources