DIY desktop with the i3 window manager

01.07.2018 Permalink

Linux offers several desktop environments and window managers, so if you don't want to stick to the default of your distro you're free to explore alternatives. I started using Ubuntu Linux in 2010 on my business notebook. Back then Ubuntu came with its Unity desktop environment, but this was eventually dropped in favor of Gnome 3 in 2017, featuring a virtual desktop feature called workspaces.

I usually have to handle at least a dozen of running applications, among them several terminals, Thunderbird, Slack, Emacs, a twin-panel file manager named Krusader, at least four different browser based apps and so on. Often I need to switch quickly between applications. To manage the corresponding windows I made heavy use of Gnome workspaces, giving me a multiple of desktop real estate.

Over time I observed that:

So there was room for improvement.

Looking for a solution, I came across a specific class of windows managers. A tiling window manager promises to automate arrangement of application windows to some degree. The main idea is that the window manager avoids any overlap and automatically splits the available screen space horizontally or vertically when a new window opens. Among the popular implementations i3 seemed to be the best choice for me, so I gave it a try. The following screenshot shows how i3 arranges multiple terminal windows.

i3 has some characteristics that I appreciate:

Please note, that the last item points to a substantial implication: i3 is not a desktop environment, and I had to add numerous features until the system was convenient to use. In particular the status bar required some research and time until it looked like this:

The following table shows which Linux tools I used together with a bit of Bash scripting. This illustrates that learning i3 is only the tip of the iceberg. I had to pick up with many more tools that make up a usable desktop experience on an X window system.

Feature Tool
Notebook display brightness control xbacklight or xrandr
Notebook display night light redshift or xrandr
Turn external monitors on/off xrandr
Screen lock i3lock, xdpyinfo, compton
Screen saver xset (dpms feature)
Wallpaper feh
Audio and music control pavucontrol, pactl, clementine
Bluetooth control blueman-applet
Networking control nm-applet
Switch keyboard layout, adjust autorepeat setxkbmap, xmodmap, inputplug, xset (r feature)
Application launcher dmenu
USB storage automount udiskie
Screenshot tool flameshot
System information in status bar i3blocks
Provide keyring keys gnome-keyring-daemon

After all, it was a fun project, and it eventually improved my productivity on Linux. The whole configuration including all scripts is hosted on Github.