From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Awesome and the translation is 5% complete.
Outdated translations are marked like this.

awesome is een in hoge mate configureerbare, next generation en dynamische window manager voor X. Het richt zich vooral op power users, ontwikkelaars en iedereen die iedere dag met computertaken geconfronteerd wordt en volledige controle over zijn/haar grafische werkomgeving verlangt. Extenties kunnen worden geschreven in de programmeertaal Lua.


Choose exactly one of:

  • elogind: Standalone logind package, extracted from the systemd project for use with OpenRC or other init systems.
  • systemd: Uses the session tracker part of systemd. Users of systemd do not need to take any other initiative here.


  • D-Bus: Enables use of the D-Bus message bus system.
  • polkit: Enables the polkit framework for controlling privileges for system-wide services.
  • udisks: Enables support for some storage related services.

X server

Follow the instructions on Xorg/Guide to set up the X environment.

Starting the X server

One of the following methods can be used to start X:


USE flags

USE flags for x11-wm/awesome A dynamic floating and tiling window manager

dbus Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
gnome Add GNOME support
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)


Installeer x11-wm/awesome:

root #emerge --ask x11-wm/awesome



Om awesome te starten gebruik je een display manager of startx.

om startx met ConsoleKit ondersteuning te gebruiken, dien je ConsoleKit te installeren en vervolgens volgend bestand aan te maken:

FILE ~/.xinitrc
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session awesome


het configuratiebestand van awesome bevindt zich in ~/.config/awesome/rc.lua. Als de locatie of het bestand niet bestaat moet dit aangemaakt worden. De standaard configuratie van awesome bevindt zich in /etc/xdg/awesome/rc.lua. Dit bestand kan naar de home directory gekopieerd worden als basis voor je eigen configuratie.

First create the awesome/ directory:

user $mkdir -p ~/.config/awesome/

Next copy the rc.lua configuration file:

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

If x11-terms/xterm is not installed, either install it or change the default terminal emulator to the terminal emulator available on the system. Below, the default terminal emulator is set to konsole, part of kde-apps/konsole.

FILE ~/.config/awesome/rc.lua
-- This is used later as the default terminal and editor to run.
terminal = "konsole"

After making changes it is useful to check the configuration file for errors:

user $awesome -k
✔ Configuration file syntax OK

Add wallpaper support through the media-gfx/feh package:

root #emerge --ask media-gfx/feh

For instance, to use awsetbg to set the wallpaper, edit ~/.config/awesome/theme/theme.lua:

FILE ~/.config/awesome/theme/theme.luaSetting a specific background using awsetbg
theme.wallpaper_cmd = { "awsetbg -f .config/awesome/themes/awesome-wallpaper.png" }

Or simply set the wallpaper property of the theme:

FILE ~/.config/awesome/theme/theme.luaSetting a specific background using the wallpaper property
theme.wallpaper = ".config/awesome/themes/awesome-wallpaper.png"


In awesome, tags are the name given to virtual desktops under which one or more applications are running. It is possible to assign custom symbols to these tags:

FILE ~/.config/awesome/rc.lua
-- {{{ Tags
tags = {}
for s = 1, screen.count() do
    tags[s] = awful.tag({ "➊", "➋", "➌", "➍" }, s, layouts[1])
-- }}}


Below is an example of a custom awesome menu:

