Inside Out

Ratpoison and dmenu

I came across dmenu while setting up Musca. This nifty utility which takes a list of strings as input and creates a menu from it. Why use it?

It is quite easy to set dmenu for invoking shell commands(and for choosing windows too) from within ratpoison. Here’s the relevant ratpoisonrc stuff:

## Dmenu magic
# Rat shell
unbind exclam
bind exclam exec $(dmenu_path | dmenu -i -nb '#000000' -nf '#777777' -sb '#770000' -sf '#ffffff' -fn '--dina-medium-r-normal--12-------*' -p '> ')

# Rat windows select
unbind w
bind w exec $(ratpoison -c "select ratpoison -c "windows" | dmenu -i -nb '#000000' -nf '#777777' -sb '#770000' -sf '#ffffff' -fn '-*-dina-medium-r-normal-*-12-*-*-*-*-*-*-*' -p ':: ' | awk '{print $1}'")

Some good references: