Tiling Window Manager

A window manager is a program that runs on your computer, in the background, that handles the GUI windows of all applications. You are using some window manager right now, whether that is on Windows, MacOS, or Ubuntu. We usually take them for granted and don't think about them at all. Your window manager determines how the bar above your windows look (the one with the close, maximize and minimize buttons). It also moves windows around your screen when you drag them with your cursor, like you would expect a computer to behave. Pretty simple stuff.

In Linux, you can choose which window manager you want to use. It turns out there are some pretty surprising window managers out there, that do more than just the basic stuff that you are used to. It's very likely that you have never seen anything like it before. The window managers that we are interested in are “Tiling” window managers. These ones resize windows for you so that they always fill up the entire screen. This way, no space is wasted. It's sort of like how Windows allows you to have one window covering half of your screen, and another covering the other half, but with a tiling window manager, you don't need to resize them manually because it handles that for you. You will see what I mean in a bit.

There are several tiling window managers out there, but the one we will use is called i3. To get started using i3, we need to first install it on the computer.

First update the package list on your comptuer: (See the lesson on Installing Software if you are not familiar with this).

sudo apt update

The previous command ensures you install the most up-to-date version of i3.

Then install i3:

sudo apt install i3

Now you need to log out and log back in. But wait! Don't do it yet, because when you log back in, you will be put in an unfamiliar interface (because the i3 window manager will be running). Before logging out and back in, make sure you have access to this blog post from another device (a phone, maybe). Now that you have this page open on another device, log out (by clicking on the dropdown menu in the top-right corner), and when logging back in, click on the settings icon in the bottom-right and select “i3”. This will allow you to use the i3 window manager.

Now you will be faced with a purple background, a black bar on the bottom with some colored text, and a black window in the center of the screen. The window prompts you to let it create a configuration file. Do so (click enter). Then it will prompt you to choose a default modifier key. You can change the selection with the up/down arrow keys. I recommend you to use the Windows key (“Win” in the prompt) as it usually doesn't clash with other keyboard shortcuts. Hit enter.

Now you are using the i3 window manager. To do stuff, you use keyboard shortcuts. Here are some commonly used ones:

Here, “Mod” stands for whatever modifier key you chose previously.

You can find all the default keybindings on the i3 user guide here. Bookmark that website, it's very useful.

Now, remember the config file you created at the beginning? In there, you can set your own keybindings that do various operations. You can even overwrite the default keybindings.

We will learn how to customize i3 by setting keybindings and a wallpaper next time. Until then, if you are interested, you can read the i3 user guide (linked above), or find some other tutorial online.