Hackers' Choice: Tiling Window Managers

#Tiling Window Managers
Hey, I am worz/ovtru3. Most of you know me, I have been on the IRC for about two months now. I had promised @pry0cc to do an article on tiling window managers, because few days ago, I was experimenting with almost all the major ones. At last, I settled with i3wm, because it had everything I wanted. i3 has also got a very comprehensive documentation. Also, xmonad and herbstluftwm will be my best options if I were to switch in the coming years.


Note: The bar should be kept independent of the window manager. I could use xmobar in i3 and dzen2 in hebstluftwm. Don’t choose a wm just because the bar you see with it in a screenshot is badass. Also, we’ll not cover the installation part here. The meaning of some specific terms like v-split, dynamic tiling etc are illustrated at the end in the Notes section.


##What is a Tiling Window Manager?

Wikipedia says:

In computing, a tiling window manager is a window manager with an organization of the screen into mutually non-overlapping frames, as opposed to the more popular approach of coordinate-based stacking of overlapping objects (windows) that tries to fully emulate the desktop metaphor.

Actually, most popular window managers are what are called “compositing window managers,” which is what you are using by default in Microsoft Windows, OSX, and Linux(Gnome and KDE). They use the desktop metaphor, where each program is treated like a re-sizable piece of paper. You can move them around freely, change their size, and cause them to overlap one another.

In contrast, a tiling window manager is more like a well-organized drawer than a desk. The entire surface is divided into non-overlapping buckets where windows are displayed. If you’ve used pretty much any IDE, like Eclipse or Visual Studio, or a terminal multiplexer, like screen or tmux, you’re already familiar with this approach.

This is what we’re talking about.


##Why should I use a Tiling WM?

###They’re Efficient

Unlike most popular compositing window managers, tiling window managers really make an attempt at managing your windows for you. Instead of having you constantly reorganize the individual windows on your screen, you specify at a high level how you want windows to be placed and the window manager does it for you. New windows are intelligently placed based on the high-level directives you’ve already given.

Tiling WMs also provide you really efficient keyboard shortcuts. Because there’s an unambiguous arrangement, you can quickly do things like switch focus to the window immediately to the left, right, top, or bottom, as opposed to most compositing window managers where the best keyboard option is Alt-Tabbing through a linear list of all your windows.

Tiling WMs work for you, not against you. You put in the least amount of effort and get your work done in a lot less time.

###They scale

It’s possible to sanely deal with huge numbers of windows and workflows in a tiling wm. You’re able to group and manipulate windows together in more sophisticated ways than you can in traditional window managers that limit operations to all instances of a single application or everything on a virtual desktop.

###They’re insanely customizable

Most tiling window managers are written by developers for developers. They tend to provide rich, well-documented APIs that expose hooks for everything you could want. You could hack them, play around, and even edit the code to your choice. And when you get the color schemes right, it looks fucking awesome.

###They’re badass
Yeah, once you have your wm setup, everyone would ask for your scrots and dots. You’ll be famous, and you’ll feel l33t whenever you startx on your tty.


##Comparing some popular Tiling WMs

Here are the 6 most popular tiling window managers.

###bspwm

bspwm stands for Binary Space Partitioning Window Manager. It supports tiling, stacking, and tabbing layouts, which it handles dynamically. It represents windows as the leaves of a full binary tree. It is written in C and is under active development.

Some details for advanced users:

System tray support: None
On-the-fly reload: Yes
Composting: External
Layouts: v-Split, h-Split
Pixel Usage: Variable Borders
Control: via bspc
Library: XCB

###Awesome

Awesome has a unique take on the concept of a tiling window manager. It is probably the most user-friendly on the list. Much like i3, it claims to have well-documented code to make it very easy to dig right into for modifications. It adheres to FreeDesktop standards (Desktop notifications system, system tray, etc.) and has great keybindings which make navigating with it effortless. It is a dynamic wm and supports floating.

Some details for advanced users:

System tray support: Built-in
On-the-fly reload: Yes
Composting: External
Layouts: max, nh-stack (and invert), nv-stack (and invert), free
Pixel Usage: Variable Borders, optional h-tab titles
Control: dbus(if enabled)
Library: XCB
Configured with Lua.
Built-in Bar
###dwm

DWM is, well, also a dynamic window manager. Tiling isn’t the only way you can manage your windows. It’s also possible to lay the windows out in a floating or monocle style. All modifications to DWM can be done within its source code. Easy keyboard shortcuts allow for a great navigation experience while managing windows.

Some details for advanced users:

System tray support: Optional Patch
On-the-fly reload: Optional
Composting: External
Layouts: v-stack, max
Pixel Usage: 1-pix borders
Library: Xlib
Configured with C(recompile)
Built-in Bar

###Xmonad

Xmonad is a tiling window manager written in Haskell. Like most (if not all) window managers, it comes with no frills or window decorations. It works out-of-the-box and is very user friendly. On top of all that, Xmonad sports a fairly big extension library (which can add on even more functionality). The required libraries and ghc are big in size(about 800 mbs disk space). More customizable than any other window manager, only if you know Haskell.

