One of the most fun things you can do in Linux is customize the way it functions and looks. And if you’re on Arch Linux, this is encouraged. Outrageous configurations are the norm, and if you tell someone that all you have installed on your laptop is tmux and a prayer, no one bats an eyelash. Chances are the next comment is going to be, “Been there, done that.” (I actually have been there and done that. It’s fun, you should try it out.)
The last time I posted about Arch, I posted about getting a stable and infinitely sexy XFCE config running. Since then, I decided to go DE-hopping, and ended up using Cinnamon for around 2 months and KDE for a few weeks. That brought me to a very important question. What exactly constitutes a DE?
The building blocks of a DE
A DE such as KDE has so many threads interweaved into its fabric that untangling them would take me a few days. There are daemons to tell programmes what time zone I’m in, for heaven’s sake. The others are all relatively simpler, but usually, you can break down a DE (after removing its bells and whistles) into the following:
- (Roughly speaking) A DE init system
- A Window Manager (with a compositor, if your DE is any good. I’m looking at you, XFCE.)
- A panel (multiple, if you like) with a system tray, a menu-type launcher, optional quick launch, task manager, clock, etc.
- A file manager
- A terminal emulator
- A dbus notification server
- A quick launch/search program
- Weird services I wasn’t able to understand, but which presumably serve some purpose
- Weird services I do understand which serve no purpose (viz. Akonadi, Nepomuk, the time zone daemon in KDE)
- A control panel for all these items
How much of it do you really need?
Not as much as you usually use, that much I can tell you. Actually, answering this question requires you to ask yourself a very basic and simple question. What do you want your DE to do?
For me, the answer was plain and simple. I want it to be there when I need it, to be perfectly suited to my workflow, to provide no distractions and to display the needed amount of information for me to have both peace of mind and the ability to work. In short, I want my DE to get out of my way.
All this time, I’d been trying to do that with XFCE, Cinnamon and KDE. To be fair to both XFCE and Cinnamon, they weren’t exactly in my face all the time. They were both joys to work with. However, I had a few weird problems in Cinnamon regarding my phone (I couldn’t browse it at all) and I didn’t really like gnome-terminal. I could have replaced it, but that’s what the DE wants you to use.
XFCE was almost perfect. I almost rue leaving it to go DE-shopping. However, in my quest to find a DE with the perfect blend of features and performance, I decided to leave it behind. (I haven’t tried LXDE yet. Maybe that should be my next target?)
Going to a WM
That, ladies and gentlemen, was my solution. Let’s throw away all this DE crap and go over to a WM! Sounds fun, right? Well, let me be the first to tell you that it was. UI customization is what I love, and starting with a fresh Arch install got my blood pumping. Mind you, though, that I did not mindlessly install base. Several useful components were deliberately left out (like cronie), so if there’s anyone who’s trying to follow my footsteps, I would recommend that you either simply install base and base-devel and be done with it, or head over to LFS and get down and dirty once, ’cause that will teach you a lot more than Arch or even Gentoo.
I installed my base system, got netctl working and happily added Bohoomil’s infinality repos to my pacman.conf. Now what? X server, of course. I took care to install the bare minimum. To tell you what I mean by that, my memory usage after my bare minimum install, connecting to the net and getting a pptp client running (I was going through a VPN) was near around 108 MB. Which is nothing to sneeze at. I use zsh, which is slightly heavier than bash, and I use it extensively. So you’re probably going to get better stats than me if you use bash.
I wanted to keep my work environment clean and slim. Why, you might ask. Why try something like that on a system with so much memory to spare? Well, quite simply this. I want as much memory available for the applications I use. So that when Firefox runs on a laptop with 4 gigs RAM, I don’t open Htop to see that my system has started swapping (it never came to that, but on KDE, it was routine to see 3450/3820MB used).
I decided on Openbox. Why? It’s very light, it’s minimalistic, and it gets out of your way. It allows for endless customization, and plays ball by being toolkit agnostic (not that I care, but it’s a nice point nonetheless).
Of course, Openbox by itself doesn’t give you everything you need. Compositing, for one, is simply not there. Many people will tell me they do not need it, but I prefer and use translucent terminals. I also like seeing shadows, windows fading in and out, and a hint of translucency here and there. Maybe Kwin is overkill, but something lighter? I decided to use compton.
I spent a lot of time searching for a good panel. I decided on tint2 in the end. It is quite light, supports all I need from a panel and is insanely customizable. I took the tint2-svn package from the AUR, for it has the ability to add launchers (for which I added custom .desktop files).
For my terminal emulator, I decided on rxvt-unicode-256colors. Not only is it very light, it is flexible and can be configured using your .Xresources file. Perl extensions can extend it to work exactly like the terminal of your choice. Which is good, for you’re definitely going to add just those pieces of cruft you do need.
For a file manager, I decided on pcmanfm. However, I did not install gvfs (for automounting) or the like. The whole point of pcmanfm was to make sure that the file manager is light and gets the job done. To replace the functionality of gvfs, I decided to use udisks (not udisks2) with udiskie.
Strictly speaking, udisks isn’t really needed. In fact, if you believe Ignorant Guru (search him up if you don’t know who he is), anything Red Hat is evil. He is the author of a very flexible (albeit visually cluttered) file manager called spacefm. He has written his own tool called udevil in response to both udisks and udisks2. You can use udevil and devmon instead of udisks and udiskie. However, I remember reading the words of an Arch dev who called Ignorant Guru’s views on udisks out of touch, which made me come back to it.
Udiskie is a small tool which makes it easy to mount/unmount devices from your system tray. Is it needed? Not really. I had it just in case I wanted to work with devices outside the file manager. I’m now thinking of adding a few keyboard shortcuts to Openbox to mount/unmount things and remove udiskie completely. I could always open pcmanfm if I wanted to work with multiple pen drives at once.
For knowing my network status at a glance, I have netmon sitting in my tray. It doesn’t really do much, just shows a nice icon which can tell me the status of my network at a glance. Do I need it? No. But is it good for peace of mind? Yes.
For a volume icon, I use volumeicon. It gets the job done, and doesn’t require pulseaudio. I need no more. If I need better control over my audio, I’ll open alsamixer.
My conky is compiled with lua support enabled. This allows me to easily add translucency using a little script I lifted off someone (who lifted it off londonali).
I use feh to set my wallpaper, and gmrun as a quick program launch.
The fruits of this labour?
Well, apart from feeling incredibly self-satisfied, I guess the real fun is in knowing that after I log onto my own, so called, “desktop environment”, I use around half the memory my XFCE used to use (XFCE – 440 Megabytes at startup, I use around 218-220 Megabytes at startup). I don’t have a file manager running in daemon mode all the time to manage my desktop (ala all desktop environments), everything is extremely snappy, all configuration is done using human-readable config files I understand (I wrote them, after all) and there is no extra package on my system.
The applications I use on a laptop configured thusly are Firefox, MPD, VLC, Skype, Calibre, etc. I don’t use Libreoffice (LaTeX FTW), and I am all the happier for it. I’d love to use mpv on this instead of VLC, but mpv skips frames, for some reason, which annoys me. I have a thing about videos. They must be perfect, else I’m going to crib about them. VLC is good, so I don’t complain. Much.
A deeper question is, is it worth it? In the long run? Well, I can’t say. My laptop’s got no battery left (I’ve abused it thoroughly in the 3.5 years I’ve had it), and it runs wholly on AC power. However, judging by the way my fans whir, I’d say yes. ‘Cause I used to have a jet engine on my lap with KDE, and now I have a sleeping baby.
At times it gets up and wails, but it mostly sleeps soundly.