Awesome Windows Manager: Your First Tiling Windows Manager?

Awesome Window Manager is an excellent entry point
Video format:
Why a tiling Windows Manager?
Some may wonder, why do people even end up using a tiling window manager. Here are a few reasons why someone may want to run a tiling window manager or try one out:
Speed
Those that become good touch typers will often realize that often times having to switch to the mouse just to click over to a different page or window just slows them down.
This is one of the reasons programs like Vim, Neowim, and Emacs are still used some, particularly in the development space. While it may take time to learn and setup, someone that knows the tool well can speed through changes in code.
Tiling window managers work to make as much accessible from the keyboard as possible.
Configuration
Another very powerful aspect of tiling window managers is that they are generally configured in a programming language so those that know the language or programming well can setup the workflow, keybinds, etc. exactly the way they want.
Awesome Window Manager is configured with Lua which is a simple but very flexible language.
Resource use
While many desktop environments have gotten lighter, window managers are generally the lightest options avaiable.
Getting started with Awesome WM
First, we have to install Awesome. You could do this in your native desktop environment or setup a VM and install it that way. I created a virtual machine with Pop OS to try Awesome WM out first.
So to install Awesome we need to run the command below, naturally if you haven't in a while it's worth updating your system first. To install
sudo apt install awesome awesome-extra awesome-doc
If you don't want awesome-extra
and awesome-doc
you don't have to install those.
Copy the Config and theme file
You can go ahead and copy over the config file and theme before you switch to Awesome. To do so run the following:
mdir ~/.config/awesome
sudo cp /etc/xdg/awesome/rc.lua ~/.config/awesome/rc.lua
sudo cp /usr/share/awesome/themes/default/theme.lua ~/.config/awesome/theme.lua
Switching to Awesome
Logout of your current session. Depending on your display manager (login screen) will change where you get to select which session to login to.
For Gnome Display Manager, click on the username to login to first then there should be a small cog in the bottom right that will let you get to Awesome.
For SDDM, there will be a dropdown list in the bottom right hand corder.
First changes
The first thing to change is to update rc.lua
to use the copy of the default theme in our home directory. I did the following to do this.
cd ~/.config/awesome
vim rc.lua
From there, scroll down until you see the code below, you can then change it to what is listed:
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
--Change that line to:
beautiful.init("~/.config/awesome/theme.lua")
This way, the rc.lua
file will not use the theme.lua we copied to our awesome folder in .config
.
Second recommended change
Next, I would update the layouts in the awful.layout.layouts table. The text is below. The order these are listed will be the order they come up when cycling through them. To comment one out, simply add two - before the line. Alternately, if any are commented out that you would like to use simply remove the two dashes before the entry. You can also adjust the order of the entries to affect the order they show up when cycling through the layouts.
awful.layout.layouts = {
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier,
awful.layout.suit.corner.nw,
-- awful.layout.suit.corner.ne, < this has been commeted out
-- awful.layout.suit.corner.sw,
-- awful.layout.suit.corner.se,
}
Third change
I'd also recommend configuring your tags (the term awesome uses to name workspaces). This can be done fairly easily. But with a little more tweaking you can also assign layouts to each workspace.
Here's the default code:
-- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
Here's one possible way to change this:
-- create names for tags
local names = {"name1", "name2", ... "name8", "name9"}
-- create layout shortcut
local l = awful.layout.suit
-- set layout list, names of layouts can be found in awful.layout.layouts above
local layouts = { l.tile, l.floating ... l.floating}
-- Put it all together
awful.tag(names, s, layouts)
Without assigning a layout to each, they will all default to whatever the first layout in the list is. Though if you have a good choice for the first layout, that may work.
Final recommended change
A bit further down the file, we will come to the list of hotkeys. These are the key to making any tiling window manager work for you. Look for the section that begins like below:
globalkeys = gears.table.join(
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description="show help", group="awesome"}),
awful.key({ modkey, }, "Left", awful.tag.viewprev,
{description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}),
.
.
.
Update these keys to what you want to use (watch out for conflicts) and if you know of any commands or apps you need to add, add those. I personally only changed closing windows. The default command is super + shift + c
I changed it to be super + q
as I prefer that.
Other possible changes
You can also change things like the default terminal in rc.lua
. You can do things in theme.lua
to make your theme better looking/more functional.
A few useful links:
Awesome API:
Awesome Recipes, these are some useful guides for getting started with Awesome. One I want to look at more is one that talks about turning the rc.lua
file into something more modular.
Lua website, I have been working through some of the documentation. May have a video overview of Lua in the not too distant future.