Some details for advanced users:

System tray support: None
On-the-fly reload: Yes
Composting: Yes
Layouts: nv-stack, nh-stack, max
Pixel Usage: variable borders, no titles
Control: via xmonad-hooks
Library: Xlib
Configured with Haskell
Xmobar can be used

###herbstluftwm

Herbstluftwm is a manual tiling window manager for X11 written in C. The layout is based on splitting frames into subframes. Herbstluft is being rewritten in C++, termed as the ‘winter breeze’. The window manager currently lacks some features but the developers have promised to include requests in the C++ rewrite. Windows can’t be floated, but there is a workaround using a bash script.

Some details for advanced users:

System tray support: None
On-the-fly reload: Yes
Composting: External
Layouts: rows, columns
Pixel Usage: 1-pix borders
Control: via herbstclient
Library: Xlib, Glib

###i3wm

This is my choice. i3 is a dynamic tiling window manager. It has clean and fully documented code that makes it real simple to modify and tinker with. With extremely easy to remember keybindings, using i3 is extremely enjoyable, even without the need for a mouse.

Some details for advanced users:

System tray support: i3-bar
On-the-fly reload: Yes
Composting: External
Layouts: tree, v-split, h-split, stacked, tabbed, max, can be nested infinitely
Pixel Usage: none, 1-pix or 2-pix, optional titlebars, can hide edge borders
Control: via ipc, or i3-msg(uses ipc)
Library: XCB
Built-in bar(i3-bar). Conky output can also be piped to it. Other options include i3blocks and dzen2.


###Notes:

Management style
Dynamic management emphasizes automatic management of window layouts for speed and simplicity. Manual management emphasizes manual adjustment of layout and sizing with potentially more precise control, at the cost of more time spent moving and sizing windows.

Layouts
A number of common layout types appear in several tiling WMs, although the terminology varies somewhat.

max: one window shown fullscreen (with or without a status bar, title and borders). Aka: monocle (dwm).
h-stack: master area in top half, other windows stack up horizontally in the bottom half. The master area may be resizable. May be inverted top-bottom. Aka: bottom stack (dwm).
v-stack: master area in left half, other windows stack up vertically in the right half. The master area may be resizable. May be inverted left-right. Aka: tile (dwm).
nh-stack: h-stack allowing >=1 windows in master area. Aka: nbstack (dwm)
nv-stack: v-stack allowing >=1 windows in master area. Aka: ntile (dwm)
h-split: a keybinding splits the current window horizontally creating space for another.
v-split: a keybinding splits the current window vertically creating space for another.


####References
I used these links for help.
https://wiki.archlinux.org/index.php/Comparison_of_tiling_window_managers
https://www.maketecheasier.com/tiling-window-managers-linux/


That’s it. You can pm me for any help regarding i3wm. Also, @unh0lys0da,@oaktree,@g3ntleman,@Joe_Schmoe, and @pry0cc use i3 as well. If you choose any other wm, you could hit up their official channel to discuss your problems. All these window managers have their official channels on freenode, namely #herbstluftwm, #bspwm, #xmonad, and #i3. dwm though has its own channel on the suckless IRC. If you want some good dotfiles, visit dotshare. These were the famous ones though. There are other window managers as well. Use the first link in the references for a complete table comparing all tiling wms.

13 Likes

I love i3. Never going back.

4 Likes

Lets have a scrot party. This is why tiling wms rock!

My i3 setup.

2 Likes

Hey can you drop your ~/.i3/config or at least your color scheme? I like your color scheme.

1 Like

#COLORS

#class                  border   backgr.  text  indicator
client.focused          #2D2D2D #424242 #cad0c4 #cad0c4
client.focused_inactive #2D2D2D #151515 #2D2D2D
client.unfocused        #222222 #151515 #605e56
client.urgent           #a5a5a5 #a5a5a5 #1E1E1E
client.background       #161616

Remember though that these colors won’t apply to your bar, there is a color class in the bar class of the config which you need to edit. :slight_smile:
The font I use is ohsnap for the bar and the window titles. Terminus is also an option.

If you want to customize your terminal, go to terminal.sexy to get some good colors.

I’ve modded my bar to use this, a darker bar looks more impressive to me.

      colors {
                background #151515
                statusline #777777
                # class            border  backgrd text
                focused_workspace  #2D2D2D #2D2D2D #ffffff
                active_workspace   #2D2D2D #2D2D2D #cad0c4
                urgent_workspace   #2d2d2d #2d2d2d #cad0c4
                inactive_workspace #1E1E1E #1E1E1E #605e56
        }

This was the older color scheme.

#colors
  colors {
  background #101010
  statusline #605c5a
  focused_workspace #101010 #101010 #b72f62
  active_workspace #5f5f5f #101010 #101010
  inactive_workspace #101010 #101010 #5f5f5f
urgent_workspace #2e3436 #9a878f
}

My inspiration is @pry0cc. Thanks for making me choose i3.

1 Like

Yo I’ll post up my config soon enough. My setup is killer. :joy:

3 Likes