Awesome window manager


Table of Contents

1 Reference

man awesome

2 configuration



2.1 Automatically autostart programs when awesome start

For example, to start kupfer and synergy, add the following lines at the end of ~/.config/awesome/rc.lua

awful.util.spawn_with_shell("pgrep --exact kupfer > /dev/null ||  kupfer ");
awful.util.spawn_with_shell("pgrep --exact synergy > /dev/null ||  synergy ");

2.2 Setting keyboard language and options

Swap caps lock and left Ctrl

You can run the following lines in a bash shell, or write a script:

setxkbmap -option ctrl:swapcaps

##set keyboard to us english:
setxkbmap  us

## us  (international Altgr keys, verbose output)
setxkbmap -v 10  us  altgr-intl

2.3 Install awesome in Debian 8 running with lightdm session manager

create the following new file:


[Desktop Entry]
Comment=Highly configurable framework window manager

then you should be able to see a new entry for awesome in the session manager.

If you want lightdm to read a ~/.xinitrc file:

Create a new file /usr/share/xsessions/custom.desktop with:

[Desktop Entry]

You should now have a new session option during login, Xsession will load the user's ~/.xinitrc.

2.4 Dual monitor

After loading awesome for the first time, I needed to use the video driver configuration tool to configure dual monitor support:

AMD RADEON Catalyst center:

$ amdcccle

2.5 other stuff (draft, need re-arrange)


$ locate rc.lua





Programming in Lua

Lua API documentation

awesomerc(5) manpage.


autofocus.lua   dbus.lua   layout         prompt.lua  startup_notification.lua  util.lua
button.lua      hooks.lua  menu.lua       remote.lua  tag.lua                   wibox.lua
client.lua      init.lua   mouse          rules.lua   titlebar.lua              widget
completion.lua  key.lua    placement.lua  screen.lua  tooltip.lua

Window Properties

  get details about class, name, instance of windows.

In the xprop output, the class is the second value of the WM_CLASS property.

To change the instance value of a particular emacs frame,
create it with the -name parameter from command line:

emacs -name testinstancename

In the xprop output, the instance is the first value of the WM_CLASS property.

Some instance, class properties of common applications:

WM_CLASS(STRING) = "vdpau", "mplayer2"


{ rule = { class = "VirtualBox" },
  except = { name = "Oracle VM VirtualBox Manager" },
  properties = { floating = true } },

Other common application you probably want to have in floating mode:

{ rule_any = { class = { "MPlayer", "pinentry", "Gimp", "Guake", "feh" } },
  properties = { floating = true } },


How to lock the screen when I am away?

You can use any screen locking utility; xlock, xscreensaver, slock, kscreenlocker...

Example key binding for your globalkeys:

 awful.key({ modkey }, "F12", function () awful.util.spawn("xlock") end)

How to execute a shell command?

If you want to execute a shell command or need to execute a command that uses redirection, pipes and so on, do not use the awful.util.spawn function but awful.util.spawn_with_shell. Here is an example:

 awful.key({ modkey }, "F10", function () awful.util.spawn_with_shell("cal -m | xmessage -timeout 10 -file -") end)

On zsh, any changes to $PATH you do in ~/.zshrc will not be picked up (because this is only run for interactive shells). Use ~/.zshenv instead to make additions to the path you want to use in awesome.

Where are logs, error messages or something?

When hacking your own configuration, something inevitably would go wrong. awesome prints error messages to its stderr stream. When run with usual $ startx, it'd be printed right in tty. If you use something more complicated (some kind of DM, like kdm or gdm), stderr is usually redirected somewhere else. To see where, run the following command:

$ ls -l /proc/$(pidof awesome)/fd/2

3 default key bindings (that I want to remember)

Mod4 = windows key (in my keyboard is between left Ctrl and Alt )

Mod4 + Control + space
Toggle client floating status.

Author: Sebastian Emilio Narvaez

Created: 2019-10-12 Sat 22:34

Emacs 25.2.2 (Org mode 8.2.10)