My Festive Desktop Setup

Term has now finished, and I haven’t yet posted a blog post since my first one announcing the new site. So forgive me in advance for any mistakes, or anything that isn’t written perfectly, or not explained well… I need to find my footing with this whole blog thing. Of course corrections are welcome!

It’s December, so it’s time to turn my computer desktop into a catalyst for festive spirits. Just because it’s the holidays, it does not mean I’m going to be using my computer less, or even working less. If anything it means that I’ll be using my computer more, as I will not be doing academic work on paper (eww paper!).

I find that ensuring that you listen to plenty of Christmas music, have decorations up, and have plenty of green red and yellow on your monitors can really help get you in the Christmas Spirit, lift your mood, and keep you there! A couple of years before, I hadn’t done any of this, listened to my usual music while coding, and had my usual bland (in comparison) desktop. This resulted in the feeling that I had effectively missed Christmas. Christmas day came around and I didn’t even feel like it was Christmas, I had none of the “build up” and excitement beforehand, didn’t watch any Christmas films, and come January, I felt like I had missed out. I vowed never again to let Christmas slip by my this way again!

The Setup

Before I start explaining what’s what, here’s a screenshot of the setup when I have an additional monitor plugged into my laptop


Now, the Wallpaper is probably the most attractive feature of this whole setup, it is certainly the centrepiece. You can grab your own copy of it here: I use feh to set my wallpaper in my x session.

Window Manager

I’ve been using Linux for quite a while now (specifically Fedora). A while a go, I noticed Gnome was beginning to freeze sporadically, for minutes at a time sometimes, and I was starting to get tired of the feel for gnome, and the “clunkyness” of it. It was certainly time for a new window manager. A mate of mine introduced me to the window manager dwm, and I have to say it is a work of art. Less than 2000 lines of C code, the idea is you edit a configuration file config.h (which is yet another c script) and compile whenever you want to change anything, as a result, it is blazing fast and works brilliantly with no dependencies other than X itself. The developers also encourage patching (modifying the source code) by it’s users to add/remove features and customise functionality. I am using a patched version (I’ve forgotten what was patched, it may have been the colours for the tabs). I start dwm in run-level 3 after starting X (I haven’t set up my own login manager yet… mey do that if/when I switch to arch linux).

Status Bar Text

DWM allows you to change the text in the top right hand corner of the active screen (this is it’s placement in an unmodified version of dwm) via the command xsetroot which is part of the X library. Specifically using the -name parameter. DWM uses the current name of the root window as the text for this status area, this allows you to write programs using anything you like that call this system command to change the status text.

For example, this shell command will set the status text to my name:

> xsetroot -name Sam\ Lanning

The Result:

You can quickly see how you can easily have a lot of fun with this… I decided to create a python script that would have a loop, and wait 1 second at the end of each iteration. It would be super basic, not have a large footprint, and I got an excuse to write a little python script. This is not the most beautiful of python scripts, and there’s plenty of string manipulation and concatenation, I needed something quick and dirty at the time of writing, and have no real need to change it because well… it works, and i dont need any more functionality for the time being…

# Code Removed (I dislike the way I wrote python back when I posted this :-P)

I plan to add stuff like Dropbox statuses, network connectivity and what I have mounted later on, at which point I will probably make it a little more prettier.

How it all works together

As my computer is set to boot into run level 3 (multi user mode with no graphics), the first thing I get is a shell asking for username and password. After I login, I am immediately in bash, so run startx which launches the x server and session, and then runs ~/.xinitrc.

Here’s my ~/.xinitrc file:

# ~/.xinitrc
# Executed by startx (run your window manager from here)

python ~/Programs/desktop-environment/status/ &

feh  --bg-center '/home/sam/wallpapers/xmas/screen1.jpg' '/home/sam/wallpapers/xmas/screen2.jpg' &



I’ve packaged my patched version of dwm, slock and dmenu along with the config header for dwm, my status script and additional scripts I use for media control. I cant remember exactly what I’ve changed from the original, and producing diffs would take too much time and could be something you do yourself if you are interested in that. I would also encourage you to download the latest versions of dwm, slock and dmenu, and then modify them yourself. It’s the proper way to do it.

Terminal Emulator

Now what I consider probably the most important part of this makeover, the terminal emulator. Now some of you might cringe at this but… I use gnome-terminal. Now hold up, the reason I still use it is, well, because it works, and it works nicely. It has good customisation options and works straight out of the box with fonts and well, it’s there. I haven’t found a need to switch, it works, it’s not slow enough that i can tell a difference, and it plays nicely with dwm. In fact, most of the gnome apps play nicely, I use gnome-calculator when I need a calculator, and I use gnome-control-center when I need to manage stuff like audio cards or networks. Anyway enough of the excuses, I have basically changed the colour scheme, as you can tell in the screenshot, and I think it’s pretty… Some people may not like the colours, but it’s difficult to keep the colours sensibly ranged over christmas-y colours while making the distinguishable enough and readable. I think I have struck a right balance here, and its entirely up to you to agree or disagree otherwise…

Here’s a preview:

You can download the profile here

That’s about as festive as my desktop goes! Hope you liked the post, there’s much more to come!

Leave a Reply