Making Linux Look Good

Marc on 2020-10-14

I like customising and tweaking things, a lot; and as someone that spends the majority of their time infront of a monitor, I've been in pursuit of the perfect desktop-setup for many years, constantly refining and adjusting the most minute of details in order to get everything just-so. It almost goes without saying that for someone like me who enjoys endlessly scrolling through configuration files that I use Linux, namely Ubuntu, in order to gain a degree of customisation that just isn't possible elsewhere; however Linux has the streotype in some circles of being confusing and unintuitive to customise so the following will hopefully help you in enhancing your own desktop in as few steps as possible.

At the time of writing my general desktop environment looks like this:

Desktop Image

This consists of:

  1. i3-gaps (Desktop environment)
  2. Compton (Compositor)
  3. Feh (Image viewer)
  4. Feh-blur (Image post-processing)
  5. URxvt (My terminal)

Although I don't want to herald my desktop as a sight to behold, I do make efforts to make the first thing I see when I login as pleasant as possible. Generally speaking, whenever I customise my desktop environment, there are three guiding principles I strive for:

  1. No icons or shortcuts, anywhere.
  2. The wallpaper should be visible as often as possible.
  3. Regardless of the number of applications open, there should be as little visual clutter as possible.

These three simple principles go a long way in shaping how my desktop looks by including transparency, utilising unobtrusive means of launching programs, and generally keeping everything as simple and as (personally) aesthetically pleasing as possible. With the exposition out of the way, let's see how to set up a similar environment for yourself!

Setup

i3-wm

To start off with let's install i3-wm, my preferred desktop environment. I personally use i3-wm-gaps which is a fork of i3-wm that automatically gives your windows more of a floating-effect by placing a border between them and the edge of the screen (the default i3-wm will attempt to fill your entire screen space whenever possible).

The standard i3-wm can be installed immediately on most systems via the package manager. To install i3-wm on a debian-based system with apt, run the following:

sudo apt install i3-wm

If you'd prefer the version with gaps however, you'll likely need to install that by following the documentation of the projects' Github repo.

Setting a Wallpaper

Once you've installed and logged into i3 for the first time things may look a bit...sparse, you may not even have a background to look at.

Desktop Image Image originally by https://cerebrux.net/

To go about setting a wallpaper, install feh with:

sudo apt install feh

Although feh is intended to be used as an image-viewer, it also supports setting wallpapers which can be done with the following command:

feh --bg-fill PATH_TO_IMAGE

Running this command will only fix the wallpaper issue in the immediate term however as after rebooting your computer your wallpaper will be missing. To ensure persistence, we'll need to add feh to i3-wm's startup commands. To do so:

  1. Open ~/.config/i3/config in your preferred text-editor. This file contains all the configuration options for i3.
  2. Towards the bottom of the file paste the following:

exec --no-startup-id feh --bg-fill PATH_TO_IMAGE

Now whenever you login to i3-wm you wallpaper will be automatically applied.

Terminal

I use urxvt as my terminal, mainly due to its numerous configuration options via Xresources of which more can be found here.

To install urxvt run:

sudo apt install urxvt

Colour Scheme

By default urxvt can be somewhat of an eye-sore with its blindingly white background however a custom colour-scheme can be applied via the aforementioned Xresources file. For a list of premade options, consider checking out this repository and copy-pasting your chosen colour-scheme into the Xresources file, however do remember to run xrdb .Xresources afterwards to apply any changes you've made.

Transparency

Although things are certainly starting to come together now, it's the little things that can really take your desktop environment that much further. One of these little touches is with some minor transparency effects which we'll apply to our terminal via the Xresources file once again.

To apply transparency to the terminal, append the following to your Xresources file:

URxvt.transparent: true URxvt.shading: [0 - 200]

Values between 0 to 100 will lighten the background from pure black to completely transparent while values between 101 - 200 will lighten the transparent background from completely transparent to pure white. Once again remember to run xrdb .Xresources to apply your changes.

Blurring Wallpaper

Although a semi-transparent terminal certainly looks nice, it's not very useful if what we're trying to work on is constantly getting obscured by our wallpaper. To remedy this we can add a soft blur to our wallpaper to ensure that any terminal output is easy to read. URxvt actually has its' own background-blur options however these can be rather processor-intensive, instead we'll use feh-blur which statically blurs the image meaning we can minimise redundant CPU usage.

To do this, install feh-blur from the Github repo by following along with the provided installation instructions. As a personal preference, I copied feh-blur to my bin directory so that it can be run from anywhere. To do this yourself, run the following:

sudo cp feh-blur /bin/feh-blur

Once this is done, to automatically blur your wallpaper on start, append the following to your i3-wm startup commands:

exec --no-startup-id /bin/feh-blur

Compton

As I've said previously, it's the little touches that go a long way and to finish off our desktop environment we'll be using Compton, a desktop compositor, to apply some additional transparency and shading affects to our desktop.

To install compton run the following:

sudo apt install compton

The configuration file for compton can be found in your home directory by viewing ~/.config/compton.conf. The key changes we'll be making are:

``` shadow = true; shadow-radius = 5; shadow-offset-x = -1; shadow-offset-y = 5; shadow-opacity = 0.2;

inactive-opacity = 0.65; active-opacity = 1;

inactive-dim = 0.0; active-dim = 0.0;

fading = true; fade-in-step = 0.05; fade-out-step = 0.05; ```

You may need to stop and restart compton via your task-manager however once these changes are applied you'll have soft shadows around your open windows along with a slow fade to semi-transparent when a window isn't focused on.

As always, to automatically start compton on sign-in, append the following to your i3-wm config file:

exec --no-startup-id compton

Conclusion

And there you have it, you might to reboot your computer for the full effect but you should now have a minimal, clean desktop environment that doesn't get in the way of your work. The suggestions made here are barely scratching the surface of what is possible however and it is certainly worth your time to go back and comb through the aforementioned configuration files to look for other small changes you can make for a big effect.