Tuesday, April 23, 2013

dwm: For lazy people who like to complicate things first

I am a programmer, therefor I am lazy. It is what is it, programmers are lazy but productive people (ironic isn't it ?) In my last blog post, I explained how I got back to Linux after a quick break and how Arch Linux was fit for me. Even though I was happy with my setup, I wanted more.. and I wanted something simpler. Why ? Because I am lazy ! And on my quest for simpleness, I tried other terminals, I tried GNU screen, I tried to add more and more things to my pypanel..

I ended up browsing the Arch Linux Forum and came across some picture of a window manager that looked simple as 1, 2, 3. I made a little research and found out it was dwm (Dynamic Window Manager) by suckless. OH. MY. GOD. It is what I have been looking for. There is one problem though: unlike OpenBox whose config (or what I have been configuring) was in xml, DWM must be compiled each time you make a change.. and it's in C !!! I am pretty conscious that C is probably one of the must know for programmer but I just did an embedded system class and I hated it so I was a bit skeptical. But I still went on, installed it, tried it, changed the .h (booyaa, I only had to change that file), re-build. The result is beautiful. Minimalist yet powerful. Enough talk, here is the result with very few changes to the original config file:


clean desktop


busy desktop

You might say.. "meh", but to me, this is a palace for a work station. Here are the features I exploited:
  • I discovered Alt+p which launches dmenu (another feature of dwm) which lets me run ANY command without opening a terminal.
  • Each tag (more or less desktops) will be used for one and only one thing. And I have named them just so I know. 
    • You can establish rules like "Chromium will only open in the web tag" or "Sublime Text will only open in the dev tag".
    • You can easily switch tag with alt + x where x is the position of the tag (Alt + 2 would display what's in dev)
  • I can launch a terminal with Shit+Alt+Enter, BUT I had to set which one because somehow dwm assumes you are using urxvt.
  • You can switch between the Tiled mode (which is how it looks on the busy screenshot) or Floating mode. Tiled mode means you let the WM place your windows as long as it fills the screen. Floating mode is what most people are used to but this time, to move a window you must hold the Alt key before dragging it.
  • I can switch between windows easily with my keyboard too !


I kept conky from my setup with OpenBox and the auto-changing wallpaper but that is all. I like this one. 
My status bar font is called ohsnap(.icons). It can be found in AUR.

It's simple, neat and I barely use my mouse. I don't mind recompiling the wm each time. I don't mind if it's in C (C is great anyway, I need to make peace with it). It is worth it. After all, a programmer will spend more time working on something that will save him time than the actual time he saves.

Config can be found at : https://github.com/nylogavins/arch-config

No comments:

Post a Comment