This is absolutely unnecessary since Qubes 3.2. i3 is now in the repos, and you can just install it from there. I'll keep this up in case somebody wants to build from source.

Please be aware of the dangers of installing and running software in dom0 before you run any of the commands in this blog post.

Qubes OS probably does not need any further introduction. You can read about it on the official website. While it comes with KDE by default, it's easy enough to change it to i3.

This article is based on version 4.8 of i3, as that is what the current package version available to dom0 is, I might change it to a newer version later.

I thought about providing a prebuilt rpm for a one-step install, but have decided against that for security reasons. You now have to build installable rpm yourself, and I hope in the process you will check my patches for security flaws or backdoors. I will provide the link to the github repository, and then explain how to build and install it.

Note that all of the work in this article is done in a Fedora based domU. The end result is always a .rpm that is copied to dom0 and then installed through the package manager.

Getting the code

Clone the i3-qubes repository here:

$ git clone https://github.com/SietsevanderMolen/i3-qubes.git

In this case, the most interesting file is probably i3/0001-Show-qubes-domain-in-non-optional-colored-borders.patch It's the patch with changes that are necessary to make i3 work nicely with Qubes OS. The code should not need much explanation, it just gets the vmname and label from Qubes OS and changes some defaults so the user can't override decisions.

If you want to make any changes to the package, this is the time and place to do it.

Building

You'll need to install the build dependencies, which are listed in build-deps.list. You can verify them and then install them with

$ sudo dnf install -y $(cat build-deps.list)

This used to be more complicated, but I finally redid this and use the same buildsystem that's used by Qubes OS for XFCE. It's just a Makefile that helps you get the sources and start off the build:

$ make get-sources

$ make verify-sources

$ make rpms

Installing

You should now have your i3 rpm in ./rpm/x86_64/i3-4.8-3.fc20.x86_64.rpm. Protip: copying this file to `~/i3.rpm` now will save you some typing in the next step.

You could install and bind tools to change backlight and volume levels in i3's config. You could also run kmix and xfce4-power-manager, which are part of a normal Qubes installation, and bind the keys for you.

Qubes does automatic screen locking and so should you. Install xautolock and i3lock in dom0 and then add