Tinkering my Arch Linux i3 installation to perfection

Throughout my Linux distro hopping journey, I have steered clear of Arch Linux primarily fueled by my fear that it is something very difficult to learn and is best reserved for advanced users. But then I thought to myself, I have been a Linux user for so long that I can no longer tag myself as a novice or even as an intermediate user. I know that my curiosity will lead me to something new that I would want to try and I know where to find help if I run into issues. Worst case I can always fall back and continue with distros that I am already familiar with.

When I installed Manjaro Mate on my Raspberry pi, I was already making myself familiar with Arch and its nuances. When I dabbled with Manjaro i3 on my laptop, I made myself more comfortable with using i3 as a window manager as against a full-blown DE such as Gnome or Mate. That lead me to consider Arch installation as a minimal system and work my way up to install and configure an i3 desktop on it. If what I end up with, can become my daily driver, I may leave PopOS!’s Cosmic desktop behind for a while.

The official site for Arch Linux was my place to go and get familiar with the steps I needed for the setup. As a disclaimer, all that I try here was done on a VM. So when it comes to installing Arch on my laptop, I know I might still have some issues which I can only deal with when the time comes.

This guide is the place to start. I downloaded the latest 64-bit Arch iso and booted into my virtual machine. The arch iso, barely 800Mb, boots into a barebones terminal with no ui. This is unlike any other distros I have used. But again the idea is a have a minimally functional system and then build your own system with only the components and applications which you want. This makes the setup very lean and purpose-built. I decided to build myself a developer machine with setup and tools to develop, build and run applications in java, python, kotlin, etc. That is where this blog will ultimately lead to.

The barebones setup involves a lot of steps which require connecting to the internet, creating partitions, installing Linux core packages, etc. Arch includes a super useful installation script called “archinstall” which takes away the complexity of manual steps and really simplifies the installation. I opted to use this. Here is a useful guide for using the “archinstall” automated script. I followed all the prompts on the script, choosing to select i3 as the desktop and other sensible defaults for locale, timezone etc. At one point it asks for list of packages to install during the setup. This was a good time to pull in some essential packages before I could start with the config changes that wanted to do for i3. I chose to install the following

firefox pcmanfm file-roller zip unzip

This is really the bare minimum I need to kick off my i3 customization.

I continued with the installation. The script takes care of creating partitions and installing the core system. The download is roughly 550 MB and the installed size is a little over 1.2 GB. Installation took some time though but once done I just rebooted the system.

Upon fresh login, you can really see i3 in its raw configuration. Nothing really looks pretty and that’s where I have written scripts to automate most of it. Actually, I have spent enough time tweaking on a previously installed i3 system. So I could cut things short by copying those config files over and replacing everything in the fresh install. I have done and redone these steps several times to finally have config files that I am happy with. All those scripts are uploaded onto my dropbox account for use.

I launched Firefox, logged into my dropbox account, and downloaded the install scripts that I need. The way I have organized the scripts for the initial setup, dev setup, and some multimedia setup.

Initial setup – This script really takes care of creating appropriate directories under the home folder, copying some wallpaper files and fonts for eye candy. Then it installs the following packages

feh - for setting up wallpaper for arch

alacritty - this is terminal program which I prefer over the default

lxappearcance - for setting up gtk and icon themes

rofi - lightweight text based application launcher. I chose this over synapse after some deliberation.

arc-gtk-theme - for a beautiful dark theme

papirus-icon-theme - for awesome icons

The script also downloads and installs Visual Studio Code which is excellent for coding as well as basic text editing. By the time the script is done. It copies over my custom configs for alacritty, i3 and i3status and sets up rofi for use.

Here are some snapshots of how the system looks after a quick script run.

i3 config changes include tweaks for the main i3 file with some keybindings as below

$mod+d - To launch rofi instead of dmenu

$mod+q - To close window. Removed the Shift key binding for ease of use

$mod+Enter - To launch alacritty instead of default terminal

Print - To take screenshots using scrot

Some more key bindings for logout, shutdown of the system, volume control etc.

Alacritty and Picom config changes to make the windows look more sleek and set some transperancy for windows that are out of focus. This gives a very modern look to an otherwise drab desktop.

So much for eye candy and now I can move on to setting up my dev tools of my choice. This is in the dev setup script

Dev setup – I am looking to install git, python3, java, gradle, maven, kotlin etc. git and python3 can be installed using pacman. But for others I am relying on the use of sdkman which will help me manage the installation of different versions of various tools I need to install. After this, all I need is an IDE such as the IntelliJ Idea Community edition and I would be good to go.

Checking all the things that were installed
Ram usage barely 300MB on initial login

This is where I am stopping at my attempt at creating an Arch-based developer machine with i3 as the windows manager and some other essential packages. This is still a very lean setup. On boot, the RAM usage is barely 300MB which is impressive. In this age of resource-hungry distros which are bloated with several processes running in the background, most of which an average user may not even need, this lean setup is an awesome feat. Of course, the list of software one needs is a personal choice and so from here on I can choose to curate only the software that I really need. I can think of a UI client for git or even a file diff program like Meld. Other choices could be installing programs for multimedia creation and consumption – vlc, mpv , audacious, audacoty, gimp etc or even productivity suite LibreOffice and a pdf reader.

Once the base system is ready you could always add more stuff by being mindful of programs you really need and maybe regularly purging out packages you don’t need.

That’s it, folks. That is how I have been trying to create a perfect Arch Linux i3 installation with software and packages tailored to my needs for a developer’s machine.

Leave a comment