Outdated documentation

This page is out of date. Please use the main navigation to find the latest documentation.

Awesome 2.0

Awesome is a tiling window manager written in Lua and C programming language. It is extremely minimalistic and extensible and helps you to concentrate on the work at hand rather than worrying too much about the user-interface and the like.

Installing Awesome

The stable version of gNewSense (2.3) has an antique version of Awesome (2.0, Fruit Fly) in the repository. It can be installed by using the simple apt-get command from the command-line.

$ sudo apt-get update
$ sudo apt-get install awesome

That should install Awesome in your computer. To start using Awesome, choose Awesome from the Session drop-down menu at the gdm login.

If you don't use gdm (the default display manager in gNewSense) and start the desktop session using the startx command, then in order fire up Awesome, it is required that the ~/.xinitrc file be edited to make startx start Awesome.

Open/create the ~/.xinitrc file using emacs.

$ emacs ~/.xinitrc

Paste the text below in your .xinitrc file to make the startx command trigger Awesome when you hit it from the command-line

# ... comments
# Start Awesome
exec awesome

Save the .xinitrc file with a C-x C-s (hold the Control key and hit x and s, sequentially). Now you're done making your system ready to fire Awesome.

Getting Acquainted with Awesome

Awesome is a tiling window manager -- every window that is opened is tiled, meaning, it is positioned in way that no two windows overlap, thereby, there is no hassle of fumbling to position two or more windows so that all of them are visible at the same time, it gets automatically done with tiling.

Quick Start : Hit <Mod4> + <Return> to start xterm and you can start running applications from it. To close an application window, use the <Mod4> + <Shift> + c key-binding. Here <Mod4> is the <Super> key.

Layouts

There are different ways to position and manage windows in Awesome. Each way is a layout. Before jumping into the details of the layout, it is important to know certain terms.

Stack Area : This is one section of the window wherein in-active windows gets stacked up when new windows are opened. The stack area is denoted by the = symbol.

Active Area : This is the other section of the screen where the newly opened windows go. The active area is denoted by the [] symbol.

There are four different layouts in Awesome -- right-tile, left-tile, maximize and floating.

Right-Tile : In this layout, the screen is divided into two vertical parts, when there are two or more windows opened. Here, the stacking area is on right hand side, therefore, all the in-active windows get stacked on the right. It is, by default, denoted by the []= symbol.

Left-Tile : As is obvious, it is the same as the previous layout, except, the stacking area is on the left and the active area is on the right. It is denoted by the=[] symbol.

Floating : When in the floating layout, windows in the screen can be freely moved around by hitting <Mod4> + <PrimaryMouseButton> on the respective window.

Maximize : In this layout, a single window occupies the full screen even if multiple windows are open. It also possible to toggle to maximized state while in the right-tile or left-tile layout by hitting the <Mod4> + <m> toggle.

To move or switch from one layout to the other, the <Mod4> + <Space> key-binding is used. To move back to the previous layout the <Mod4> + <Shift> + <Space> key-binding is used.

Which layout to use is totally dependent upon the type of application that is going to materialize on the screen. right-tile & left-tile layouts are best suited for Terminals, floating layout is best suited for windows that are best when they are capable of being moved around -- dialog boxes, pop-ups, applications like GIMP, etc, are best used in the floating layout. The maximized layouts can be used for programs that require more screen space to work comfortably -- browser, photo-viewing app, email-client, etcetera.

Tags

Superficially tags are just like workspaces where you can open a set of windows. In Awesome, by default there are nine tags. The <Mod4> + <tagNumber> key-binding is used to switch to the respective tag, for instance, <Mod4> + <5> will make Awesome switch to tag five.

Many a time, there will be a need to move application windows from one tag to another, to do this use the <Mod4> + <Shift> + <tagNumber> key-binding, this key-binding will move the currently active window in the current tag to the specified tag. Awesome allows you to place an application window in more than one tag. To toggle the presence of an application window in the respective tag, use the <Mod4> + <Ctrl> + <Shift> + <tagNumber>. For instance, if an application foo is in tag two, to make it also available in tag nine, a <Mod4> + <Ctrl> + <Shift> + <9> key-binding is used, as a result, application foo is available both in tag two and nine.

Tweaking it Up

Key bindings

The normal way of starting any application inside Awesome will be through the xterm (which you can open by hitting <Mod4> + <Enter>), but this can get tedious at times, as you got to fire a fresh xterm for every application you open in the Awesome session. For instance, if there are ten applications that has to opened in a Awesome session, then it is mandatory to have ten corresponding xterms!. To overcome this little inconvenience, we can define key-bindings for every application that is used, so hitting the respective key-binding will kick off the respective application.

The user-defined key-bindings are put in a file called .awesomerc which must reside in the user's home directory (~/). All the key-bindings should be put under the keys section and each individual key-binding must be defined under the key section.

The key-binding section in the .awesomerc file will look like this :

 keys {

    key {
     ...        
    }

    key {
     ...
    }

    key {
     ...
    }
    ...
 }

There are four parameters that has to be defined inside the key section -- modkey, key, command & arg. The modkey parameter contains the modifier keys used in the key-binding, the key parameter specifies the key that follows the modifier keys, the command & args specify the program/application to invoke when the key-binding is hit by the user.

For instance, if the following applications :

would desired to be invoked from by the use of key-bindings. Then the keys section in the .awesomerc file will look like this :

 keys {

    key {
    
        modkey = {"Mod4"}
        key = "t"
        command = "spawn"
        arg = "exec gnome-terminal"
    }

    key {
    
        modkey = {"Mod4", "Shift"}
        key = "b"
        command = "spawn"
        arg = "exec epiphany"
    }
        key {
    
        modkey = {"Mod4", "Shift"}
        key = "e"
        command = "spawn"
        arg = "exec emacs"
    }

    key {
    
        modkey = {"Mod4", "Shift"}
        key = "g"
        command = "spawn"
        arg = "exec gimp"
    }


}

The modkey and key parameter can be modified according to your convenience. But note that the key parameter can have only one argument. As mentioned earlier, the .awesomerc file must be put in the home directory.

Setting up Dvorak

Details about setting up the Dvorak layout in Awesome are described in the dedicated Dvorak wiki page.

Further Reading

The Awesome man page has more details about the default key/mouse bindings in Awesome. The man page can be read by hitting

 $ man awesome

from the terminal or by hitting

 M-x woman
 Manual entry : awesome

from GNU Emacs.

Reference(s)


CategoryOutdated

Documentation/Awesome (last edited 2013-08-30 14:17:45 by FelipeLopez)