So, a combination of a short holiday and a new laptop have conspired to keep me away from my text editor for a short while. The holiday was a walking trip, carrying our own gear, along the coast of Scotland. It was truly fabulous, but already covered at length on my wife's blog so I'll not repeat her here.

As for the new laptop, well.... there's nothing like a new machine to make you re-evaluate your working environment. So I thought I'd share with you some of the tweaks I've been making over the last week or two.

Operating System and Hardware Tweaks

So the laptop I've gone for is a Dell XPS 17" (L702x). It's a beefy piece of gear, with more than enough horsepower to run a Foreman testing environment on libvirt. As you might expect, I have Archlinux installed upon it. The majority of the hardware worked out of the box, as one would expect. There are a couple of things though:

  • The special keys next to the power button send out key symbols which are duplicates of other keys, so I can't use them. No big deal.
  • The card reader won't actually read cards unless you rescan the SCSI bus - I guess it's because it's on the same bus as the eSATA port which would also need a rescan. Again, not a deal breaker.
The only complex piece of hardware is the Optimus video setup...

Configuring Optimus

No, my laptop is not a Transformer, awesome though that would be. Optimus refers to nVidia's new dual-video-card solution for laptop power management. Simply put, the laptop ships with two video cards - an Intel i915 for day-to-day work, and an nVidia 555GM for any heavy 3D crunching (such as, say, Diablo 3 :P). It's a really clever solution, because the nVidia card is powered down when not in use, so when coding on a train journey, you can get much greater battery life.

However, this is not "two video cards" like a desktop would be - there's no physical access to the nVidia, the DisplayPort and HDMI connectors go to the Intel. The nVidia is hidden 'behind' the Intel and you have to use Optimus to get to it.

Linux support for Optimus isn't perfect yet, but it's pretty close. The driver package is called Bumblebee (http://bumblebee-project.org) and it works by running the nVidia card on a second (headless) X server (on DISPLAY :8) and then shipping the frames to the Intel card via VirtualGL. When the application exits, so does the X server, and the nVidia card shuts down to give you better power saving.

I won't go into the install process, since the Bumblebee and Archlinux wikis cover it all very well. Once set up, simply prefix a command with 'optirun' to start programs on the nVidia card.

I guess there's not much to learn here, but as I was wary of buying an Optimus laptop, I thought I'd share with you all that it works fine, so don't be worried about it :)

The Joy of Window Managers

Now I can run applications on either video card, I'll need something to manage those applications. Enter the window manager...

Old friends will know me as a long time KDE user, but recently I've been on a minimalist, tiling window manager kick. For the last few months I've been using Awesome, and I'd definitely recommend it to people new to tiling WMs as it has excellent defaults.

However, I've recently switched to XMonad for my window manager of choice. It's been around along time, and as such is much more stable than Awesome. The config file is more complex (it's written in Haskell), but there are many examples to follow scattered across the web.

You can find my config here and my XMobar status bar config is in the same repo. I particularly like the Tabbed window layout for console work, especially if I'm working on unrelated tasks. The Full window layout is good for gaming - just fire up "optirun wine <game>", and hit Mod-b to allow it to overlap the status bar. Fullscreen gaming, easy. Of course there are a galaxy of other layouts too, detailed in the XMonad docs.

I also found this excellent post series which I intend to work though sometime soon: Pimp Your Xmonad. Looks handy.

Vim Overload

I've been using Vim as my primary editing environment for 10 years, and I still learn things about it all the time. I've dabbled with other editors, but I always come back to Vim.

I'm not going to bore you with all my settings, as there are thousands of posts out there already on configuring every aspect of Vim. What I will do is link my personal Vim configuration (github.com/vim.git) and also point you to this blog post where I stole most of my ideas from.

Just to whet your appetite though - my top 3 picks from the modular side of Vim would have to be Pathogen, Tabular, and NERDTree. I use them all the time.

More to come?

So that's my laptop taken from unboxing to being usable. But what's that I hear you ask? Where's the Foreman setup? Fear not! I have a blog post in mind about building a libvirt/KVM based Foreman development environment, and guess what the host is going to be... :)

Until next time!