dwm and dmenu

For the past few months I've been using DWM by the good folks over at Suckless.org, I've finally found a window manager where I use perhaps 90% of it's features on a daily basis, yet I'm never left wanting more.

I've been admiring the simplicity in combination with the `dmenu` program, my status bar is a simple `rc` script which prints the time, load and my wifi status on a single line every few seconds. Gone are the days of desktop status widgets taking up the resources better suited for other productive work.

#!/usr/bin/env rc
# start `dwm` like: $HOME/this-script.rc | dwm
while ( true ) { 
  {
    echo -n 'time: '
    uptime | cut -f 2 -d ' ' 

    echo -n 'load: '
    cat /proc/loadavg | cut -f 1 -d ' ' 

    echo -n 'wifi: '
    iwconfig eth1 | grep 'Link Quality' | cut -f 2 -d '=' | cut -f 1 -d ' ' 
  } | column | tr "\t" '  '

  sleep 2
}

The menu being another simple shell script which spits out the contents of my $HOME/.dmenu/ directory, containing all the scripts or symlinks to programs I use on a regular basis, to `dmenu` and executes whichever one I choose.

#!/bin/sh
if [ -d $HOME/.dmenu ]; then
  cmd=`ls -1 $HOME/.dmenu | dmenu $*`
  if [ "x$cmd" != "x" ]; then
    exec "$HOME/.dmenu/$cmd"
  fi  
fi

There are bugs that I've not been able to track down yet which are only apparent with Windows applications running in `wine` like Photoshop®, while the application works flawlessly, whenever I click on tool windows they jump a few pixels to the right. Odd, but still usable.

While it's all up and running it looks something like this.


1 Responses to dwm and dmenu

  1. 6186 now on Habari « Blog in isolation 2010-06-08 14:55:27

    ... gentleman called Harry from London developed this attractive Habari theme. Tags: blogging, ...

Leave a Reply



Bookmarks

I'm constantly finding interesting stuff, here are some of the things I've bookmarked recently:

HarryR on Faves.com