If you're a developer, you've probably heard of i3, Sway, or Hyprland. But what exactly are these tools, and why do so many Linux users swear by them? Have you heard of window managers but have no idea what they are ? Don't worry! In this article we'll explain everything you need to know about it !
What is a window manager
In Windows and MacOS for exemple, window managers are part of the OS: they cannot be changed. In Unix and Linux based OSes, the graphical interface and the OS are separate, which lets the user the possibility to choose each aspect of it. For example, when you install Ubuntu, you get GNOME as the default desktop environment. Note that you can use Ubuntu with another graphical interface (KDE, LXDE...) than GNOME, and it's perfectly fine !
A desktop environment (like KDE, GNOME, Budgie...) is mainly composed of three things:
- A window manager, which we are going to talk about today
- A desktop shell,
- And additional tools to make the whole thing consistent (store, calculator, text editor...)
So what is a window manager ?
Well, window managers have a self-explanatory name, as their primary role is to manage windows. The window manager is the software that decides where a window appears (position X,Y), its size (X,Y), and its decoration (close, maximize, minimize button, title...) for example. It also manages virtual desktops: their number, their position (square, list...), etc...
Why tiling ?
Window managers first appeared as we know them on Windows and MacOS for example: we call this a floating window manager (fwm), because windows float on the screen, we can move them and put them anywhere we want.
But there is another type of window manager, which is called tiling window manager (twm) and acts like a binary tree to organize windows. This means the screen is always split to display all windows simultaneously - no more overlapping!
With a tiling window manager, windows do not float. Instead, they have fixed positions and sizes that adjust whenever a new window appears on the screen. That's why it is very useful to use virtual desktops as it becomes very easy to access all the information on the screen without pressing alt+tab
for half an hour.
Most TWM have shortcuts to make a window floating temporarily. We are talking about the default behavior here.
How does it improve my workflow as a developer ?
Tiling window managers are a game changer for developers. It can increase your productivity and make you more efficient. Here are the three main features that will help you:
Faster than light thanks to keyboard shortcuts
Even if floating window managers do have keyboard shortcuts, they are not as important as they are in tiling window managers. The main goal here is to completely forget about the mouse/touchpad: everything can be done using only the keyboard. This way, you will be faster to move a window, resize it, open it or close it for example.
Make this computer yours with customization
Most tiling windows manager can be run without any supporting desktop environment, meaning that they are very minimal by default. But this also mean you can customize them as you want it to be.
As we talked about keyboard shortcuts earlier, know that very few TWM users keep the default keybindings: you can customize them as well in order to make it even faster !
If you want to see more Unix and Linux setups like this, I recommend you r/unixporn on Reddit, where you will find a lot of screenshots made by the community !
Lighter than desktop environments
As we said earlier, windows managers are part of desktop environments, but most TWMs can run on their own, which makes your system much lighter, as you have no desktop shell, no additional tools, etc... This means you will have to replace them if you need them, but this lets you choose, and that's the beauty of TWMs: everything can be a user choice.
What TWM should I choose ?
The choice is hard, as a lot of TWMs exist, and everyone of them has their pros and cons. This will be your job to test them and find out which one fits your needs best. Here are some things that might differ from one TWM to another:
- Default window placement (horizontal/vertical split, golden number...),
- Configuration language (lua, lisp, shell, homemade language...)
- Display server compatibility (X, wayland...)
Now that you are convinced you want to try a tiling window manager (well, I hope so), let me give you a few of the most popular TWM for Linux (most if not all of them are also unix-compatible):
Conclusion
Tiling window managers can revolutionize your workflow as a developer. They help you stay organized, eliminate clutter, and make your system truly yours. Are you ready to ditch floating windows and give tiling a shot?