News | About | Get Frugalware | Packages | Documentation | Discussion Forums | Bug Tracker | Wiki | Community | Development

Awesome

From FrugalWiki

Jump to: navigation, search


Contents

Awesome

Awesome is a window manager for X11. It is part of the window managers called "tiling" that emphasize the use of the keyboard rather than mouse (although it is perfectly possible to use it) and dynamic behavior of the placement of windows.

Installation

Root terminal 48px.png
# pacman-g2 -S awesome


Tiling mode

The principle of management windows (applications and system settings) is different from traditional managers. Indeed, the screen is filled all the time. There are several "layouts" of tiling, which can be switched by pressing "Mod4" and "Space", which selects the best available according to applications and preferences. A non-tiling is also available. Some applications, like Gimp or Mplayer is not necessarily well suited to this behavior.

Mode tiling
Autre layout
layout «free»

Some basic commands to manipulate, browse:

  • Mod+f place the active window to full screen.
  • Mod+Tab toggle between the last actives clients (windows).
  • Mod+j,k to switch focus between windows.
  • Mod+h,l to increase or decrease the width of the active window.
  • Shift+Mod+h,j,k,l to move the active window (h: left, j: low, k: top, l: right)

Tags

In Awesome, there is a very interesting feature. Those familiar with GNU / Linux are familiar with virtual desktops (workspaces) that separate some applications and lighten the screen. Awesome has this function but associates with tags. Originally, these tags are numbered from 1 to 9 but it is possible to assign names to these tags (easier to navigate). It is also possible to specify a layout specific to each tag.


-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {
   names = { "[1:net]", "[2:mail]", "[3:jabber]", "[4:files]", "[5:office]", "[6:medias]", "[7:root]", "[8:ssh]", "[9:redac]" },
   layout = { layouts[2], layouts[2], layouts[4], layouts[2], layouts[1], layouts[1], layouts[2], layouts[2], layouts[2] }
    }
for s = 1, screen.count() do
   -- Each screen has its own tag table.
   tags[s] = awful.tag(tags.names, s, tags.layout)
end
-- }}}

And you can assign rules (rules) to assign an application to a tag:

-- {{{ Rules
awful.rules.rules = {
   -- All clients will match this rule.
   { rule = { },
     properties = { border_width = beautiful.border_width,
                    border_color = beautiful.border_normal,
                    focus = true,
                    keys = clientkeys,
                    buttons = clientbuttons } },
   { rule = { class = "MPlayer" },
     properties = { floating = true } },
   { rule = { class = "pinentry" },
     properties = { floating = true } },
   { rule = { class = "gimp" },
     properties = { floating = true } },
   -- Set Firefox to always map on tags number 1 of screen 1.
   { rule = { class = "Firefox" },
     properties = { tag = tags[1][1] } },
   -- Set Thunderbird to always map on tags number 2 of screen 1.
   { rule = { class = "Claws-mail" },
     properties = { tag = tags[1][2] } },
   -- Set gajim to always map on tags number 3 of screen 1.
   { rule = { class = "Gajim" },
     properties = { tag = tags[1][3] } },
   -- Set pino to always map on tags number 3 of screen 1.
   { rule = { class = "Pino" },
     properties = { tag = tags[1][3] } },
   -- Set hotot to always map on tags number 3 of screen 1.
   { rule = { class = "Hotot" },
     properties = { tag = tags[1][3] } },
   -- Set libreoffice-impress to always map on tags number 5 of screen 1.
   { rule = { class = "libreoffice-impress" },
     properties = { tag = tags[1][5] } },
   -- Set Gthumb to always map on tags number 6 of screen 1.
   { rule = { class = "Gthumb" },
     properties = { tag = tags[1][6] } },
   -- Set Gimp to always map on tags number 6 of screen 1.
   { rule = { class = "gimp" },
     properties = { tag = tags[1][6] } },
   -- Set rednotebook to always map on tags number 5 of screen 1.
   { rule = { class = "Rednotebook" },
     properties = { tag = tags[1][5] } },
}
-- }}}

To know the class of the application, use xprop in a console;)

Customization

Just like Openbox or Wmii, Awesome takes a little time to adjust the system to your hand. Everything is possible a priori, by editing the configuration file:

User terminal 48px.png
$ vim ~/.config/awesome/rc.lua

In this file, you can set the key "Mod " is the key key Awesome (To use the "super", enter "Mod4". For "Alt", put "Mod1"), keyboard shortcuts, theme Color and applications launched at startup.

Listing a few shortcuts to launch applications directly using keyboard shortcuts:

awful.key({ "Control"}, "e", function () awful.util.spawn("firefox") end),
awful.key({ "Control"}, "q", function () awful.util.spawn("claws-mail") end),
awful.key({ "Control"}, "t", function () awful.util.spawn("gajim & hotot & pino") end),
awful.key({ "Control"}, "k", function () awful.util.spawn("rednotebook") end),
awful.key({ "Control"}, "l", function () awful.util.spawn("libreoffice") end),
    

Applications to run on startup:

-- Démarrage
awful.util.spawn("setxkbmap fr bepo &")
os.execute("parcellite &")

Let's go

For use Awesome, simply add the session «awesome» to your BootManager. here is the section of the configuration file of slim

 # /etc/slim.conf
 login_cmd           exec /bin/sh - ~/.xinitrc %session
 
 # Available sessions (first one is the default).
 # The current chosen session name is replaced in the login_cmd
 # above, so your login command can handle different sessions.
 # see the xinitrc.sample file shipped with slim sources
 sessions            wmii,openbox,xfce4,e17,wmaker,awesome

And the file~/.xinitrcwhich can switch between your WM.il may be necessary to add the export Lanque order to have accented characters in the terminal


 export LANG=fr_FR.utf8
 # the following variable defines the session which is started if the user doesn't explicitly select a session
 
 DEFAULT_SESSION=awesome
 
 case $1 in
 
 xfce4)
 	exec startxfce4
 	;;
 wmaker)
 	exec wmaker
 	;;
 e17)
 	exec enlightenment_start
 	;;
 openbox)
 	exec openbox-session
 	;;
 awesome)
 	exec awesome
 	;;
 
 wmii)
 	exec wmii
 	;;
 *)
 	exec $DEFAULT_SESSION
 	;;
 
 esac

Links

Here are some links gleaned from my research, hoping they'll be useful!

Personal tools
Namespaces
Variants
Actions