AwesomeWM is a highly configurable tiling window manager written in Lua and based on the X server. Its philosophy focuses on providing a lightweight, fast, and fully adaptable environment through configuration files in a programming language. This article will guide you from installation to advanced customization, showing how to make the most of its features to create an efficient and aesthetically pleasing workflow.
What is AwesomeWM?
AwesomeWM belongs to the family of tiling window managers, which means it automatically organizes applications in non-overlapping layouts, making full use of screen space. Unlike traditional desktop environments, it does not include taskbars or predefined menus; everything is built through the rc.lua file. This architecture allows users to define specific behaviors via code, resulting in limitless customization.
Installation on popular distributions
- On Ubuntu or Debian:
sudo apt install awesome - On Fedora:
sudo dnf install awesome - On Arch Linux:
sudo pacman -S awesome - On openSUSE:
sudo zypper install awesome
After installation, log in by selecting Awesome from the display manager (GDM, LightDM, SDDM, etc.). Upon entering, you will see a minimalist desktop with a top bar (wibox) and a keyboard ready to be configured.
Basic structure of the configuration file
The main file is located at ~/.config/awesome/rc.lua. By copying the default template (/etc/xdg/awesome/rc.lua) to your personal directory, you can start modifying it without affecting the system.
Some key sections:
- variables: definition of fonts, colors, borders, and modifiers.
- layouts: tiling arrangements such as layout.suit.tile, layout.suit.floating, layout.suit.max, and more.
- tags: workspaces equivalent to virtual desktops, each with its own default layout.
- menu and launchers: creation of an application menu and keyboard shortcuts.
- wibox: top or bottom bar where widgets such as clock, battery, CPU usage, and system tray are added.
Customizing tags and layouts
Tags allow you to organize your applications by project or task type. For example, you can create a tag for development, another for browsing, and one for multimedia. In rc.lua define the tags table as follows:
tags = {
names = { ' Dev', ' Web', ' Docs', ' Chat', ' Misc' },
layout = { layouts[1], layouts[2], layouts[1], layouts[1], layouts[3] }
}
Each name can include symbols from fonts like Font Awesome to give it a visual touch. Layouts are assigned per tag, but you can change them dynamically with ModKey + Space or via custom Lua functions.
Adding and configuring widgets in the wibox
The wibox is the bar where system information is displayed. Widgets are created using the wibox.widget library. Some common examples:
- Clock: wibox.widget.textclock
- Battery: wibox.widget.battery (requires the awesome-widgets package or a custom script)
- CPU usage: awful.widget.watch combined with mpstat
- Volume: awful.widget.volume
- System tray: wibox.widget.systray
To add them, create a wibox per screen and assign its widgets property with an ordered table from left to right:
mywibox[s] = awful.wibar({ position = 'top', screen = s })
mywibox[s]:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
mylauncher,
mytaglist[s],
mypromptbox[s],
}
mytasklist[s], -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
wibox.widget.systray,
mytextclock,
}
}
With this approach you can reorder, hide, or show widgets according to your needs.
Keyboard shortcuts and client rules
AwesomeWM allows binding any action to key combinations via the keys table. For example