Monday, February 13, 2012

xmonad and DWM

Recently I removed Crunchbang from my net-book and installed Debian wheezy (testing). Openbox was great, but I still felt that I was relying too much on the mouse. I normally shy away from tiling window managers, mostly because I use Gnome on my desktop, but I decided to make an exception and try out xmonad.

Conclusion: xmonad (dwm in haskell) is great (and dwm is ok too, but its necessary to tweak it a bit so that it looks nice)

Now I say this because xmonad allows me to stay on the keyboard for pretty much everything (besides web browsing - and there's a way to even do that, though I won't be trying it anytime soon). Accessing multiple work-spaces is as easy as <Alt>+<Work-space Number>. If I need to float a window, its as easy as dragging it while holding the <Alt> key.

So without further ado, lets go through some setup steps.

Step 1. Read the tutorial, Its short and really easy to get a hold of

Step 2. Install xmonad (aptitude install xmonad)

Step 3. Install dmenu (aptitude install xmonad)

Step 4. Ok, so here's where I probably screwed up big time, but hey it works. So basically I need a GUI for wireless (too much encryption junk to remember for commandline), and a way to monitor battery life.
The tools I decided to use were trayer (a tray like gnome-panel to hold nm-applet) and nm-applet. This allowed me easily connect to wireless. Next i needed to monitor battery (and actually a clock). These are some useful commands:
acpi #Display battery life
date #Display time and date

For sound I installed gnome-sound-applet which launches into trayer.

Step 5. Confession: Ok, so while what Step 4 said is correct, I actually ended up installing gnome entirely to allow me access to all of the easy-to-use gnome apps that I'm so used to. I know there are better options but this way I was easily able to use gnome specific apps and tools from inside xmonad

Step 6. Suspend:
I made a script file to suspend the computer, and here is the command I use:
echo -n mem > /sys/power/state

Step 7. Enjoy! xmonad is a great way to maximize screen real-estate when you have to deal with small screens (not 4 monitors, but like a net-book). Have fun and good luck!