FILE ~/.config/awesome/rc.lua
-- {{{ Menu
myawesomemenu = {
   { "manual", terminal .. " -e man awesome" },
   { "edit config", editor_cmd .. " " .. awesome.conffile },
   { "reload", awesome.restart },
   { "quit", awesome.quit },
   { "reboot", "reboot" },
   { "shutdown", "shutdown" }
appsmenu = {
   { "urxvt", "urxvt" },
   { "sakura", "sakura" },
   { "ncmpcpp", terminal .. " -e ncmpcpp" },
   { "luakit", "luakit" },
   { "uzbl", "uzbl-browser" },
   { "firefox", "firefox" },
   { "chromium", "chromium" },
   { "thunar", "thunar" },
   { "ranger", terminal .. " -e ranger" },
   { "gvim", "gvim" },
   { "leafpad", "leafpad" },
   { "htop", terminal .. " -e htop" },
   { "sysmonitor", "gnome-system-monitor" }
gamesmenu = {
   { "warsow", "warsow" },
   { "nexuiz", "nexuiz" },
   { "xonotic", "xonotic" },
   { "openarena", "openarena" },
   { "alienarena", "alienarena" },
   { "teeworlds", "teeworlds" },
   { "frozen-bubble", "frozen-bubble" },
   { "warzone2100", "warzone2100" },
   { "wesnoth", "wesnoth" },
   { "supertuxkart", "supertuxkart" },
   { "xmoto" , "xmoto" },
   { "flightgear", "flightgear" },
   { "snes9x" , "snes9x" }
mymainmenu ={ items = { { "awesome", myawesomemenu },
                                    { "apps", appsmenu },
				    { "games", gamesmenu },
                                    { "terminal", terminal },
				    { "web browser", browser },
				    { "text editor", geditor }
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
                                     menu = mymainmenu })
-- }}}


Below is an example use of a custom date format. The format syntax used is %Y-%m-%d %H:%M. The second option, 60, is the update interval in seconds.

FILE ~/.config/awesome/rc.luaCreating a text-clock widget
-- {{{ Wibox
-- Create a text-clock widget
mytextclock = wibox.widget.textclock(" %Y-%m-%d %H:%M ", 60)
-- }}}
For more information about the format options run date --help


media-sound/volumeicon can be used to handle volume keys automatically, and to show the volume level through a tray icon.

root #emerge --ask media-sound/volumeicon

Autostart volumeicon from within ~/.xinitrc:

FILE ~/.xinitrcLaunching volumeicon in the background when starting X
volumeicon &
exec [...]

Alternatively, a lightweight method is to add volume keys straight into the awesome configuration:

FILE ~/.config/awesome/rc.luaVolume keys
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q sset Master 5%-") end)
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q sset Master 5%+") end)

MPC multimedia toetsen

Install media-sound/mpc to add multimedia key bindings for MPD:

root #emerge --ask media-sound/mpc

Next update the awesome configuration to assign the multimedia keys to the proper command:

FILE ~/.config/awesome/rc.luaVolume key bindings
awful.key({ }, "XF86AudioNext",function () awful.util.spawn( "mpc next" ) end),
awful.key({ }, "XF86AudioPrev",function () awful.util.spawn( "mpc prev" ) end),
awful.key({ }, "XF86AudioPlay",function () awful.util.spawn( "mpc play" ) end),
awful.key({ }, "XF86AudioStop",function () awful.util.spawn( "mpc pause" ) end),

Removing window gaps

Gaps between windows can be visible, most noticeably between terminal windows. These can be removed by inserting the size_hints_honor = false property in the awful.rules.rules table like this:

FILE ~/.config/awesome/rc.luaSetting size_hints_honor property
awful.rules.rules = {
    { rule = { },
      properties = { size_hints_honor = false, -- Remove gaps
                     border_width = beautiful.border_width,
                     border_color = beautiful.border_normal,

Debugging van de configuratie met Xephyr

Xephyr is a useful tool for debugging new configuration files as it creates an instance of an X server within a client window.

user $Xephyr -ac -nolisten tcp -br -noreset -screen 800x600 :1

This will open an 800x600 window. To run awesome within it open a new terminal and run the following:

user $DISPLAY=:1.0 awesome

This will run awesome within a window.


These are the most useful default shortcuts:

  • Super+Mouse1 = move client with mouse
  • Super+Mouse2 = resize client with mouse
  • Super+Enter = open terminal
  • Super+r = run command
  • Super+Shift+c = kill
  • Super+m = maximize
  • Super+n = minimize
  • Super+Ctrl+n = restore minimized clients
  • Super+f = full screen
  • Super+Tab = switch to previous client
  • Super+Ctrl+Space = float
  • Super+j = highlight left client
  • Super+k = highlight right client
  • Super+Shift+j = move client right
  • Super+Shift+k = move client left
  • Super+l = resize tiled client
  • Super+h = resize tiled client
  • Super+left / right = change tag
  • Super+1-9 = change tag
  • Super+Shift+1-9 = send client to tag

Custom key bindings, like Alt+Tab, can be mapped to make the awesome experience even better. For instance, to use Alt+Tab to switch to the previous window:

FILE ~/.config/awesome/rc.luaAlt-TAB key binding
-- {{{ Key bindings
globalkeys = awful.util.table.join(
    -- alt + tab
    awful.key({ "Mod1", }, "Tab",
        function ()
            if client.focus then
-- }}}

Externe bronnen