Two years ago I switched from macOS to Linux on my main machine. I went for a standard Ubuntu 16.04 setup without any bells or whistles. A few months in and Ubuntu announced it would swap Unity for GNOME, my second desktop environment to discover. I couldn’t have told you the difference between both a few years ago, now they feel like old friends.
I have always known tiling window managers existed but only Linux neckbeards use them. Since I am no longer only a Vim user but also a Linux one, I probably qualify as one now. Vim took some time to get used to but I never looked back, so why not try a tiling window manager for a while?
A tiling window manager shows windows on a screen. It differs from your usual Windows or macOS desktop since windows in a tiling window manager don’t overlap. You don’t "hide" one window behind another. Linux being Linux has a few options: Awesome, bspwm, dwm, i3, sway, and xmonad to name a few.
I went with i3 since it seems to be one of the simpler ones. There is also i3-gaps which, to my understanding, is more or less the same with an added margin around the windows. Let’s stick with i3 for now as it’s easier to install. A simple “
sudo apt install i3” on Ubuntu 18.04 should do the trick.
Log out and when you log back in you’ll see a little gear icon under the password field, click and choose i3 form the list.
You are greeted with a minimalistic screen: a status bar at the bottom and a question if it needs to create a config file, press enter. Next i3 asks for your modifier key, I went for alt, we’ll call that $mod from now on.
The standard UI is extremely small on my Dell XPS 13 hDPI screen. Press $mod+enter to open your first terminal an edit the
~/.Xresources file (create it if it doesn’t exist yet).
Log out with $mod+shift+e and back in, this should be better: crispy hDPI text.
I didn’t have an ethernet cable close and the wireless connection didn’t seem to work. I configured the wireless connection earlier and was surprised it didn’t autoconnect. Welcome to i3, no hand-holding here, it only does what you tell it to do.
You need to run the network manager applet. Add this snippet to your
~/.config/i3/config and reload i3 with $mod+shift+r.
You’ll see a new icon in the bottom right corner of the screen connecting with your previously configured WiFi network.
The volume and screen brightness keys didn’t work out-of-the-box. The keyboard brightness one does so I guess those are hardware keys.
As before, you’ll need a few tweaks to your
and reload i3 with $mod+shift+r. This fixed the volume up. down, and mute keys but not the screen brightness.
Looking more closely I realised it uses the
xbacklight program which wasn’t yet installed. A simple “
sudo apt install xbacklight” will fix that.
A quick test by running
xbacklight from the command line showed a new issue: “No outputs have backlight property”. This is potentially a missing
/sys/class/backlight directory but I already had one. What I did not have, however, was the config file. create a
/etc/X11/xorg.conf file and tell it what device to use.
Tried once more and, sure enough, volume keys and screen brightness are now working.
I work in a co-working office so locking my screen is an absolute must. i3 does not offer an out-of-the-box lock screen but you can install their i3lock package. I went for GNOME’s screensaver. “sudo apt install gnome-screensaver” and add the following to your i3 config:
One hour in and I have a super simple working i3 setup! I switched to Linux two years ago since macOS was no longer exciting. Today I had exactly the same experience with i3: a ton of new stuff to learn, a little closer to understanding how computers work, and that fantastic feeling when you discover a whole new word!
This post is open source. Did you spot a mistake? Ideas for improvements? Contribute to this post via Github. Thank you!